mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
vpath patches (cool job Stig!)
This commit is contained in:
parent
9a66ffbaee
commit
1401cd52fc
@ -865,9 +865,9 @@ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME")
|
||||
PHP_OS=`uname`
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS")
|
||||
|
||||
AC_OUTPUT(Makefile build-defs.h libphp3.module
|
||||
AC_OUTPUT(Makefile libphp3.module
|
||||
scripts/mkextlib regex/Makefile ext/Makefile
|
||||
@@EXT_MAKEFILES@@, [
|
||||
@@EXT_MAKEFILES@@ build-defs.h, [
|
||||
chmod +x scripts/mkextlib
|
||||
], [
|
||||
|
||||
@ -876,7 +876,7 @@ chmod +x scripts/mkextlib
|
||||
echo "creating internal_functions.c"
|
||||
extensions=\`grep '^s.@EXT_SUBDIRS@' \$0|sed -e 's/^.*@% *//' -e 's/%.*$//'\`
|
||||
mv -f internal_functions.c internal_functions.c.old 2>/dev/null
|
||||
perl genif.pl internal_functions.c.in \$extensions > internal_functions.c
|
||||
perl $srcdir/genif.pl $srcdir/internal_functions.c.in \$srcdir \$extensions > internal_functions.c
|
||||
if cmp internal_functions.c.old internal_functions.c > /dev/null 2>&1; then
|
||||
echo "internal_functions.c is unchanged"
|
||||
mv internal_functions.c.old internal_functions.c
|
||||
|
27
genif.pl
27
genif.pl
@ -1,23 +1,24 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$in_file = shift || die "Give .in file as first parameter";
|
||||
$srcdir = shift || die "Give source dir as second parameter";
|
||||
@extensions = @ARGV;
|
||||
|
||||
open(IN, $in_file) or die "Could not open .in file $in_file";
|
||||
while (<IN>) {
|
||||
if (/\@EXT_INCLUDE_CODE\@/) {
|
||||
foreach $ext (@extensions) {
|
||||
$hdr_file = "ext/$ext/php3_${ext}.h";
|
||||
if (-f $hdr_file) {
|
||||
print "#include \"ext/${ext}/php3_${ext}.h\"\n";
|
||||
}
|
||||
if (/\@EXT_INCLUDE_CODE\@/) {
|
||||
foreach $ext (@extensions) {
|
||||
$hdr_file = "ext/$ext/php3_${ext}.h";
|
||||
if (-f "$srcdir/$hdr_file") {
|
||||
print "#include \"ext/${ext}/php3_${ext}.h\"\n";
|
||||
}
|
||||
}
|
||||
} elsif (/\@EXT_MODULE_PTRS\@/) {
|
||||
foreach $ext (@extensions) {
|
||||
print " phpext_${ext}_ptr,\n";
|
||||
}
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
} elsif (/\@EXT_MODULE_PTRS\@/) {
|
||||
foreach $ext (@extensions) {
|
||||
print " phpext_${ext}_ptr,\n";
|
||||
}
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
}
|
||||
close(IN);
|
||||
|
Loading…
Reference in New Issue
Block a user