autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] autoupdate and GNU M4 snapshots


From: Raja R Harinath
Subject: Re: [PATCH] autoupdate and GNU M4 snapshots
Date: 13 Mar 2001 13:05:16 -0600
User-agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/21.0.99

Akim Demaille <address@hidden> writes:
> | Here's one alternative.
> | 
> | from  Raja R Harinath  <address@hidden>
> | 
> |       * autoupdate.in (File::Basename): Use package.
> |       (ac_macros): Save only base filenames.
> |       (au_macros): Likewise.
> 
> Thanks, applied!

Thanks.
 
> | BTW, I think it may be nicer to code the loop as:
> | 
> |   my (%macros);
> |   while (<MACROS>) 
> |     {
> |       chomp;
> |       /^(AC|AU):(.*):([^:]*)$/ or next;
> |       macros{$1}{$3] = basename ($2);
> |     }
> |   # ...
> |   delete macros{AC}{$_} foreach (keys %{ $macros{AU} });
> | 
> | This way, you may be able to distinguish between m4sugar.m4 macros and
> | ac*.m4 macros (say, by collecting them in macros{m4}{...}), and not
> | rely on the slightly more brittle dependence on the filename.
> 
> Hm, I'm not sure I understand well your proposal.  But patches will be
> gladly accepted :)

I just meant that a two dimensional hash may be more readable than
having two separate hashes.  Once you have that, it is somewhat more
scalable to classifying on more categories, assuming autoconf --trace
can generate those categories.  In particular, if autoconf --trace
could mark m4sugar macros with something other than AC and AU, then
the problem my patch addressed may not have occured.

> BTW, you seem to have some insight in Perl.  

Unfortunately, no.  I'm just another Perl newbie :-)

- Hari
-- 
Raja R Harinath ------------------------------ address@hidden
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



reply via email to

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