From 4de5cb063668bce6690d7ff1f0af6e46616836a5 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 14 Jun 2012 23:45:08 +0200 Subject: [PATCH] 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 --- automake.in | 8 -------- 1 file changed, 8 deletions(-) diff --git a/automake.in b/automake.in index e5f95ee..b67deca 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. -- 2.7.4