[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Factor print_unique
From: |
Akim Demaille |
Subject: |
FYI: Factor print_unique |
Date: |
12 Jun 2001 11:47:36 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Copyleft) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* autoscan.in (&print_unique): Take `$kind' and `$word' as
arguments, to factor indirections into `%macro' and `%used'.
(%generic_macro): Fix a typo.
Index: autoscan.in
===================================================================
RCS file: /cvs/autoconf/autoscan.in,v
retrieving revision 1.49
diff -u -u -r1.49 autoscan.in
--- autoscan.in 2001/06/12 09:33:58 1.49
+++ autoscan.in 2001/06/12 09:44:07
@@ -49,7 +49,7 @@
'functions' => 'AC_CHECK_FUNCS',
'headers' => 'AC_CHECK_HEADERS',
'identifiers' => 'AC_CHECK_TYPES',
- 'programs' => 'AC_CHECK_PROGS'
+ 'programs' => 'AC_CHECK_PROGS',
'libraries' => 'AC_CHECK_LIB'
);
@@ -416,14 +416,18 @@
}
-# print_unique ($MACRO, @WHERE)
-# -----------------------------
-# $MACRO is wanted from $WHERE, hence (i) print $MACRO in $configure_scan
-# if it exists and hasn't been printed already, (ii), remember it's needed.
+# print_unique ($KIND, $WORD)
+# ---------------------------
+# $WORD, of some $KIND, is used, and needs to be checked. (i) output
+# the needed macro invocation in $configure_scan if it exists and
+# hasn't been printed already, (ii), remember this macro needed.
sub print_unique ($@)
{
- my ($macro, @where) = @_;
+ my ($kind, $word) = @_;
+ my $macro = $macro{$kind}{$word};
+ my @where = @{$used{$kind}{$word}};
+
if (defined $macro && !defined $printed{$macro})
{
print CONF "$macro\n";
@@ -441,11 +445,11 @@
print CONF "\n# Checks for programs.\n";
foreach my $word (sort keys %{$used{'programs'}})
{
- print_unique ($macro{'programs'}{$word}, @{$used{'programs'}{$word}});
+ print_unique ('programs', $word);
}
foreach my $word (sort keys %{$used{'makevars'}})
{
- print_unique ($macro{'makevars'}{$word}, @{$used{'makevars'}{$word}});
+ print_unique ('makevars', $word);
}
}
@@ -482,8 +486,7 @@
}
else
{
- print_unique ($macro{'headers'}{$word},
- @{$used{'headers'}{$word}});
+ print_unique ('headers', $word);
}
}
}
@@ -511,8 +514,7 @@
}
else
{
- print_unique ($macro{'identifiers'}{$word},
- @{$used{'identifiers'}{$word}});
+ print_unique ('identifiers', $word);
}
}
}
@@ -540,8 +542,7 @@
}
else
{
- print_unique ($macro{'functions'}{$word},
- @{$used{'functions'}{$word}});
+ print_unique ('functions', $word);
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Factor print_unique,
Akim Demaille <=