From 2eaa2fe8e4c975f189b35b9684cb933b44b1d989 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 16 Jun 2017 10:25:54 +0000 Subject: [PATCH] mark files as BUILDFIRST, or write explicit dependencies, so that most programs will build even without a make depend first. okay tb@ millert@ --- bin/csh/Makefile | 3 ++- gnu/lib/libiberty/Makefile.bsd-wrapper | 4 +++- gnu/usr.bin/cc/libcpp/Makefile | 4 +++- gnu/usr.bin/cc/libgcov/Makefile | 4 +++- gnu/usr.bin/cc/libobjc/Makefile | 3 ++- lib/libcrypto/Makefile | 3 ++- lib/libcurses/Makefile | 4 +++- lib/libedit/Makefile | 3 ++- lib/librpcsvc/Makefile | 4 +++- sbin/isakmpd/Makefile | 4 +++- sbin/wsconsctl/Makefile | 3 ++- usr.bin/awk/Makefile | 4 +++- usr.bin/infocmp/Makefile | 4 +++- usr.bin/tic/Makefile | 4 +++- usr.bin/tset/Makefile | 4 +++- usr.sbin/rpc.lockd/Makefile | 4 +++- usr.sbin/rpc.statd/Makefile | 4 +++- usr.sbin/ypserv/ypserv/Makefile | 3 ++- 18 files changed, 48 insertions(+), 18 deletions(-) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 528b0d30188..9b363dd184a 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2015/10/26 21:57:42 naddy Exp $ +# $OpenBSD: Makefile,v 1.15 2017/06/16 10:25:54 espie Exp $ # # C Shell with process control; VM/UNIX VAX Makefile # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria @@ -29,5 +29,6 @@ const.h: const.c sort >> $@ .depend alloc.o: const.h error.h +BUILDFIRST = const.h error.h .include diff --git a/gnu/lib/libiberty/Makefile.bsd-wrapper b/gnu/lib/libiberty/Makefile.bsd-wrapper index 77b6658882a..91974daf232 100644 --- a/gnu/lib/libiberty/Makefile.bsd-wrapper +++ b/gnu/lib/libiberty/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.16 2016/01/20 12:45:16 sthen Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.17 2017/06/16 10:25:54 espie Exp $ LIB= iberty CPPFLAGS+= -DHAVE_CONFIG_H -I$(.CURDIR)/src -I$(.CURDIR)/include -I$(.OBJDIR) @@ -31,6 +31,8 @@ CLEANFILES+= Makefile config.cache config.log stamp-h xhost-mkfrag \ depend: needed-list +BUILDFIRST = needed-list + needed-list: config.status ${MAKE} ${GNUCFLAGS} CC="${CC}" needed-list diff --git a/gnu/usr.bin/cc/libcpp/Makefile b/gnu/usr.bin/cc/libcpp/Makefile index 9e80648a19f..1ffae80ab50 100644 --- a/gnu/usr.bin/cc/libcpp/Makefile +++ b/gnu/usr.bin/cc/libcpp/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/libcpp/Makefile,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile,v 1.2 2009/10/15 21:08:01 robert Exp $ +# $OpenBSD: Makefile,v 1.3 2017/06/16 10:25:54 espie Exp $ # Use our headers in preference to ones from ../cc_tools. CFLAGS+= -I${.CURDIR} -I. @@ -19,6 +19,8 @@ SRCS+= charset.c directives.c errors.c expr.c files.c \ NOPROFILE= Yes NOPIC= Yes +BUILDFIRST = localedir.h + localedir.h: Makefile echo '#define LOCALEDIR "/usr/share/locale"' > localedir.h SRCS+= localedir.h diff --git a/gnu/usr.bin/cc/libgcov/Makefile b/gnu/usr.bin/cc/libgcov/Makefile index 0d24bf9e822..d6b155db871 100644 --- a/gnu/usr.bin/cc/libgcov/Makefile +++ b/gnu/usr.bin/cc/libgcov/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/libgcov/Makefile,v 1.6 2009/06/21 01:54:47 kan Exp $ -# $OpenBSD: Makefile,v 1.2 2013/05/18 18:21:39 miod Exp $ +# $OpenBSD: Makefile,v 1.3 2017/06/16 10:25:54 espie Exp $ .include @@ -71,6 +71,8 @@ CLEANFILES += ${COMMONHDRS} CLEANFILES += cs-*.h option* ${OBJS} beforedepend: ${COMMONHDRS} +BUILDFIRST = ${COMMONHDRS} +BUILDAFTER += ${OBJS_T} ${OBJS_P} ${OBJS_S} ${OBJS_T}: libgcov.c ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} diff --git a/gnu/usr.bin/cc/libobjc/Makefile b/gnu/usr.bin/cc/libobjc/Makefile index 1119c7ce4be..c01ba349e89 100644 --- a/gnu/usr.bin/cc/libobjc/Makefile +++ b/gnu/usr.bin/cc/libobjc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/libobjc/Makefile,v 1.34.2.1 2009/08/03 08:13:06 kensmith Exp $ -# $OpenBSD: Makefile,v 1.5 2017/02/15 21:22:53 miod Exp $ +# $OpenBSD: Makefile,v 1.6 2017/06/16 10:25:54 espie Exp $ OBJCDIR=${.CURDIR}/../../../gcc/libobjc GCCDIR= ${.CURDIR}/../../../gcc/gcc @@ -51,6 +51,7 @@ includes: ${INCS} .endif ${OBJS}: ${GENHDRS} +BUILDFIRST = ${GENHDRS} .include diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile index 4e9528a5d9e..4b6fdfb2d70 100644 --- a/lib/libcrypto/Makefile +++ b/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.18 2017/05/29 09:44:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.19 2017/06/16 10:25:54 espie Exp $ LIB= crypto LIBREBUILD=y @@ -440,6 +440,7 @@ SRCS+= wp_block.c .endif all beforedepend: ${GENERATED} +BUILDFIRST = ${GENERATED} .include diff --git a/lib/libcurses/Makefile b/lib/libcurses/Makefile index 60fd7e968dd..0d5dd27aed1 100644 --- a/lib/libcurses/Makefile +++ b/lib/libcurses/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.70 2016/09/16 17:24:20 nicm Exp $ +# $OpenBSD: Makefile,v 1.71 2017/06/16 10:25:54 espie Exp $ # Uncomment this to enable tracing in libcurses #CURSESTRACE=-DTRACE @@ -102,6 +102,8 @@ all: ${GENERATED} beforedepend: ${GENERATED} +BUILDFIRST = ${GENERATED} + includes: @cmp -s ${DESTDIR}/usr/include/ncurses.h ${.CURDIR}/curses.h || \ ${INSTALL} ${INSTALL_COPY} -m 444 -o $(BINOWN) -g $(BINGRP) \ diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile index 8915073db53..157aedf1df3 100644 --- a/lib/libedit/Makefile +++ b/lib/libedit/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.26 2016/05/24 18:06:30 schwarze Exp $ +# $OpenBSD: Makefile,v 1.27 2017/06/16 10:25:54 espie Exp $ # $NetBSD: Makefile,v 1.41 2010/02/03 15:34:43 roy Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 @@ -34,6 +34,7 @@ CLEANFILES+= ${AHDR} fcns.h func.h help.h HOST_SH= sh .depend: ${AHDR} fcns.h func.h help.h +BUILDFIRST = ${AHDR} fcns.h func.h help.h vi.h: vi.c makelist ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \ diff --git a/lib/librpcsvc/Makefile b/lib/librpcsvc/Makefile index 05aadad85fd..09035be9f71 100644 --- a/lib/librpcsvc/Makefile +++ b/lib/librpcsvc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2016/10/16 19:28:44 tb Exp $ +# $OpenBSD: Makefile,v 1.12 2017/06/16 10:25:54 espie Exp $ RPCSRCS= bootparam_prot.x klm_prot.x mount.x nfs_prot.x \ @@ -15,6 +15,8 @@ all: ${HDRS} beforedepend: ${HDRS} prereq: ${HDRS} +BUILDFIRST = ${HDRS} + includes: ${HDRS} ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}/usr/include/rpcsvc diff --git a/sbin/isakmpd/Makefile b/sbin/isakmpd/Makefile index e688a17ca8f..594c7a2401d 100644 --- a/sbin/isakmpd/Makefile +++ b/sbin/isakmpd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.85 2016/09/03 23:14:56 deraadt Exp $ +# $OpenBSD: Makefile,v 1.86 2017/06/16 10:25:54 espie Exp $ # $EOM: Makefile,v 1.78 2000/10/15 21:33:42 niklas Exp $ # @@ -83,5 +83,7 @@ isakmp_num.c isakmp_num.h: genconstants.sh isakmp_num.cst ${PROG} beforedepend: ${GENERATED} +BUILDFIRST = ${GENERATED} + .include .include diff --git a/sbin/wsconsctl/Makefile b/sbin/wsconsctl/Makefile index 7bb9ccfadb0..6ca3c32232f 100644 --- a/sbin/wsconsctl/Makefile +++ b/sbin/wsconsctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.41 2016/05/12 19:17:03 deraadt Exp $ +# $OpenBSD: Makefile,v 1.42 2017/06/16 10:25:54 espie Exp $ .if ${MACHINE} != "octeon" @@ -10,6 +10,7 @@ CPPFLAGS+= -I${.CURDIR} -I. CLEANFILES+= keysym.h y.tab.h beforedepend: keysym.h +keysym.o: keysym.h keysym.h: mkkeysym.sh ${DESTDIR}/usr/include/dev/wscons/wsksymdef.h sh ${.CURDIR}/mkkeysym.sh \ diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile index 66601474909..8f2cc66a976 100644 --- a/usr.bin/awk/Makefile +++ b/usr.bin/awk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2013/08/18 22:06:44 miod Exp $ +# $OpenBSD: Makefile,v 1.15 2017/06/16 10:25:54 espie Exp $ PROG= awk SRCS= ytab.c lex.c b.c main.c parse.c proctab.c tran.c lib.c run.c @@ -13,6 +13,8 @@ ytab.c ytab.h: awkgram.y mv y.tab.c ytab.c mv y.tab.h ytab.h +BUILDFIRST = ytab.h + proctab.c: maketab ./maketab >proctab.c diff --git a/usr.bin/infocmp/Makefile b/usr.bin/infocmp/Makefile index cd9407e9bf2..919cd33d924 100644 --- a/usr.bin/infocmp/Makefile +++ b/usr.bin/infocmp/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2011/06/23 22:46:12 schwarze Exp $ +# $OpenBSD: Makefile,v 1.4 2017/06/16 10:25:54 espie Exp $ PROG= infocmp SRCS= infocmp.c dump_entry.c @@ -12,6 +12,8 @@ CLEANFILES+= termsort.c infocmp.1 beforedepend: termsort.c +dump_entry.o: termsort.c + termsort.c: ${TIC}/MKtermsort.sh sh ${TIC}/MKtermsort.sh awk ${CURSES}/Caps > ${.TARGET} diff --git a/usr.bin/tic/Makefile b/usr.bin/tic/Makefile index 8febec0eae2..e16d2461366 100644 --- a/usr.bin/tic/Makefile +++ b/usr.bin/tic/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2012/09/10 04:03:36 deraadt Exp $ +# $OpenBSD: Makefile,v 1.9 2017/06/16 10:25:54 espie Exp $ PROG= tic SRCS= dump_entry.c tic.c @@ -17,6 +17,8 @@ COPTS+= -O0 beforedepend: termsort.c +dump_entry.o: termsort.c + termsort.c: MKtermsort.sh sh ${.CURDIR}/MKtermsort.sh awk ${CURSES}/Caps > ${.TARGET} diff --git a/usr.bin/tset/Makefile b/usr.bin/tset/Makefile index 816a835c993..312f7528cb8 100644 --- a/usr.bin/tset/Makefile +++ b/usr.bin/tset/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2016/03/30 06:38:46 jmc Exp $ +# $OpenBSD: Makefile,v 1.11 2017/06/16 10:25:54 espie Exp $ PROG= tset SRCS= tset.c dump_entry.c @@ -13,6 +13,8 @@ LINKS= ${BINDIR}/tset ${BINDIR}/reset beforedepend: termsort.c +dump_entry.o: termsort.c + termsort.c: ${TIC}/MKtermsort.sh sh ${TIC}/MKtermsort.sh awk ${CURSES}/Caps > ${.TARGET} diff --git a/usr.sbin/rpc.lockd/Makefile b/usr.sbin/rpc.lockd/Makefile index ff4948a7288..21066266795 100644 --- a/usr.sbin/rpc.lockd/Makefile +++ b/usr.sbin/rpc.lockd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2008/06/13 21:32:26 sturm Exp $ +# $OpenBSD: Makefile,v 1.6 2017/06/16 10:25:54 espie Exp $ PROG = rpc.lockd SRCS = nlm_prot_svc.c lockd.c lockd_lock.c procs.c @@ -20,6 +20,8 @@ nlm_prot_svc.c: ${RPCSRC} nlm_prot.h nlm_prot.h: ${RPCSRC} ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} +BUILDFIRST = nlm_prot.h + test: test.c cc -o test test.c -lrpcsvc diff --git a/usr.sbin/rpc.statd/Makefile b/usr.sbin/rpc.statd/Makefile index 05b4f83e7e1..dbeb428a9b8 100644 --- a/usr.sbin/rpc.statd/Makefile +++ b/usr.sbin/rpc.statd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2008/06/15 04:43:28 sturm Exp $ +# $OpenBSD: Makefile,v 1.2 2017/06/16 10:25:54 espie Exp $ PROG= rpc.statd SRCS= procs.c sm_inter_svc.c statd.c @@ -20,6 +20,8 @@ sm_inter_svc.c: ${RPCSRC} sm_inter.h sm_inter.h: ${RPCSRC} ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} +BUILDFIRST = sm_inter.h + test: ${.CURDIR}/test.c cc -o test ${.CURDIR}/test.c -lrpcsvc diff --git a/usr.sbin/ypserv/ypserv/Makefile b/usr.sbin/ypserv/ypserv/Makefile index 5d39212520c..dbbd288b316 100644 --- a/usr.sbin/ypserv/ypserv/Makefile +++ b/usr.sbin/ypserv/ypserv/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2015/10/26 10:12:46 deraadt Exp $ +# $OpenBSD: Makefile,v 1.13 2017/06/16 10:25:54 espie Exp $ PROG= ypserv MAN= ypserv.acl.5 securenet.5 ypserv.8 @@ -22,6 +22,7 @@ all: ypserv beforedepend: ${HDRS} ypv1.c: ypv1.h +BUILDFIRST = ${HDRS} ypv1.c: ypv1.x rpcgen -C -c ${.CURDIR}/ypv1.x -o ypv1.c -- 2.20.1