From owner-svn-src-all@freebsd.org Wed Nov 25 20:38:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD25BA374F4; Wed, 25 Nov 2015 20:38:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F35217E5; Wed, 25 Nov 2015 20:38:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPKcHfU018994; Wed, 25 Nov 2015 20:38:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPKcHQZ018989; Wed, 25 Nov 2015 20:38:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252038.tAPKcHQZ018989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 20:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291330 - in head: gnu/lib/libreadline/readline lib/libc/tests/rpc usr.bin/kdump usr.bin/netstat usr.bin/svn/svn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 20:38:18 -0000 Author: bdrewery Date: Wed Nov 25 20:38:17 2015 New Revision: 291330 URL: https://svnweb.freebsd.org/changeset/base/291330 Log: Replace DPSRCS that work fine in SRCS. This is so that 'make depend' is not a required build step in these files. DPSRCS is overall unneeded. DPSRCS already contains SRCS, so anything which can safely be in SRCS should be. DPSRCS is mostly just a way to generate files that should not be linked into the final PROG/LIB. For headers and grammars it is safe for them to be in SRCS since they will be excluded during linking and installation. The only remaining uses of DPSRCS are for generating .c or .o files that must be built before 'make depend' can run 'mkdep' on the SRCS c files list. A semi-proper example is in tests/sys/kern/acct/Makefile where a checked-in .c file has an #include on a generated .c file. The generated .c file should not be linked into the final PROG though since it is #include'd. The more proper way here is just to build/link it in though without DPSRCS. Another example is in sys/modules/linux/Makefile where a shell script runs to parse a DPSRCS .o file that should not be linked into the module. Beyond those, the need for DPSRCS is largely unneeded, redundant, and forces 'make depend' to be ran. Generally, these Makefiles should avoid the need for DPSRCS and define proper dependencies for their files as well. An example of an improper usage and why this matters is in usr.bin/netstat. nl_defs.h was only in DPSRCS and so was not generated during 'make all', but only during 'make depend'. The files including it lacked proper depenencies on it, which forced running 'make depend' to workaround that bug. The 'make depend' target should mostly be used for incremental build help, not to produce a working build. This specific example was broken in the meta build until r287905 since it does not run 'make depend'. The gnu/lib/libreadline/readline case is fine since bsd.lib.mk has 'OBJS: SRCS:M*.h' when there is no .depend file. Sponsored by: EMC / Isilon Storage Division MFC after: 1 week Modified: head/gnu/lib/libreadline/readline/Makefile head/lib/libc/tests/rpc/Makefile head/usr.bin/kdump/Makefile head/usr.bin/netstat/Makefile head/usr.bin/svn/svn/Makefile Modified: head/gnu/lib/libreadline/readline/Makefile ============================================================================== --- head/gnu/lib/libreadline/readline/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/gnu/lib/libreadline/readline/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -16,9 +16,8 @@ INSTALLED_HEADERS= readline.h chardefs.h CFLAGS+= -I${.OBJDIR}/.. SRCDIR= ${.CURDIR}/../../../../contrib/libreadline -beforebuild: ${INSTALLED_HEADERS} CLEANFILES+= ${INSTALLED_HEADERS} -DPSRCS+= ${INSTALLED_HEADERS} +SRCS+= ${INSTALLED_HEADERS} .for _h in ${INSTALLED_HEADERS} ${_h}: ${SRCDIR}/${_h} .NOMETA Modified: head/lib/libc/tests/rpc/Makefile ============================================================================== --- head/lib/libc/tests/rpc/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/lib/libc/tests/rpc/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -16,7 +16,7 @@ h_testbits_xdr.c: ${RPCSRC} h_testbits.h CLEANFILES+= ${RPCSRC:.x=.h} ${RPCSRC:.x=.c} h_testbits_xdr.c CFLAGS+= -I${.OBJDIR} -DPSRCS+= h_testbits.h +SRCS+= h_testbits.h LDADD+= -lrpcsvc -lutil DPADD+= ${LIBRPCSVC} ${LIBUTIL} Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/usr.bin/kdump/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -6,8 +6,7 @@ .PATH: ${.CURDIR}/../ktrace PROG= kdump -SRCS= kdump_subr.c kdump.c ioctl.c subr.c utrace.c -DPSRCS= kdump_subr.h +SRCS= kdump_subr.c kdump_subr.h kdump.c ioctl.c subr.c utrace.c CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MK_CASPER} != "no" Modified: head/usr.bin/netstat/Makefile ============================================================================== --- head/usr.bin/netstat/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/usr.bin/netstat/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -6,8 +6,7 @@ PROG= netstat SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c nl_symbols.c route.c \ unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c \ - flowtable.c -DPSRCS= nl_defs.h + flowtable.c nl_defs.h nl_symbols.c: nlist_symbols awk '\ Modified: head/usr.bin/svn/svn/Makefile ============================================================================== --- head/usr.bin/svn/svn/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/usr.bin/svn/svn/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -52,7 +52,7 @@ DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${L CLEANFILES+= svnlite.1 .if(defined(ORGANIZATION) && !empty(ORGANIZATION)) -DPSRCS+= freebsd-organization.h +SRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h CFLAGS+= -I. -DHAS_ORGANIZATION_NAME freebsd-organization.h: