[Live-devel] liveMedia/FreeBSD : compilation fails on ar command

Warren Young warren at etr-usa.com
Thu May 31 15:56:18 PDT 2012


On 5/18/2012 3:26 AM, Ross Finlayson wrote:
>> I solved the ar issue the following solution :
>> In Makefile.tail, I added a space in the line
>> $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \
>> between $(LIBRARY_LINK) and $@...
>
> But you shouldn't have to do this, because the space is already present
> - at the end of the "LIBRARY_LINK" line in the "config.freebsd" file.

This is a GNU vs BSD make issue.  'make' is BSD make by default on 
FreeBSD, and it doesn't preserve trailing whitespace when assigning to a 
variable.  GNU make does.  Attached is a simple testcase showing this. 
You may have 'make' aliased to 'gmake' on FreeBSD, which would explain 
why you haven't seen this problem.

POSIX doesn't say what make must do with this (http://goo.gl/Xi4b8). 
SUSv4 appears to have copied that text exactly.  (http://goo.gl/GQ5EZ)

GNU make's manual does document the behavior, saying "...trailing space 
characters are not stripped from variable values..." in section 6.2. 
But, BSD make's manpage neither agrees nor disagrees with this; it's 
left unspecified.

The potto book (http://goo.gl/lk1is) documents the GNU make behavior on 
p.45, but as of the 3rd edition the book dropped coverage of non-GNU 
makes.  I may still have a 2nd edition copy at home, but I'll probably 
forget to check. :)

I think you should accept the patch, Ross.  The current way appears to 
rely on behavior specific to GNU make.
-------------- next part --------------
TEST = seven 

test:
	echo "$(TEST)" > test
	wc -c test


More information about the live-devel mailing list