You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by ra...@apache.org on 2003/06/16 07:54:11 UTC
cvs commit: httpd-apreq-2/win32 Configure.pl libapreq_cgi.def mod_apreq.def
randyk 2003/06/15 22:54:11
Modified: win32 Configure.pl
Removed: win32 libapreq_cgi.def mod_apreq.def
Log:
- generate def files through Configure.pl, until a more
general solution is found.
Revision Changes Path
1.5 +31 -2 httpd-apreq-2/win32/Configure.pl
Index: Configure.pl
===================================================================
RCS file: /home/cvs/httpd-apreq-2/win32/Configure.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Configure.pl 16 Jun 2003 02:51:28 -0000 1.4
+++ Configure.pl 16 Jun 2003 05:54:11 -0000 1.5
@@ -59,7 +59,7 @@
}
close $make;
-
+generate_defs();
print << 'END';
@@ -73,7 +73,7 @@
END
if ($doxygen) {
print << 'END';
- nmake docs - build documents
+ nmake docs - builds documents
END
}
@@ -166,6 +166,35 @@
return "$base.$ext" if -x "$base.$ext";
}
}
+}
+
+sub generate_defs {
+ my $preamble =<<'END';
+LIBRARY
+
+EXPORTS
+
+END
+ chdir '../env';
+ my $match = qr{^apreq_env};
+ foreach my $file(qw(mod_apreq libapreq_cgi)) {
+ my %fns = ();
+ open my $fh, "<$file.c"
+ or die "Cannot open env/$file.c: $!";
+ while (<$fh>) {
+ next unless /^APREQ_DECLARE\([^\)]+\)\s*(\w+)/;
+ my $fn = $1;
+ $fns{$fn}++ if $fn =~ /$match/;
+ }
+ close $fh;
+ open my $def, ">../win32/$file.def"
+ or die "Cannot open win32/$file.def: $!";
+ print $def $preamble;
+ print $def $_, "\n" for (sort keys %fns);
+ print $def "apreq_env\n";
+ close $def;
+ }
+
}
__DATA__