From: Stefano Lattarini Date: Thu, 14 Jun 2012 21:45:08 +0000 (+0200) Subject: automake: stop supporting "%KEY?iftrue:iffalse%" transforms X-Git-Tag: v1.12b~123^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de5cb063668bce6690d7ff1f0af6e46616836a5;p=thirdparty%2Fautomake.git automake: stop supporting "%KEY?iftrue:iffalse%" transforms And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%" as well. They are convoluted, never used (after the previous change), and will get in the way in the Automake-NG branch, where we'll soon want to use GNU make static pattern rules in our internal '*.am' fragments. * automake.in (preprocess_file, transform): Simplify not to support those transform patterns. Signed-off-by: Stefano Lattarini --- diff --git a/automake.in b/automake.in index e5f95ee64..b67deca29 100644 --- a/automake.in +++ b/automake.in @@ -6800,8 +6800,6 @@ sub transform_token ($$$) # - replaces %KEY% with $VAL, # - enables/disables ?KEY? and ?!KEY?, # - replaces %?KEY% with TRUE or FALSE. -# - replaces %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE% with -# IFTRUE / IFFALSE, as appropriate. sub transform ($$) { my ($token, $transform) = @_; @@ -6813,11 +6811,6 @@ sub transform ($$) { return transform_token ($token, $transform, $1); } - # %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE%. - elsif ($token =~ /^%([\w\-]+)(?:\?([^?:%]+))?(?::([^?:%]+))?%$/) - { - return transform_token ($token, $transform, $1) ? ($2 || '') : ($3 || ''); - } # %?KEY%. elsif ($token =~ /^%\?([\w\-]+)%$/) { @@ -6895,7 +6888,6 @@ sub preprocess_file ($%) # Substitute Automake template tokens. s/(?: % \?? [\w\-]+ % - | % [\w\-]+ (?:\?[^?:%]+)? (?::[^?:%]+)? % | \? !? [\w\-]+ \? )/transform($&, \%transform)/gex; # transform() may have added some ##%-comments to strip.