From: Simon Schubert Date: Sat, 25 Aug 2007 15:29:29 +0000 (+0000) Subject: Rework generating of files so that every generation tool will only run once. X-Git-Tag: v2.0.1~2302 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/f685247ef9d13454a3efa0f01da91243d9d5d9dd Rework generating of files so that every generation tool will only run once. Before, we generated a file over and over again where it was needed by the build process, instead of generating the files once and reusing them. This commit changes this behavior and makes the build match more gcc's own build way, which is quite optimized. Additionally, use move-if-change, to avoid rebuilds if the generated files didn't change. --- diff --git a/gnu/usr.bin/cc41/cc_tools/Makefile b/gnu/usr.bin/cc41/cc_tools/Makefile index ec3b6282d4..d3f22b951b 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.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile,v 1.2 2007/08/25 15:29:28 corecode Exp $ SUBDIR= libiberty SUBDIR+= gengenrtl genmodes gengtype genpreds gencheck genconstants @@ -10,6 +10,14 @@ SUBDIR+= gcov-iov genchecksum #SUBDIR+= fini #.endif -.ORDER: ${SUBDIR} +.ORDER: mktooldir ${SUBDIR} + +.include "Makefile.tools" +obj depend: mktooldir +mktooldir: + mkdir -p ${TOOLGENDIR} + +clean cleandir: + rm -rf ${TOOLGENDIR} .include diff --git a/gnu/usr.bin/cc41/cc_tools/Makefile.gen b/gnu/usr.bin/cc41/cc_tools/Makefile.gen new file mode 100644 index 0000000000..1f2b963001 --- /dev/null +++ b/gnu/usr.bin/cc41/cc_tools/Makefile.gen @@ -0,0 +1,7 @@ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile.gen,v 1.1 2007/08/25 15:29:28 corecode Exp $ + +all: ${TOOLGENDIR}/${GENFILE} + +${TOOLGENDIR}/${GENFILE}: ${PROG}.nx ${GENINPUT} + ${.OBJDIR}/${PROG}.nx ${GENINPUT} > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} diff --git a/gnu/usr.bin/cc41/cc_tools/Makefile.tools b/gnu/usr.bin/cc41/cc_tools/Makefile.tools index 8a4f926614..5d4c5a58ff 100644 --- a/gnu/usr.bin/cc41/cc_tools/Makefile.tools +++ b/gnu/usr.bin/cc41/cc_tools/Makefile.tools @@ -1,102 +1,6 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile.tools,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/Makefile.tools,v 1.2 2007/08/25 15:29:28 corecode Exp $ -.ORDER: options.c options.h - -insn-output.c: - ${TOOLDIR}/genoutput/genoutput.nx ${MD_FILE} > ${.TARGET} - -insn-opinit.c: - ${TOOLDIR}/genopinit/genopinit.nx ${MD_FILE} > ${.TARGET} - -insn-extract.c: - ${TOOLDIR}/genextract/genextract.nx ${MD_FILE} > ${.TARGET} - -insn-attrtab.c: - ${TOOLDIR}/genattrtab/genattrtab.nx ${MD_FILE} > ${.TARGET} - -insn-emit.c: - ${TOOLDIR}/genemit/genemit.nx ${MD_FILE} > ${.TARGET} - -insn-attr.h: - ${TOOLDIR}/genattr/genattr.nx ${MD_FILE} > ${.TARGET} - -insn-codes.h: - ${TOOLDIR}/gencodes/gencodes.nx ${MD_FILE} > ${.TARGET} - -insn-recog.c: - ${TOOLDIR}/genrecog/genrecog.nx ${MD_FILE} > ${.TARGET} - -insn-peep.c: - ${TOOLDIR}/genpeep/genpeep.nx ${MD_FILE} > ${.TARGET} - -insn-conditions.c: - ${TOOLDIR}/genconditions/genconditions.nx ${MD_FILE} > ${.TARGET} - -insn-constants.h: - ${TOOLDIR}/genconstants/genconstants.nx ${MD_FILE} > ${.TARGET} - -insn-modes.c: - ${TOOLDIR}/genmodes/genmodes.nx > ${.TARGET} - -insn-modes.h: - ${TOOLDIR}/genmodes/genmodes.nx -h > ${.TARGET} - -min-insn-modes.c: - ${TOOLDIR}/genmodes/genmodes.nx -m > ${.TARGET} - -genrtl.c: - ${TOOLDIR}/gengenrtl/gengenrtl.nx > ${.TARGET} - -genrtl.h: - ${TOOLDIR}/gengenrtl/gengenrtl.nx -h > ${.TARGET} - -gtype-desc.c gtype-desc.h: options.h - ${TOOLDIR}/gengtype/gengtype.nx - -.ORDER: gtype-desc.c gtype-desc.h - -insn-preds.c: - ${TOOLDIR}/genpreds/genpreds.nx ${MD_FILE} > ${.TARGET} - -tm-preds.h: - ${TOOLDIR}/genpreds/genpreds.nx -h ${MD_FILE} > ${.TARGET} - -tree-check.h: - ${TOOLDIR}/gencheck/gencheck.nx > ${.TARGET} - -insn-config.h: - ${TOOLDIR}/genconfig/genconfig.nx ${MD_FILE} > ${.TARGET} - -insn-flags.h: - ${TOOLDIR}/genflags/genflags.nx ${MD_FILE} > ${.TARGET} - -gcov-iov.h: BASE-VER DEV-PHASE - ${TOOLDIR}/gcov-iov/gcov-iov.nx "`cat ${.ALLSRC:M*BASE-VER}`" \ - "`cat ${.ALLSRC:M*DEV-PHASE}`" > ${.TARGET} - - -CLEANFILES+= insn-conditions.c insn-modes.h insn-modes.c min-insn-modes.c genrtl.h -CLEANFILES+= genrtl.c tm-preds.h tree-check.h insn-constants.h insn-config.h -CLEANFILES+= insn-preds.c insn-flags.h insn-output.c insn-peep.c insn-recog.c -CLEANFILES+= insn-codes.h insn-attr.h options.h options.c optionlist -CLEANFILES+= insn-emit.c insn-attrtab.c insn-extract.c insn-opinit.c gcov-iov.h - - -CLEANFILES+= gtype-c.h gtype-cp.h gtype-desc.c gtype-desc.h -CLEANFILES+= \ - gt-alias.h gt-bitmap.h gt-c-common.h gt-c-decl.h gt-c-parse.h \ - gt-c-parser.h gt-c-pragma.h gt-cfglayout.h gt-cgraph.h gt-class.h \ - gt-coverage.h gt-cp-call.h gt-cp-class.h gt-cp-cp-objcp-common.h \ - gt-cp-decl.h gt-cp-decl2.h gt-cp-mangle.h gt-cp-method.h \ - gt-cp-name-lookup.h gt-cp-parser.h gt-cp-pt.h gt-cp-repo.h gt-cp-rtti.h \ - gt-cp-semantics.h gt-cp-tree.h gt-cp-typeck2.h gt-cselib.h gt-dbxout.h \ - gt-dojump.h gt-dwarf2asm.h gt-dwarf2out.h gt-emit-rtl.h gt-except.h \ - gt-explow.h gt-expr.h gt-function.h gt-gcse.h gt-gimplify.h gt-i386.h \ - gt-integrate.h gt-ipa-reference.h gt-lists.h gt-optabs.h gt-reg-stack.h \ - gt-regclass.h gt-sdbout.h gt-stor-layout.h gt-stringpool.h \ - gt-targhooks.h gt-tree-cfg.h gt-tree-complex.h gt-tree-eh.h \ - gt-tree-iterator.h gt-tree-mudflap.h gt-tree-nested.h \ - gt-tree-phinodes.h gt-tree-profile.h gt-tree-ssa-address.h \ - gt-tree-ssa-operands.h gt-tree-ssa-propagate.h \ - gt-tree-ssa-structalias.h gt-tree-ssanames.h gt-tree-vect-generic.h \ - gt-tree.h gt-varasm.h \ +MIC= sh ${GCCDIR}/move-if-change +TOOLGENDIR= ${OTOPDIR}/cc_tools/gen +.PATH: ${TOOLGENDIR} +CFLAGS+= -I${TOOLGENDIR} diff --git a/gnu/usr.bin/cc41/cc_tools/gcov-iov/Makefile b/gnu/usr.bin/cc41/cc_tools/gcov-iov/Makefile index 81d05ef6fe..33bdfa06c3 100644 --- a/gnu/usr.bin/cc41/cc_tools/gcov-iov/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/gcov-iov/Makefile @@ -1,7 +1,13 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gcov-iov/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gcov-iov/Makefile,v 1.2 2007/08/25 15:29:28 corecode Exp $ .include "../Makefile.inc" PROG= gcov-iov +all: ${TOOLGENDIR}/gcov-iov.h +${TOOLGENDIR}/gcov-iov.h: BASE-VER DEV-PHASE ${PROG}.nx + ${.OBJDIR}/${PROG}.nx "`cat ${.ALLSRC:M*BASE-VER}`" \ + "`cat ${.ALLSRC:M*DEV-PHASE}`" > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genattr/Makefile b/gnu/usr.bin/cc41/cc_tools/genattr/Makefile index ac3c4ab9bb..6d1d039b10 100644 --- a/gnu/usr.bin/cc41/cc_tools/genattr/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genattr/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genattr/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genattr/Makefile,v 1.2 2007/08/25 15:29:28 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genattr SRCS= genattr.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-attr.h +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genattrtab/Makefile b/gnu/usr.bin/cc41/cc_tools/genattrtab/Makefile index 95949758aa..1bed8f2768 100644 --- a/gnu/usr.bin/cc41/cc_tools/genattrtab/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genattrtab/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genattrtab/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genattrtab/Makefile,v 1.2 2007/08/25 15:29:28 corecode Exp $ .include "../Makefile.inc" @@ -8,4 +8,8 @@ SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} ${VARRAY_SRCS} LDADD+= -lm +GENFILE= insn-attrtab.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/gencheck/Makefile b/gnu/usr.bin/cc41/cc_tools/gencheck/Makefile index ef22861fe1..b59d27d147 100644 --- a/gnu/usr.bin/cc41/cc_tools/gencheck/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/gencheck/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gencheck/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gencheck/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -17,4 +17,7 @@ gencheck.h: Makefile ../../Makefile.langs touch ${.TARGET} .endif +GENFILE= tree-check.h +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/gencodes/Makefile b/gnu/usr.bin/cc41/cc_tools/gencodes/Makefile index e78de31993..0a25854425 100644 --- a/gnu/usr.bin/cc41/cc_tools/gencodes/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/gencodes/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gencodes/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gencodes/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= gencodes SRCS= gencodes.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-codes.h +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genconditions/Makefile b/gnu/usr.bin/cc41/cc_tools/genconditions/Makefile index 0d3f6dbdb1..5ce81e0542 100644 --- a/gnu/usr.bin/cc41/cc_tools/genconditions/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genconditions/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genconditions/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genconditions/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genconditions SRCS= genconditions.c insn-modes.h gtype-desc.h SRCS+= ${EARLY_SRCS} ${RTL_SRCS} ${ERRORS_SRCS} +GENFILE= insn-conditions.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genconfig/Makefile b/gnu/usr.bin/cc41/cc_tools/genconfig/Makefile index fa4749c8f1..91ff79cb3a 100644 --- a/gnu/usr.bin/cc41/cc_tools/genconfig/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genconfig/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genconfig/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genconfig/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genconfig SRCS= genconfig.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-config.h +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genconstants/Makefile b/gnu/usr.bin/cc41/cc_tools/genconstants/Makefile index 4e6159480a..b15e705dc2 100644 --- a/gnu/usr.bin/cc41/cc_tools/genconstants/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genconstants/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genconstants/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genconstants/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genconstants SRCS= genconstants.c insn-modes.h gtype-desc.h SRCS+= ${RTL_SRCS} ${EARLY_SRCS} ${ERRORS_SRCS} +GENFILE= insn-constants.h +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genemit/Makefile b/gnu/usr.bin/cc41/cc_tools/genemit/Makefile index 7675b309fe..f2454c21de 100644 --- a/gnu/usr.bin/cc41/cc_tools/genemit/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genemit/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genemit/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genemit/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genemit SRCS= genemit.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-emit.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genextract/Makefile b/gnu/usr.bin/cc41/cc_tools/genextract/Makefile index 72f4f79b88..54d3adc5a2 100644 --- a/gnu/usr.bin/cc41/cc_tools/genextract/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genextract/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genextract/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genextract/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -7,4 +7,8 @@ SRCS= genextract.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options SRCS+= insn-config.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-extract.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genflags/Makefile b/gnu/usr.bin/cc41/cc_tools/genflags/Makefile index 0ea098583b..af0b5bff02 100644 --- a/gnu/usr.bin/cc41/cc_tools/genflags/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genflags/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genflags/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genflags/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genflags SRCS= genflags.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-flags.h +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/gengenrtl/Makefile b/gnu/usr.bin/cc41/cc_tools/gengenrtl/Makefile index 862f574dc3..01e0e07469 100644 --- a/gnu/usr.bin/cc41/cc_tools/gengenrtl/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/gengenrtl/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gengenrtl/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gengenrtl/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,14 @@ PROG= gengenrtl SRCS= gengenrtl.c SRCS+= ${ERRORS_SRCS} +all: ${TOOLGENDIR}/genrtl.c ${TOOLGENDIR}/genrtl.h + +${TOOLGENDIR}/genrtl.c: ${PROG}.nx + ${.OBJDIR}/${PROG}.nx > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + +${TOOLGENDIR}/genrtl.h: ${PROG}.nx + ${.OBJDIR}/${PROG}.nx -h > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + .include diff --git a/gnu/usr.bin/cc41/cc_tools/gengtype/Makefile b/gnu/usr.bin/cc41/cc_tools/gengtype/Makefile index bf20c48221..5be01d35ca 100644 --- a/gnu/usr.bin/cc41/cc_tools/gengtype/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/gengtype/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gengtype/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/gengtype/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -8,7 +8,7 @@ SRCS+= ${ERRORS_SRCS} CLEANFILES+= gtyp-gen.h -gtyp-gen.h: Makefile ../../Makefile.langs +gtyp-gen.h: Makefile ../../Makefile.langs ${GTFILES} echo "/* This file is machine generated. Do not edit. */" > gtyp-gen.h echo "static const char *const srcdir = " >> gtyp-gen.h echo "\"$(GTFILES_SRCDIR)\"" >> gtyp-gen.h @@ -34,4 +34,10 @@ gtyp-gen.h: Makefile ../../Makefile.langs .endfor echo "NULL};" >> gtyp-gen.h +all: ${TOOLGENDIR}/gtype-stamp + +${TOOLGENDIR}/gtype-stamp: ${PROG}.nx + cd ${TOOLGENDIR} && ${.OBJDIR}/${PROG}.nx + touch ${.TARGET} + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genmodes/Makefile b/gnu/usr.bin/cc41/cc_tools/genmodes/Makefile index 24e7aa3491..e8ef0bec70 100644 --- a/gnu/usr.bin/cc41/cc_tools/genmodes/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genmodes/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genmodes/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genmodes/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,18 @@ PROG= genmodes SRCS= genmodes.c SRCS+= ${ERRORS_SRCS} +all: ${TOOLGENDIR}/insn-modes.c ${TOOLGENDIR}/insn-modes.h ${TOOLGENDIR}/min-insn-modes.c + +${TOOLGENDIR}/insn-modes.c: ${PROG}.nx + ${.OBJDIR}/${PROG}.nx > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + +${TOOLGENDIR}/insn-modes.h: ${PROG}.nx + ${.OBJDIR}/${PROG}.nx -h > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + +${TOOLGENDIR}/min-insn-modes.c: ${PROG}.nx + ${.OBJDIR}/${PROG}.nx -m > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genopinit/Makefile b/gnu/usr.bin/cc41/cc_tools/genopinit/Makefile index 5e267b47d8..43ff1f8dc5 100644 --- a/gnu/usr.bin/cc41/cc_tools/genopinit/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genopinit/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genopinit/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genopinit/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genopinit SRCS= genopinit.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-opinit.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genoutput/Makefile b/gnu/usr.bin/cc41/cc_tools/genoutput/Makefile index d00def46aa..12f9de9538 100644 --- a/gnu/usr.bin/cc41/cc_tools/genoutput/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genoutput/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genoutput/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genoutput/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genoutput SRCS= genoutput.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-output.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genpeep/Makefile b/gnu/usr.bin/cc41/cc_tools/genpeep/Makefile index 8bad55db6b..e88b3b7fc7 100644 --- a/gnu/usr.bin/cc41/cc_tools/genpeep/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genpeep/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genpeep/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genpeep/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genpeep SRCS= genpeep.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-peep.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genpreds/Makefile b/gnu/usr.bin/cc41/cc_tools/genpreds/Makefile index 93b4feec98..ca166c60d2 100644 --- a/gnu/usr.bin/cc41/cc_tools/genpreds/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genpreds/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genpreds/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genpreds/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,14 @@ PROG= genpreds SRCS= genpreds.c insn-modes.h gtype-desc.h SRCS+= ${RTL_SRCS} ${EARLY_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +all: ${TOOLGENDIR}/insn-preds.c ${TOOLGENDIR}/tm-preds.h + +${TOOLGENDIR}/insn-preds.c: ${PROG}.nx ${MD_FILE} + ${.OBJDIR}/${PROG}.nx ${MD_FILE} > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + +${TOOLGENDIR}/tm-preds.h: ${PROG}.nx ${MD_FILE} + ${.OBJDIR}/${PROG}.nx ${MD_FILE} -h > ${.TARGET}.tmp + ${MIC} ${.TARGET}.tmp ${.TARGET} + .include diff --git a/gnu/usr.bin/cc41/cc_tools/genrecog/Makefile b/gnu/usr.bin/cc41/cc_tools/genrecog/Makefile index 998391388c..33aeadd30b 100644 --- a/gnu/usr.bin/cc41/cc_tools/genrecog/Makefile +++ b/gnu/usr.bin/cc41/cc_tools/genrecog/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genrecog/Makefile,v 1.1 2006/09/27 12:10:34 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/cc41/cc_tools/genrecog/Makefile,v 1.2 2007/08/25 15:29:29 corecode Exp $ .include "../Makefile.inc" @@ -6,4 +6,8 @@ PROG= genrecog SRCS= genrecog.c insn-modes.h gtype-desc.h insn-constants.h tm-preds.h options.h SRCS+= ${RTL_SRCS} ${SUPPORT_SRCS} ${PRINT_SRCS} ${ERRORS_SRCS} +GENFILE= insn-recog.c +GENINPUT= ${MD_FILE} +.include "../Makefile.gen" + .include