[EMAIL PROTECTED] on 2000.07.28 02:07:41
>Talking about UNIX (vanilla) Make and GNU Make, I'd say that you're in
>for some fun and games if you try to make this robust against spaces in
>path names by using some general set of rules. It would be possible to
>put quotes around all macro expansions where one path name is known to
>be expanded (as in "$(CLEARTOOL)" in your example). But what do you do
>with $^, for instance?
I guess it would _really_ be a mess if we were to wrap these (ie $^) in double
quotes, too.
>And: Some manipulation functions work on space separated lists of names
>- obviously you'd have to avoid them: $(filter PAT,TEXT), $(addsuffix
>SUF,NAMES), and so on.
Yes, these would have to dealt with. This is enough of a reason for me to try
to change our build standard so as not to place tools into paths with spaces in
them.
>Another caveat: Sometimes it's a good idea to add some option to the
>program name when defining a macro:
> RM = /bin/rm -f
>Now, wrapping the expansion in quotes won't do...
I think the "right" way to do this is:
RM:=/bin/rm
RMFLAGS:=-f -r
target:
"$(RM)" $(RMFLAGS)
I guess not all macros should be wrapped. Only those pertaining to file system
elements.
Thanks,
Noel
This communication is for informational purposes only. It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan & Co. Incorporated, its
subsidiaries and affiliates.