From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8950 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Support for out-of-tree build Date: Mon, 30 Nov 2015 17:22:13 -0500 Message-ID: <20151130222213.GX3818@brightrain.aerifal.cx> References: <20151117232711.GG3818@brightrain.aerifal.cx> <20151117234330.GH3818@brightrain.aerifal.cx> <20151118001955.GI3818@brightrain.aerifal.cx> <20151118214452.GQ3818@brightrain.aerifal.cx> <20151122145600.GJ23362@port70.net> <20151130120156.GR23362@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1448922160 10794 80.91.229.3 (30 Nov 2015 22:22:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2015 22:22:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8963-gllmg-musl=m.gmane.org@lists.openwall.com Mon Nov 30 23:22:39 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1a3Wq4-0008II-ME for gllmg-musl@m.gmane.org; Mon, 30 Nov 2015 23:22:28 +0100 Original-Received: (qmail 13607 invoked by uid 550); 30 Nov 2015 22:22:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 13583 invoked from network); 30 Nov 2015 22:22:26 -0000 Content-Disposition: inline In-Reply-To: <20151130120156.GR23362@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8950 Archived-At: On Mon, Nov 30, 2015 at 01:01:57PM +0100, Szabolcs Nagy wrote: > * Petr Hosek [2015-11-30 01:30:30 +0000]: > > On Sun, Nov 22, 2015 at 6:56 AM Szabolcs Nagy wrote: > > > > > * Petr Hosek [2015-11-19 00:22:09 +0000]: > > > > > > > > +$(ALL_LIBS): | lib/ > > > > +$(ALL_TOOLS): | tools/ > > > > +$(CRT_LIBS:lib/%=$(objdir)/crt/%): | $(objdir)/crt/ > > > > +$(OBJS) $(LOBJS): | $(sort $(dir $(OBJS))) > > > > +$(GENH): | $(objdir)/include/bits/ > > > > +$(GENH_INT): | $(objdir)/src/internal/ > > > > + > > > > > > one more comment: > > > tools/ is now used for both sources and outputs, > > > i think it can be used for sources only by moving > > > the tools outputs under obj/ (so tools/ does not > > > need to be created out of tree, only obj/ and lib/) > > > > > > > Do you mean moving the tools output directly to obj/ or obj/tools? > > i think obj/ is ok. > > (i like flatter dir hierarchy if only a small number > of files are involved.) I'm not sure if it makes a difference, but conceptually right now obj is intermediate files for build, and lib and tools contain the actual files intended to be installed. The one exception to this is headers, which are split between the $(srcdir)/include, $(srcdir)/arch/$(ARCH)/bits, and obj/include/bits, making the latter the one installed file from obj. I don't think we have to resolve this at the same time as out-of-tree, but I'd moderately prefer putting all the installable files under one directory structured just like an install prefix, to make it easy to use them in-place without installing. This worked historically with the in-tree build thanks to the (very problematic, otherwise) bits symlink. Rich