From: YONETANI Tomokazu Date: Mon, 24 Sep 2007 03:04:28 +0000 (+0000) Subject: Fix read-only build of cc41. X-Git-Tag: v2.0.1~2142 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/68ad3dcffb47cd0ae2dde2d10fa16731df0776a0 Fix read-only build of cc41. Move mktooldir target into cc_tools/Makefile.tools, and make beforedepend depend on it, if ${TOOLGENDIR} doesn't exist yet. This way, the `depend' targets in the subdirectories that includes Makefile.tools are guaranteed to be run after mktooldir. --- diff --git a/gnu/usr.bin/cc41/cc_tools/Makefile b/gnu/usr.bin/cc41/cc_tools/Makefile index d3f22b951b..d7143d834c 100644 --- a/gnu/usr.bin/cc41/cc_tools/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile,v 1.2 2007/08/25 15:29:28 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile,v 1.3 2007/09/24 03:04:28 y0netan1 Exp $ SUBDIR= libiberty SUBDIR+= gengenrtl genmodes gengtype genpreds gencheck genconstants @@ -10,13 +10,7 @@ SUBDIR+= gcov-iov genchecksum #SUBDIR+= fini #.endif -.ORDER: mktooldir ${SUBDIR} - .include "Makefile.tools" -obj depend: mktooldir -mktooldir: - mkdir -p ${TOOLGENDIR} - clean cleandir: rm -rf ${TOOLGENDIR} diff --git a/gnu/usr.bin/cc41/cc_tools/Makefile.tools b/gnu/usr.bin/cc41/cc_tools/Makefile.tools index 5d4c5a58ff..4da1f6c05e 100644 --- a/gnu/usr.bin/cc41/cc_tools/Makefile.tools +++ b/gnu/usr.bin/cc41/cc_tools/Makefile.tools @@ -1,6 +1,12 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile.tools,v 1.2 2007/08/25 15:29:28 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile.tools,v 1.3 2007/09/24 03:04:28 y0netan1 Exp $ MIC= sh ${GCCDIR}/move-if-change TOOLGENDIR= ${OTOPDIR}/cc_tools/gen .PATH: ${TOOLGENDIR} CFLAGS+= -I${TOOLGENDIR} + +.if !exists(${TOOLGENDIR}) +beforedepend: mktooldir +mktooldir: + mkdir -p ${TOOLGENDIR} +.endif