automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introduce and use the %KEY?TRUE:FALSE% template token


From: Akim Demaille
Subject: Re: Introduce and use the %KEY?TRUE:FALSE% template token
Date: Mon, 19 Nov 2007 15:29:50 +0100


| # This program is free software; you can redistribute it and/or modify | # it under the terms of the GNU General Public License as published by | -# the Free Software Foundation; either version 3, or (at your option) | +# the Free Software Foundation; either version 2, or (at your option)
|  # any later version.

Sorry, that won't work.

Sure, fixed.  Sorry for the overlooking.



|  # transform($TOKEN, \%PAIRS)
| -# ==========================
| +# ===========================

Huh?

Due to the smashing of white spaces: the patch actually
puts a space between transform and (.

|  # If ($TOKEN, $VAL) is in %PAIRS:
| -#   - replaces %$TOKEN% with $VAL,
| -#   - enables/disables ?$TOKEN? and ?!$TOKEN?,
| -#   - replaces %?$TOKEN% with TRUE or FALSE.
| +#   - 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.

Sure you don't rather want this?

# - replaces %KEY?IFTRUE:%, %KEY?:IFFALSE%, and %KEY? IFTRUE:IFFALSE% with
 #     IFTRUE / IFFALSE, as appropriate.

(and adjusted code, of course).  Just a thought, though.

As you like. In that case it's just the same operator with IFTRUE
/IFFALSE that can be empty.  I found it lighter with the previous
syntax, but I don't care much.

Your patch messes up indentation in this function, several places.

I know, but Automake is actually quite messy: shouldn't spaces
be normalized to tabs when possible?  Because of this, I used
diff -w, hence the weird result.

FWIW, the multiple meanings of ? and other characters in perl regexes
make them really difficult to read, IMVHO.  Not your fault, of course.

That's why I started to use /x to make it more readable.

Otherwise fine with me. Please rebase against master before committing
(to avoid a merge commit), thanks.

Err...  I'll have to wait to have BenoƮt with me to do that :)
Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]