Re: Quoting special characters (was: Re: Possible solution for special characters in makefile paths)

Tim Murphy <[email protected]>
Newsgroups gmane.comp.gnu.make.devel
Message-ID <CACJSg6nJoXRDx3ravM-KNFCuT0h8mdNQnYqBeqr7VOCP1JbRPA@mail.gmail.com>
Quick summary for me:
* $[] has something to be said for it as being short and for having
expected special behaviour.
* $(quote) uses no extra special characters but has to have slightly
odd behaviour to work.
* $(file a file name.txt) appeals only to me.
* $(" a string) might appeal to someone.
'* clever' backslash behaviour descends into nightmarish complexity.


dir1:=$[a dir]
dir2:=$[other dir]

file:=$(dir1)/$(dir2)/$[a file]
# file is $[a dir]/$[other dir]/$[a file]

$(file): # quote expansion done as last step
   gcc -o "$@" fred.c # quote expansion done as last step

# could one do this?  i.e. expansion within quoted stuff?
# personally rather not but perhaps there is a reason?
fulldir:=$[$(dir1)/$(dir2)/yet another dir]
# what about:
fulldir=$[$(dir1)/$(dir2)/yet another dir]

source:=$(wildcard $[a path/*.c]) - the notional $1 of wildcard must
be "a path/*.c"

S:=$(shell md5sum "$[a path/a file]")

So presumably after expansion of variables the step to tokenise the
flat string has to consider $[...] to be one token and then each token
has to be quote-expanded.


Regards,

Tim
-- 
You could help some brave and decent people to have access to
uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.