From owner-freebsd-testing@FreeBSD.ORG Sat May 17 13:26:18 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A1B61DF; Sat, 17 May 2014 13:26:18 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 21198215A; Sat, 17 May 2014 13:26:18 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id D6BC5358C62; Sat, 17 May 2014 15:26:14 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id C2C5D28497; Sat, 17 May 2014 15:26:14 +0200 (CEST) Date: Sat, 17 May 2014 15:26:14 +0200 From: Jilles Tjoelker To: freebsd-testing@freebsd.org Subject: build Kyuafile.auto during buildworld, not installworld Message-ID: <20140517132614.GA85230@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 13:26:18 -0000 For some time, I have needed local hacks to make installworld work with a read-only /usr/obj (over NFS). It is also philosophically wrong to build things during installworld. I found two bugs that cause FILES not to be built during buildworld: * bsd.files.mk does not create its buildfiles target when a buildfiles target already exists from bsd.subdir.mk. * bsd.progs.mk does not include bsd.files.mk if an install target already exists (otherwise it does). The below patch appears to fix both problems in a somewhat ugly way. Index: share/mk/bsd.files.mk =================================================================== --- share/mk/bsd.files.mk (revision 266086) +++ share/mk/bsd.files.mk (working copy) @@ -6,11 +6,10 @@ FILESGROUPS?= FILES -.if !target(buildfiles) +buildfiles: buildfiles0 .for group in ${FILESGROUPS} -buildfiles: ${${group}} +buildfiles0: ${${group}} .endfor -.endif all: buildfiles Index: share/mk/bsd.test.mk =================================================================== --- share/mk/bsd.test.mk (revision 266086) +++ share/mk/bsd.test.mk (working copy) @@ -82,7 +82,9 @@ .if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS) .include -.elif !empty(FILES) +.endif +# may or may not include . +.if !empty(FILES) && !target(buildfiles0) .include .endif -- Jilles Tjoelker