Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bsdinstall/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
OSNAME?= FreeBSD | |||||
SUBDIR= distextract distfetch partedit scripts | SUBDIR= distextract distfetch partedit scripts | ||||
SUBDIR_PARALLEL= | SUBDIR_PARALLEL= | ||||
SCRIPTS= bsdinstall | SCRIPTS= bsdinstall | ||||
MAN= bsdinstall.8 | MAN= bsdinstall.8 | ||||
PACKAGE= bsdinstall | PACKAGE= bsdinstall | ||||
GENHDRS= opt_osname.h | |||||
SRCS+= ${GENHDRS} | |||||
CLEANFILES+= ${GENHDRS} | |||||
opt_osname.h: .PHONY | |||||
if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then \ | |||||
echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ | |||||
fi | |||||
asiciliano: A question (for me) to understand, is the creation of a new file the way to "pass" a value to a… | |||||
Done Inline ActionsYes. I tested using the flag to make(1). brd: Yes. I tested using the flag to make(1). | |||||
.include <bsd.prog.mk> | .include <bsd.prog.mk> |
A question (for me) to understand, is the creation of a new file the way to "pass" a value to a MACRO? Can our make(1) or the compiler do something like CFLAGS+= -DOSNAME=${VALUE}?