From owner-freebsd-testing@FreeBSD.ORG Fri Jun 13 01:01:47 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 C9F96DC9 for ; Fri, 13 Jun 2014 01:01:47 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B5E62D41 for ; Fri, 13 Jun 2014 01:01:47 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id rl12so1854840iec.39 for ; Thu, 12 Jun 2014 18:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6Hntx9OwxLZ6HGxhacJr1b/kdOkplKOfvSoSiMylJM8=; b=Zf8/Pw36rYheh3XYuC6fak6GrBYkNbQqKs0P6HwabAL5+55Sy9MYEMVkJ9daGXaApe gaU0WVXzW6em9D6O0YC3yHLXrkjgHUr+PueauDDwOxQ5JWFCxkhM4m39q89WLz0Jx6Wo gGxBS3P5c1Wz0du0JZbg62G94FplCAaXm24d9+cpXMOq3+KaG1H/HrUoTeWZXA/sGRby AYSgB9V0AN1xnVXTBgZ1Xb1wnxk53udiOEBxHCK0H9MlElgjJIKmdrwxAumq/dZxDWoS bZvEWOzeLnFTBGRHJjhECROezzM1QBB1l3tyZ/mNeKNHs5qtf0yfZt2WqAkXR2W+CcsG 2kVQ== MIME-Version: 1.0 X-Received: by 10.42.185.73 with SMTP id cn9mr51075094icb.6.1402621307076; Thu, 12 Jun 2014 18:01:47 -0700 (PDT) Received: by 10.50.28.198 with HTTP; Thu, 12 Jun 2014 18:01:47 -0700 (PDT) In-Reply-To: <20140517132614.GA85230@stack.nl> References: <20140517132614.GA85230@stack.nl> Date: Thu, 12 Jun 2014 18:01:47 -0700 Message-ID: Subject: Re: build Kyuafile.auto during buildworld, not installworld From: Garrett Cooper To: Jilles Tjoelker Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-testing@freebsd.org" 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: Fri, 13 Jun 2014 01:01:47 -0000 On Sat, May 17, 2014 at 6:26 AM, Jilles Tjoelker wrote: > 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 I would probably just remove the .if !target(buildfiles) part. I'd make sure to do an -exp run with this though. > 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 I would just check for `!empty(FILES)` personally. I find it more annoying how with some versions of make/versions of share/mk it would install FILES multiple times (probably needs a sentinel somewhere, like bsd.progs.mk...). Thanks! -Garrett