Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABBv4Tbk2Uj-p-tMC=CKPa4=Ki7bfT73O98nPYn0HtgPjqosNQ@mail.gmail.com>
Date: Thu, 10 Dec 2015 01:39:44 +0000
From: Petr Hosek <phosek@...omium.org>
To: musl@...ts.openwall.com
Subject: Re: Support for out-of-tree build

On Tue, Dec 8, 2015 at 4:39 PM Rich Felker <dalias@...c.org> 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.

Content of type "text/html" skipped

View attachment "support-out-of-tree-build.patch" of type "text/x-patch" (14870 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.