Matthew Burgess wrote:
Hi folks,
There's a minor issue with the Makefile in this version.
Essentially, if one uses the current '--prefix=""' then the following
ends up in the logs:
/bin/sh: line 0: [: =: unary operator expected
That's caused by:
Makefile:71: if [ $(prefix) = / ]
In this case, $(prefix) will obviously = "", hence the test doesn't get
a condition on the left-hand side. Additionally, that test failing
results in the manpages being installed to /share/man instead of
/usr/share/man. Now, we can fix this in a couple of ways:
<snip>
3) Change the Makefile to do the following test instead:
if [ "$(prefix)" = / -o "$(prefix)" = "" ];
><snip>
This should still give the 'unary operator expected' message, I would think.
In order to protect against '"$(prefix)" = /' failing, don't you need to
test the null case first?
if [ "$(prefix)" = "" -o "$(prefix)" = / ];
This way, assuming sh skips further OR cases when the first succeeds (as
it should), you won't get the above error because '"$(prefix)" = /' is
never reached. I've never really looked into sh scripting, so I'm not
certain this applies, but it's something for you to consider.
In any case, I think going directly to option 3 is the best route.
Regards,
Jeremy.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page