From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9142 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: Sun, 17 Jan 2016 17:32:48 -0500 Message-ID: <20160117223247.GK238@brightrain.aerifal.cx> References: <20151120222000.GA3818@brightrain.aerifal.cx> <20151130013555.GT3818@brightrain.aerifal.cx> <20151130211432.GV3818@brightrain.aerifal.cx> <20151130221412.GW3818@brightrain.aerifal.cx> <20151209003914.GA238@brightrain.aerifal.cx> 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 1453069986 17189 80.91.229.3 (17 Jan 2016 22:33:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2016 22:33:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9155-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jan 17 23:33:06 2016 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 1aKvsf-0002Rx-Ry for gllmg-musl@m.gmane.org; Sun, 17 Jan 2016 23:33:05 +0100 Original-Received: (qmail 20319 invoked by uid 550); 17 Jan 2016 22:33:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 20267 invoked from network); 17 Jan 2016 22:33:01 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9142 Archived-At: On Thu, Dec 10, 2015 at 01:39:44AM +0000, Petr Hosek wrote: > On Tue, Dec 8, 2015 at 4:39 PM Rich Felker wrote: > > > I get: > > > > make: *** No rule to make target `obj/include/bits', needed by > > `obj/include/bits/alltypes.h'. Stop. > > > > I think this is because $(dir...) intentionally leaves the trailing > > slash, so you have to remove it to get the desired behavior. > > > > I'm not sure why I don't see the same behavior in my setting, but I used > make -p and you're correct, $(dir ...) leaves the trailing slashes. > > > > First I tried: > > > > OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(OBJS) > > $(GENH) $(GENH_INT))) $(addprefix obj/, crt crt/$(ARCH) include)) > > > > but this does not seem to be sufficient, because of: > > > > $(OBJS) $(LOBJS): | $(sort $(dir $(OBJS))) > > > > Adding patsubst there would work too, but I wonder if it even makes > > sense to have fine-grained dir dependencies, rather than just making > > all the targets in this section of the makefile depend on $(OBJ_DIRS). > > Thoughts? > > > > I've used the approach you suggested yesterday over IRC which simplifies > the Makefile a bit. > > > > ../configure: Makefile already exists in the working directory > > > > This isn't what I would expect either. Normally you want to be able to > > re-run configure with different options. There's probably a little bit > > of subtlety here because we would like to avoid overwriting an actual > > file (if somebody copied and edited a makefile here) but happily > > replace a symlink. > > > > I've expanded the check to cover both the existing file and symlink case. > > > > Aside from these issues it seems to be okay/working for me. I'd > > appreciate comments from anyone else who's tried it. > > > > I've been using the previous version in my setup for about two weeks now > and haven't found any further issue but I'd like to hear from others if > they found any issues. Hi again Petr! Sorry it's taken so long to get around to actually committing this. I've had a lot keeping me busy aside from musl, and was waiting both to get some feedback from other users and to have a good chance to try it out in real-world usage myself. The good news is that everything looks fine. I've got my own foreign-arch builds all converted over to build from my main source tree, which is going to greatly reduce my frustration of having in-progress cruft (that was later finished elsewhere) sitting around in different cloned trees. As such I've committed/pushed your patch. If anything else turns up that should be fixed/improved that can be done later but I'm quite happy with what we've got now. Thanks for all your work on it and your patience with the process. Rich