svn commit: r260005 - stable/10/share/mk
Julio Merino
jmmv at FreeBSD.org
Sat Dec 28 16:08:11 UTC 2013
Author: jmmv
Date: Sat Dec 28 16:08:10 2013
New Revision: 260005
URL: http://svnweb.freebsd.org/changeset/base/260005
Log:
Pull up fixes to allow building tests along scripts and data files.
MFC of the following into stable/10:
- r257095 Allow mixing bsd.files.mk with bsd.subdir.mk.
- r258095 Allow this (bsd.progs.mk) to work with fmake.
- r258330 Need to also test for defined(${v}_${PROG}) in bsd.progs.mk.
- r259209 Make bsd.progs.mk work in directories with SCRIPTS but no PROGS.
This is all 'make tinderbox' clean as run on ref10-amd64.
Modified:
stable/10/share/mk/bsd.files.mk
stable/10/share/mk/bsd.progs.mk
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/share/mk/bsd.files.mk
==============================================================================
--- stable/10/share/mk/bsd.files.mk Sat Dec 28 15:19:47 2013 (r260004)
+++ stable/10/share/mk/bsd.files.mk Sat Dec 28 16:08:10 2013 (r260005)
@@ -14,9 +14,9 @@ buildfiles: ${${group}}
all: buildfiles
-.if !target(installfiles)
.for group in ${FILESGROUPS}
.if defined(${group}) && !empty(${group})
+installfiles: installfiles-${group}
${group}OWN?= ${SHAREOWN}
${group}GRP?= ${SHAREGRP}
@@ -37,7 +37,7 @@ ${group}NAME_${file:T}?= ${${group}NAME}
.else
${group}NAME_${file:T}?= ${file:T}
.endif
-installfiles: _${group}INS_${file:T}
+installfiles-${group}: _${group}INS_${file:T}
_${group}INS_${file:T}: ${file}
${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
-g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
@@ -48,7 +48,7 @@ _${group}FILES+= ${file}
.endif
.endfor
.if !empty(_${group}FILES)
-installfiles: _${group}INS
+installfiles-${group}: _${group}INS
_${group}INS: ${_${group}FILES}
.if defined(${group}NAME)
${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
@@ -63,7 +63,5 @@ _${group}INS: ${_${group}FILES}
.endif # defined(${group}) && !empty(${group})
.endfor
-.endif # !target(installfiles)
-
realinstall: installfiles
.ORDER: beforeinstall installfiles
Modified: stable/10/share/mk/bsd.progs.mk
==============================================================================
--- stable/10/share/mk/bsd.progs.mk Sat Dec 28 15:19:47 2013 (r260004)
+++ stable/10/share/mk/bsd.progs.mk Sat Dec 28 16:08:10 2013 (r260005)
@@ -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
@@ -38,13 +44,15 @@ PROG ?= $t
# just one of many
PROG_VARS += BINDIR CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS
.for v in ${PROG_VARS:O:u}
-.if defined(${v}.${PROG})
+.if defined(${v}.${PROG}) || 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,9 +71,9 @@ UPDATE_DEPENDFILE = NO
.endif
# handle being called [bsd.]progs.mk
-.include <${.PARSEFILE:S,progs,prog,}>
+.include <bsd.prog.mk>
-.ifndef PROG
+.ifndef _RECURSING_PROGS
# tell progs.mk we might want to install things
PROGS_TARGETS+= cleandepend cleandir cleanobj depend install
@@ -76,11 +84,13 @@ 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} _RECURSING_PROGS= \
+ SUBDIR= 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} _RECURSING_PROGS= \
+ SUBDIR= PROG=$p ${x.$p} ${@:E})
.endfor
.endfor
@@ -88,4 +98,18 @@ $p.$t: .PHONY .MAKE
$t: ${PROGS:%=%.$t}
.endfor
+SCRIPTS_TARGETS+= cleandepend cleandir cleanobj depend install
+
+.for p in ${SCRIPTS}
+.for t in ${SCRIPTS_TARGETS:O:u}
+$p.$t: .PHONY .MAKE
+ (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+ SUBDIR= SCRIPT=$p ${x.$p} ${@:E})
+.endfor
+.endfor
+
+.for t in ${SCRIPTS_TARGETS:O:u}
+$t: ${SCRIPTS:%=%.$t}
+.endfor
+
.endif
More information about the svn-src-stable
mailing list