automake: stop supporting "%KEY?iftrue:iffalse%" transforms
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 14 Jun 2012 21:45:08 +0000 (23:45 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 14 Jun 2012 21:45:08 +0000 (23:45 +0200)
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 <stefano.lattarini@gmail.com>
automake.in

index e5f95ee..b67deca 100644 (file)
@@ -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.