]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
META_MODE: Avoid command changing in 2nd build.
authorbdrewery <bdrewery@FreeBSD.org>
Fri, 18 Sep 2015 21:36:29 +0000 (21:36 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Fri, 18 Sep 2015 21:36:29 +0000 (21:36 +0000)
If the command to be ran changes then a rebuild is caused. Checking
exists(${DESTDIR}...) from make results in this on the 2nd and
possibly subsequent builds due to staging during build.  Avoid this
by always running the existence check in the make sh command.

Sponsored by: EMC / Isilon Storage Division

include/Makefile

index 5d585a14319b6ee892c588746de18505d5457a86..3c3f9937c02ec667b4112e4ffc18f6e0b49d96c9 100644 (file)
@@ -172,12 +172,12 @@ compat:
 copies:
 .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \
        ${_MARCHS}
-.if exists(${DESTDIR}${INCLUDEDIR}/$i)
-       cd ${DESTDIR}${INCLUDEDIR}/$i; \
-       for h in *.h; do \
-               if [ -L $$h ]; then rm -f $$h; fi; \
-       done
-.endif
+       if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \
+               cd ${DESTDIR}${INCLUDEDIR}/$i; \
+               for h in *.h; do \
+                       if [ -L $$h ]; then rm -f $$h; fi; \
+               done; \
+       fi
 .endfor
 .for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS}
        cd ${.CURDIR}/../sys; \