autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH] autoupdate and GNU M4 snapshots


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

Hi,

Just as a curiosity, I tried compiling CVS autoconf against a GNU M4
snapshot from ftp.seindal.dk.

I needed the following change, since the output of tracing is slightly
different from GNU M4 1.4.

Here's an example.  With the M4 snapshot, I get

  $ ./autoconf -i --autoconf-dir ../.. --trace 'AU_DEFUN:$f' /dev/null
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../acgeneral.m4
  ../../aclang.m4
  ../../aclang.m4
  ../../aclang.m4
  ../../aclang.m4
[snip]

while with GNU M4 1.4, I get:

  $ env M4=/usr/bin/m4 ./autoconf -i --autoconf-dir ../.. --trace 'AU_DEFUN:$f' 
/dev/null
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  acgeneral.m4
  aclang.m4
  aclang.m4
  aclang.m4
  aclang.m4
[snip]

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.

Attachment: autoconf.diff
Description: handle GNU M4 snapshots

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.

- 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]