|
From: | Tim Murphy |
Subject: | Re: Quoting special characters (was: Re: Possible solution for special characters in makefile paths) |
Date: | Tue, 25 Feb 2014 19:07:18 +0000 |
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/
[Prev in Thread] | Current Thread | [Next in Thread] |