diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-11-25 19:10:59 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-11-25 19:10:59 +0000 |
commit | 8e8319a68d0b966895bf4cb6bc2fc9eb0f234dd2 (patch) | |
tree | 5344c842f9dada45e121922429ff7545eda151d9 | |
parent | 24b1e7f11d2f4c5883d9e31fb2fb12cda57f6ec6 (diff) | |
download | src-8e8319a68d0b966895bf4cb6bc2fc9eb0f234dd2.tar.gz src-8e8319a68d0b966895bf4cb6bc2fc9eb0f234dd2.zip |
Stop building vers.c in include/ and only build the needed osreldate.h.
Because of how osreldate.h was being built with newvers.sh, which always
spat out a vers.c dependent on SVN or git, the meta mode build was
considering osreldate.h to depend on the current git or SVN index. This
would lead to entire tree rebuilds when modifying git's index. There's
no reason to be generating vers.c here so just skip it.
While here, in mk-osreldate.sh rename PARAM_H to proper PARAMFILE (which
newvers.sh already has a default for) and remove unneeded export.
Sponsored by: EMC / Isilon Storage Division
Notes
Notes:
svn path=/head/; revision=291310
-rw-r--r-- | include/Makefile | 10 | ||||
-rwxr-xr-x | include/mk-osreldate.sh | 2 | ||||
-rw-r--r-- | sys/conf/newvers.sh | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/include/Makefile b/include/Makefile index d59900f245a4..332b661b7c2e 100644 --- a/include/Makefile +++ b/include/Makefile @@ -5,7 +5,7 @@ .include <src.opts.mk> -CLEANFILES= osreldate.h version vers.c +CLEANFILES= osreldate.h version SUBDIR= arpa protocols rpcsvc rpc xlocale SUBDIR_PARALLEL= INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ @@ -104,12 +104,8 @@ NEWVERS_SH= ${SYSDIR}/conf/newvers.sh PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh -osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} - env ECHO="${ECHO}" \ - MAKE="${MAKE}" \ - NEWVERS_SH=${NEWVERS_SH} \ - PARAM_H=${PARAM_H} \ - SYSDIR=${SYSDIR} \ +osreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} + env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \ sh ${MK_OSRELDATE_SH} .for i in ${LHDRS} diff --git a/include/mk-osreldate.sh b/include/mk-osreldate.sh index ed8311c6ead8..e9c6772724df 100755 --- a/include/mk-osreldate.sh +++ b/include/mk-osreldate.sh @@ -35,8 +35,8 @@ trap "rm -f $tmpfile" EXIT ${ECHO} creating osreldate.h from newvers.sh -export PARAMFILE="${PARAM_H:=$CURDIR/../sys/sys/param.h}" set +e +VARS_ONLY=1 . "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" || exit 1 set -e cat > $tmpfile <<EOF diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 3ca5bcdc9ea7..2239ac673ab7 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -84,6 +84,12 @@ fi COPYRIGHT="$COPYRIGHT " +# VARS_ONLY means no files should be generated, this is just being +# included. +if [ -n "$VARS_ONLY" ]; then + return 0 +fi + LC_ALL=C; export LC_ALL if [ ! -r version ] then |