diff options
| author | lukem <lukem@NetBSD.org> | 2003-08-01 17:03:41 +0000 |
|---|---|---|
| committer | lukem <lukem@NetBSD.org> | 2003-08-01 17:03:41 +0000 |
| commit | a93ea220fcb3e34cdfdcd4d7a5d391e0b2b4f2ba (patch) | |
| tree | c9adfc000f1b3f310cf2f812f02823dbff7766ca /gnu/usr.bin | |
| parent | 5aa077f5cfe13c86bb3596f0e709337147ffc49c (diff) | |
Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.
* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx
* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES
* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}
* Deprecate the (short lived) DEPENDSRCS
Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.
Tested with "make -j 8 distribution" and "make distribution".
Diffstat (limited to 'gnu/usr.bin')
| -rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/gcc/backend/Makefile | 5 | ||||
| -rw-r--r-- | gnu/usr.bin/gcc/f771/Makefile | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/gcc3/backend/Makefile | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/gcc3/f771/Makefile | 8 | ||||
| -rw-r--r-- | gnu/usr.bin/gcc3/frontend/Makefile | 6 |
6 files changed, 17 insertions, 14 deletions
diff --git a/gnu/usr.bin/binutils/ld/Makefile b/gnu/usr.bin/binutils/ld/Makefile index 08c552704a7..41ec69fe914 100644 --- a/gnu/usr.bin/binutils/ld/Makefile +++ b/gnu/usr.bin/binutils/ld/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2003/07/28 15:25:04 lukem Exp $ +# $NetBSD: Makefile,v 1.13 2003/08/01 17:03:44 lukem Exp $ .include <bsd.own.mk> @@ -46,7 +46,6 @@ stringify.sed: ${G_STRINGIFY} .include ".depend.${f}" .endif -${DEPENDSRCS}: .depend.${f} .depend.${f}: ${f}.sh (srcdir=${DIST}/ld . ${>:M*.sh} && \ if [ x"$$TEMPLATE_NAME" != x ]; then \ @@ -62,6 +61,7 @@ ${DEPENDSRCS}: .depend.${f} echo "e${f}.c: $$temp_name $$script" \ ) >$@ +DPSRCS+= .depend.${f} e${f}.c CLEANFILES+= .depend.${f} e${f}.c e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed diff --git a/gnu/usr.bin/gcc/backend/Makefile b/gnu/usr.bin/gcc/backend/Makefile index b6652821b2a..a9119ae5395 100644 --- a/gnu/usr.bin/gcc/backend/Makefile +++ b/gnu/usr.bin/gcc/backend/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2003/07/28 15:25:04 lukem Exp $ +# $NetBSD: Makefile,v 1.11 2003/08/01 17:03:44 lukem Exp $ NOLINKLIB= # defined NOLINT= # defined @@ -13,6 +13,8 @@ CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \ -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\" HOST_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} +DPSRCS+= insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h + .include <bsd.lib.mk> # Independent generation programs. @@ -41,6 +43,5 @@ insn-${f}: genrtl.h gen${f:R}.c obstack.c ${G_md_file} \ insn-attrtab.c: ${G_HOST_RTLANAL:S/^l-//:.o=.c} insn-attrtab.c insn-extract.c: insn-config.h -${OBJS} ${DEPENDSRCS}: insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h .PATH: ${DIST}/gcc ${DIST}/libiberty ${G_out_file:H} diff --git a/gnu/usr.bin/gcc/f771/Makefile b/gnu/usr.bin/gcc/f771/Makefile index c2e622db185..46c73b3f8b5 100644 --- a/gnu/usr.bin/gcc/f771/Makefile +++ b/gnu/usr.bin/gcc/f771/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2003/07/28 15:25:04 lukem Exp $ +# $NetBSD: Makefile,v 1.6 2003/08/01 17:03:44 lukem Exp $ PROG= f771 SRCS= ${G_F77_OBJS:.o=.c} @@ -8,6 +8,7 @@ HOST_CPPFLAGS+= -I${GCCARCH} -DUSE_HCONFIG= \ ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} .for f in 1t 2t fo io nq op ot +DPSRCS+= str-${f}.h CLEANFILES+= str-${f}.h str-${f}.j .endfor @@ -21,7 +22,6 @@ CLEANFILES+= fini str-${f}.h str-${f}.j: str-${f}.fin fini ./fini ${>:M*.fin} str-${f}.j str-${f}.h -${OBJS} ${DEPENDSRCS}: str-${f}.h .endfor .PATH: ${DIST}/gcc/f diff --git a/gnu/usr.bin/gcc3/backend/Makefile b/gnu/usr.bin/gcc3/backend/Makefile index bb02f36154e..dbe0c0786f2 100644 --- a/gnu/usr.bin/gcc3/backend/Makefile +++ b/gnu/usr.bin/gcc3/backend/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2003/07/29 00:16:46 uwe Exp $ +# $NetBSD: Makefile,v 1.5 2003/08/01 17:03:45 lukem Exp $ NOLINKLIB= # defined NOLINT= # defined @@ -12,6 +12,7 @@ SRCS= ${G_OBJS:.o=.c} ${G_out_file:T} CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \ -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\" HOST_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} +DPSRCS+= insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h .include <bsd.lib.mk> @@ -210,6 +211,5 @@ insn-attrtab.c: ${G_HOST_RTLANAL:.o=.c} insn-attrtab.c insn-extract.c: insn-config.h insn-conditions.c: insn-constants.h tm_p.h tm-preds.h toplev.c: options.h -${OBJS} ${DEPENDSRCS}: insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h .PATH: ${DIST}/gcc ${DIST}/libiberty ${G_out_file:H} diff --git a/gnu/usr.bin/gcc3/f771/Makefile b/gnu/usr.bin/gcc3/f771/Makefile index 943d7c619a7..1ad6c36f054 100644 --- a/gnu/usr.bin/gcc3/f771/Makefile +++ b/gnu/usr.bin/gcc3/f771/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2003/07/29 23:35:25 uwe Exp $ +# $NetBSD: Makefile,v 1.4 2003/08/01 17:03:45 lukem Exp $ PROG= f771 SRCS= ${G_F77_OBJS:.o=.c} main.c @@ -7,6 +7,10 @@ CPPFLAGS+= -I${DIST}/gcc/f -I. HOST_CPPFLAGS+= -I${GCCARCH} -DUSE_HCONFIG= \ ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} +.for f in 1t 2t fo io nq op ot +DPSRCS+= str-${f}.h +.endfor + .include "../Makefile.backend" fini: fini.c @@ -18,8 +22,6 @@ CLEANFILES+= str-${f}.h str-${f}.j str-${f}.h str-${f}.j: str-${f}.fin fini ./fini ${>:M*.fin} str-${f}.j str-${f}.h - -${OBJS} ${DEPENDSRCS}: str-${f}.h .endfor CLEANFILES+= main.c diff --git a/gnu/usr.bin/gcc3/frontend/Makefile b/gnu/usr.bin/gcc3/frontend/Makefile index 4489a4ec8b1..584a6cc8ae8 100644 --- a/gnu/usr.bin/gcc3/frontend/Makefile +++ b/gnu/usr.bin/gcc3/frontend/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2003/07/29 23:31:46 uwe Exp $ +# $NetBSD: Makefile,v 1.4 2003/08/01 17:03:46 lukem Exp $ NOLINKLIB= # defined NOLINT= # defined @@ -16,9 +16,9 @@ CPPFLAGS+= -I${.CURDIR} -I${GCCARCH} -I${BACKENDOBJ} -I. \ -DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" HOST_CPPFLAGS+= -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} -.include <bsd.lib.mk> +DPSRCS+= multilib.h specs.h -${OBJS} ${DEPENDSRCS}: multilib.h specs.h +.include <bsd.lib.mk> .PATH: ${DIST}/gcc |
