bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excessive $(strip)


From: Gisle Vanem
Subject: Excessive $(strip)
Date: Wed, 2 Apr 2014 14:10:47 +0200

I'm a happy user of the $(file) function and multiline macros/variables
likes this:
..
define FOO_PACKAGE
 exec_prefix=$(FOO_ROOT)
 libdir=$${exec_prefix}/lib
 includedir=$${exec_prefix}/inc
 Version: $(FOO_VERSION)
 Libs: $${libdir}/$(FOO_LIB)
endef

write_pkg:
 $(file > ./foo.pc, $(strip $(FOO_PACKAGE)))

Since I suspect some older pkgconfig programs doesn't like the leading
spaces in foo.pc, I'm using $(strip). But this also removes the newlines. My make-manual documents that "white space" gets stripped off. IMHO make 4.x has a too strict definition of white-space. Or have I misunderstood how $(strip) is supposed to work?

But I could always have 'define FOO_PACKAGE'
without the leading spaces and do:

write_pkg:
$(file > ./foo.pc,$(FOO_PACKAGE))

But I prefer the nice indent.

--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]