summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-12-04 18:07:44 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-12-04 18:07:44 +0000
commit40749e0509b3db80c692c6f9fd6a482c32607bd1 (patch)
tree63ed1a26ca4e9bf258fbe2fd5aece6b320507e8d
parenteae1434b51b71593308d6907ba66b4d39fc2dfae (diff)
downloadFreeBSD-src-40749e0509b3db80c692c6f9fd6a482c32607bd1.zip
FreeBSD-src-40749e0509b3db80c692c6f9fd6a482c32607bd1.tar.gz
MFC r289289,r290181:
r289289: Fix support for building a PROG_CXX, and PROG, directly. r290181: Unbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the "one of many" targets, e.g. `make hello_world`, where hello_world is a C program
-rw-r--r--share/mk/bsd.progs.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk
index 968688a..984ac47 100644
--- a/share/mk/bsd.progs.mk
+++ b/share/mk/bsd.progs.mk
@@ -35,6 +35,9 @@ UPDATE_DEPENDFILE_PROG?= no
# They may have asked us to build just one
.for t in ${PROGS}
.if make($t)
+.if ${PROGS_CXX:U:M${t}}
+PROG_CXX ?= $t
+.endif
PROG ?= $t
.endif
.endfor
@@ -67,7 +70,7 @@ UPDATE_DEPENDFILE ?= NO
# ensure that we don't clobber each other's dependencies
DEPENDFILE?= .depend.${PROG}
# prog.mk will do the rest
-.else
+.else # !defined(PROG)
all: ${PROGS}
# We cannot capture dependencies for meta mode here
@@ -88,7 +91,7 @@ $v =
# handle being called [bsd.]progs.mk
.include <bsd.prog.mk>
-.if !empty(PROGS) && !defined(_RECURSING_PROGS)
+.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
# tell progs.mk we might want to install things
PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install
@@ -141,4 +144,4 @@ $p.$t: .PHONY .MAKE
.for t in ${PROGS_TARGETS:O:u}
$t: ${PROGS:%=%.$t}
.endfor
-.endif
+.endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
OpenPOWER on IntegriCloud