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 /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 'bin')
| -rw-r--r-- | bin/csh/Makefile | 11 | ||||
| -rw-r--r-- | bin/ksh/Makefile | 22 |
2 files changed, 13 insertions, 20 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile index f8b1597c703..ad6393d859d 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2003/07/29 01:34:16 lukem Exp $ +# $NetBSD: Makefile,v 1.23 2003/08/01 17:03:41 lukem Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # # C Shell with process control; VM/UNIX VAX Makefile @@ -20,9 +20,9 @@ MLINKS= csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \ csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \ csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \ csh.1 stop.1 csh.1 source.1 -CLEANFILES+=errnum.h const.h -const.h: errnum.h +DPSRCS+= errnum.h const.h +CLEANFILES+= errnum.h const.h errnum.h: err.c @rm -f ${.TARGET} @@ -39,14 +39,9 @@ const.h: const.c sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ sort >> ${.TARGET} -alloc.o const.o csh.o dir.o dol.o err.o exec.o exp.o file.o func.o glob.o \ - hist.o init.o lex.o misc.o parse.o proc.o sem.o set.o str.o time.o: const.h - .if make(install) SUBDIR+=USD.doc .endif .include <bsd.prog.mk> .include <bsd.subdir.mk> - -${DEPENDSRCS} alloc.o: const.h errnum.h diff --git a/bin/ksh/Makefile b/bin/ksh/Makefile index 6cb57e0aeac..aafddbfc433 100644 --- a/bin/ksh/Makefile +++ b/bin/ksh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2001/11/03 13:39:25 lukem Exp $ +# $NetBSD: Makefile,v 1.17 2003/08/01 17:03:42 lukem Exp $ .include <bsd.own.mk> @@ -18,23 +18,21 @@ DPSRCS+=ksh.1 # needs tbl for the man page. USETBL= -CLEANFILES+= siglist.out emacs.out - +CLEANFILES+= siglist.out siglist.out.tmp # two steps to prevent the creation of a bogus siglist.out siglist.out: config.h sh.h siglist.in siglist.sh - sh $(.CURDIR)/siglist.sh "$(CC) -E $(CPPFLAGS) $(DEFS) -I. -I$(.CURDIR)" < $(.CURDIR)/siglist.in > tmpsiglist.out - mv tmpsiglist.out siglist.out + sh $(.CURDIR)/siglist.sh "$(CC) -E $(CPPFLAGS) $(DEFS) -I. -I$(.CURDIR)" < $(.CURDIR)/siglist.in > siglist.out.tmp \ + && mv siglist.out.tmp siglist.out # two steps to prevent the creation of a bogus emacs.out +CLEANFILES+= emacs.out emacs.out.tmp emacs.out: emacs.c - sh $(.CURDIR)/emacs-gen.sh $(.CURDIR)/emacs.c > tmpemacs.out - mv tmpemacs.out emacs.out + sh $(.CURDIR)/emacs-gen.sh $(.CURDIR)/emacs.c > emacs.out.tmp \ + && mv emacs.out.tmp emacs.out +CLEANFILES+= ksh.1 ksh.1.tmp ksh.1: ksh.Man mkman - sh $(.CURDIR)/mkman ksh $(.CURDIR)/ksh.Man >tmpksh.1 - mv tmpksh.1 ksh.1 - -emacs.o: emacs.out -trap.o: siglist.out + sh $(.CURDIR)/mkman ksh $(.CURDIR)/ksh.Man >ksh.1.tmp \ + && mv ksh.1.tmp ksh.1 .include <bsd.prog.mk> |
