summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorBrian Havard <bjh@apache.org>2000-12-05 14:55:16 +0000
committerBrian Havard <bjh@apache.org>2000-12-05 14:55:16 +0000
commit96f4d258d364aac277037338efbc5978a9abec45 (patch)
tree575c35fe717371fb58c7a7a1ab15dad8e0201391 /helpers
parent6c1e8b1e10f368f90b404b53faafbfea7924ca72 (diff)
downloadapr-96f4d258d364aac277037338efbc5978a9abec45.tar.gz
Handle nested macros properly when generating export list.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/make_export.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/helpers/make_export.pl b/helpers/make_export.pl
index 461fab93e..7f2be6931 100755
--- a/helpers/make_export.pl
+++ b/helpers/make_export.pl
@@ -18,6 +18,7 @@ while ($srcfile = shift(@ARGV)) {
my $line;
my $count;
my $found;
+ my @macro_stack;
open (FILE, $srcfile) || die "Can't open $srcfile\n";
# print STDERR "Reading \"$srcfile\"\n";
@@ -34,6 +35,7 @@ while ($srcfile = shift(@ARGV)) {
if (/\#if(def)? (APR_.*)/) {
$count++;
$found++;
+ push @macro_stack, $macro;
$macro = $2;
$line .= "$macro\n";
next;
@@ -54,6 +56,7 @@ while ($srcfile = shift(@ARGV)) {
if ($count > 0) {
$count--;
$line .= "\/$macro\n";
+ $macro = pop @macro_stack;
}
if ($found == $count + 1) {
$found--;