diff options
author | luigi <luigi@FreeBSD.org> | 2002-02-22 04:44:28 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-02-22 04:44:28 +0000 |
commit | 826d38aaa68953a962663a2b7cc49ea27fa5848f (patch) | |
tree | 8f0f7fbd4c9524e3f7395f700015bfd922fee983 /sys | |
parent | de6d708bd1c33997202de8fe4c96e1a92917f1b8 (diff) | |
download | FreeBSD-src-826d38aaa68953a962663a2b7cc49ea27fa5848f.zip FreeBSD-src-826d38aaa68953a962663a2b7cc49ea27fa5848f.tar.gz |
Use make -V VARIABLE | xargs ... to pass argument lists to program
so that this is safe even if VARIABLE is longer than kern.argmax.
There is another instance of CFILES which might need the same treatment,
and might be noticed when doing a "make links".
The same has to be done in RELENG_4 (on some different file).
Noticed-by: picobsd cross-compiling LINT
Suggested-by: Alfred (bright@mu.org), des@freebsd.org
MFC-after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/kern.post.mk | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index d9849be..d0a4fe0 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -93,10 +93,13 @@ _kernel-depend: assym.s vnode_if.h ${BEFORE_DEPEND} \ ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} if [ -f .olddep ]; then mv .olddep .depend; fi rm -f .newdep - env MKDEP_CPP="${CC} -E" CC="${CC}" \ - mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} - env MKDEP_CPP="${CC} -E" \ - mkdep -a -f .newdep ${ASM_CFLAGS} ${SFILES} ${SYSTEM_SFILES} + # + # The argument list can be very long, use make -V and xargs to + # pass it to mkdep. + ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | xargs \ + env MKDEP_CPP="${CC} -E" CC="${CC}" mkdep -a -f .newdep ${CFLAGS} + ${MAKE} -V SFILES -V SYSTEM_SFILES | xargs \ + env MKDEP_CPP="${CC} -E" mkdep -a -f .newdep ${ASM_CFLAGS} rm -f .depend mv .newdep .depend @@ -106,7 +109,7 @@ kernel-cleandepend: links: egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink - echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ + ${MAKE} -V CFILES | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks sh makelinks; rm -f dontlink |