diff options
author | sjg <sjg@FreeBSD.org> | 2013-11-13 15:10:32 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-11-13 15:10:32 +0000 |
commit | eaccbfc090a117f398fe4db90a3cf466d306bb5e (patch) | |
tree | 4d0e29b62414f624d91274a1a51c549ca9937e32 /share | |
parent | e4ce3331e4e0dc2743bb848bb956fd3192260f74 (diff) | |
download | FreeBSD-src-eaccbfc090a117f398fe4db90a3cf466d306bb5e.zip FreeBSD-src-eaccbfc090a117f398fe4db90a3cf466d306bb5e.tar.gz |
Allow this to work with fmake
Based on patch from Garret Cooper.
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.progs.mk | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index 3262004..1ca946e 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -16,14 +16,20 @@ .MAIN: all -.if defined(PROGS) +.if defined(PROGS) || defined(PROGS_CXX) +# we really only use PROGS below... +PROGS += ${PROGS_CXX} # In meta mode, we can capture dependenices for _one_ of the progs. # if makefile doesn't nominate one, we use the first. +.if defined(.PARSEDIR) .ifndef UPDATE_DEPENDFILE_PROG UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} .export UPDATE_DEPENDFILE_PROG .endif +.else +UPDATE_DEPENDFILE_PROG?= no +.endif .ifndef PROG # They may have asked us to build just one @@ -40,11 +46,13 @@ PROG_VARS += BINDIR CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS .for v in ${PROG_VARS:O:u} .if defined(${v}.${PROG}) $v += ${${v}_${PROG}:U${${v}.${PROG}}} +.else +$v ?= .endif .endfor # for meta mode, there can be only one! -.if ${PROG} == ${UPDATE_DEPENDFILE_PROG:Uno} +.if ${PROG} == ${UPDATE_DEPENDFILE_PROG} UPDATE_DEPENDFILE ?= yes .endif UPDATE_DEPENDFILE ?= NO @@ -63,7 +71,7 @@ UPDATE_DEPENDFILE = NO .endif # handle being called [bsd.]progs.mk -.include <${.PARSEFILE:S,progs,prog,}> +.include <bsd.prog.mk> .ifndef PROG # tell progs.mk we might want to install things @@ -76,11 +84,11 @@ x.$p= PROG_CXX=$p .endif $p ${p}_p: .PHONY .MAKE - (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} PROG=$p ${x.$p}) + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} PROG=$p ${x.$p}) .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} PROG=$p ${x.$p} ${@:E}) + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} PROG=$p ${x.$p} ${@:E}) .endfor .endfor |