help-make
[Top][All Lists]
Advanced

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

Allowing spaces in macro call?


From: Peng Yu
Subject: Allowing spaces in macro call?
Date: Wed, 18 Aug 2010 15:28:28 -0500

Hi,

According the manual, it advises not to use spaces or newline in macro
call like the following. But I feel that it is irritating not to allow
spaces and newlines, because allowing them could make my Makefile more
readable.

$(eval $(call some_macro,arg1,arg2))

I found that if I use $$(strip $1) instead of barely $1 in the
definition of the macro, then the macro call is able to accept spaces
and newlines. But it is tedious to add $$(strip each time in front of
the occurrence of  $1. I'm wondering if there is any option to
globally enable the striping of $1, $2,... for all arguments. If it is
not there in GNU Make, could it be added as an command option, or
better, added as a derivative (just like derivatives "use warnings;"
in perl, to change the behavior of a single Makefile). Or there might
be a better solution to this problem?

-- 
Regards,
Peng



reply via email to

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