mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Support for out-of-tree build
Date: Tue, 8 Dec 2015 19:39:14 -0500	[thread overview]
Message-ID: <20151209003914.GA238@brightrain.aerifal.cx> (raw)
In-Reply-To: <CABBv4TadkNucqKKHK=9SCz2W9rwMtCXRfRYV9naimC9YSwPLTQ@mail.gmail.com>

Sorry it took me a while to get to this (and other pending musl
stuff). Here's my review:

On Tue, Dec 01, 2015 at 02:14:29AM +0000, Petr Hosek wrote:
> On Mon, Nov 30, 2015 at 2:14 PM Rich Felker <dalias@libc.org> wrote:
> 
> > > I'm trying it again now, and I'm still getting an error trying to
> > > build in a fresh out-of-tree dir:
> > >
> > > make: *** No rule to make target `obj/crt/i386/', needed by
> > `obj/crt/crt1.o'.  Stop.
> >
> 
> I've removed the trailing slashes as discussed on IRC and this should work
> now.

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.

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?

> > Manually creating the directory makes the build succeed. I also get,
> > when re-running configure:
> >
> > creating config.mak... ln: ./Makefile: File exists
> > done
> >
> > Not an error, but confusing and not what I would expect.
> >
> 
> I've added a check to configure script.

../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.

Aside from these issues it seems to be okay/working for me. I'd
appreciate comments from anyone else who's tried it.

Rich


  reply	other threads:[~2015-12-09  0:39 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 23:40 Petr Hosek
2015-11-07 13:05 ` Szabolcs Nagy
2015-11-08  0:43   ` Rich Felker
2015-11-08  2:16     ` Szabolcs Nagy
2015-11-08  2:29       ` Rich Felker
2015-11-11 22:02         ` Petr Hosek
2015-11-11 23:08           ` Rich Felker
2015-11-12  0:01             ` Rich Felker
2015-11-12  0:28             ` Petr Hosek
2015-11-12 14:50               ` Szabolcs Nagy
2015-11-12 20:17                 ` Petr Hosek
2015-11-12 20:30                   ` Rich Felker
2015-11-12 21:10                     ` Szabolcs Nagy
2015-11-12 21:52                       ` Rich Felker
2015-11-12 22:35                         ` Petr Hosek
2015-11-12 23:41                           ` Rich Felker
2015-11-17  2:45                             ` Petr Hosek
2015-11-17  6:05                               ` Petr Hosek
2015-11-17 19:51                                 ` Szabolcs Nagy
2015-11-17 21:00                               ` Rich Felker
2015-11-17 21:37                                 ` Petr Hosek
2015-11-17 22:01                                   ` Rich Felker
2015-11-17 22:15                                     ` Petr Hosek
2015-11-17 22:58                                       ` Rich Felker
2015-11-17 23:06                                     ` Szabolcs Nagy
2015-11-17 23:27                                       ` Rich Felker
2015-11-17 23:43                                         ` Rich Felker
2015-11-17 23:54                                           ` Petr Hosek
2015-11-18  0:19                                             ` Szabolcs Nagy
2015-11-18  0:19                                             ` Rich Felker
2015-11-18 20:19                                               ` Petr Hosek
2015-11-18 21:44                                                 ` Rich Felker
2015-11-19  0:22                                                   ` Petr Hosek
2015-11-20  4:09                                                     ` Rich Felker
2015-11-20  5:02                                                       ` Rich Felker
2015-11-20 10:51                                                       ` Szabolcs Nagy
2015-11-30  1:25                                                       ` Petr Hosek
2015-11-20 22:20                                                     ` Rich Felker
2015-11-30  1:29                                                       ` Petr Hosek
2015-11-30  1:35                                                         ` Rich Felker
2015-11-30  2:49                                                           ` Petr Hosek
2015-11-30 21:14                                                             ` Rich Felker
2015-11-30 22:14                                                               ` Rich Felker
2015-12-01  2:14                                                                 ` Petr Hosek
2015-12-09  0:39                                                                   ` Rich Felker [this message]
2015-12-10  1:39                                                                     ` Petr Hosek
2015-12-10 12:47                                                                       ` Szabolcs Nagy
2016-01-17 22:32                                                                       ` Rich Felker
2016-01-17 23:41                                                                         ` Szabolcs Nagy
2016-01-20  3:49                                                                           ` Rich Felker
2015-11-21  1:05                                                     ` Szabolcs Nagy
2015-11-21  1:16                                                       ` Szabolcs Nagy
2015-11-22 14:56                                                     ` Szabolcs Nagy
2015-11-30  1:30                                                       ` Petr Hosek
2015-11-30 12:01                                                         ` Szabolcs Nagy
2015-11-30 22:22                                                           ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151209003914.GA238@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).