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: Ralf Wildenhues
Subject: Re: Introduce and use the %KEY?TRUE:FALSE% template token
Date: Mon, 19 Nov 2007 13:07:17 +0100
User-agent: Mutt/1.5.17 (2007-11-13)

Hello Akim,

* Akim Demaille wrote on Mon, Nov 19, 2007 at 06:26:03AM CET:
>
> I would like to work a bit on the install targets, and before
> starting I felt that some means to factor and to make template
> files more readable were lacking.  I propose the following.

| --- a/automake.in
| +++ b/automake.in
| @@ -11,7 +11,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S 
"$0" "$@";; esac'
|  
|  # 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.

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

Huh?

|  # 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.

|  sub transform($$)

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

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

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

Cheers,
Ralf




reply via email to

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