[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Excessive $(strip)
From: |
Martin Dorey |
Subject: |
RE: Excessive $(strip) |
Date: |
Wed, 2 Apr 2014 18:02:21 +0000 |
> this also removes the newlines.
...
> IMHO make 4.x has a too strict definition of white-space.
http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap07.html sayeth:
"In the POSIX locale, at a minimum, the <space>, <form-feed>, <newline>,
<carriage-return>, <tab>, and <vertical-tab> shall be included."
Case closed?
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Gisle Vanem
Sent: Wednesday, April 02, 2014 05:11
To: address@hidden
Subject: Excessive $(strip)
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
_______________________________________________
Bug-make mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-make