Date: Thu, 12 Jun 2014 18:01:47 -0700 From: Garrett Cooper <yaneurabeya@gmail.com> To: Jilles Tjoelker <jilles@stack.nl> Cc: "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org> Subject: Re: build Kyuafile.auto during buildworld, not installworld Message-ID: <CAGHfRMD1Wv9Ls3DvK9zPL=SWgJT5a4NoGKDJEye7KsKf81nKFg@mail.gmail.com> In-Reply-To: <20140517132614.GA85230@stack.nl> References: <20140517132614.GA85230@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 17, 2014 at 6:26 AM, Jilles Tjoelker <jilles@stack.nl> 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 <bsd.progs.mk> > -.elif !empty(FILES) > +.endif > +# <bsd.progs.mk> may or may not include <bsd.files.mk>. > +.if !empty(FILES) && !target(buildfiles0) > .include <bsd.files.mk> > .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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGHfRMD1Wv9Ls3DvK9zPL=SWgJT5a4NoGKDJEye7KsKf81nKFg>