Jeremy Byron wrote:
Matthew Burgess wrote:

3) Change the Makefile to do the following test instead:

if [ "$(prefix)" = / -o "$(prefix)" = "" ];

This should still give the 'unary operator expected' message, I would think.

Nope, for once I did actually test this before proposing it :-)

In order to protect against '"$(prefix)" = /' failing, don't you need to test the null case first?

if [ "$(prefix)" = "" -o "$(prefix)" = / ];

Nope, what happens is in the current Makefile, the $(prefix) gets expanded as follows:

if [ = / ]; # hence the unary operator error

With the fix, "$(prefix)" gets expanded as follows:

if [ "" = / ]; # now we've got two operators, so `sh' is happy

In any case, I think going directly to option 3 is the best route.

Yep, I'm preparing a patch as we speak, to test the waters with upstream.

Thanks,

Matt.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to