diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-11-02 23:25:49 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-08-21 00:13:02 +0200 |
commit | 82b73fd1e3c53228bb31b75a446114b5fd0cd240 (patch) | |
tree | 541b54210a2c903f38478f06760b1766a2170454 /build | |
parent | a3eed5fbfe24368726906f425b15ce40b5fc36e0 (diff) | |
download | php-git-82b73fd1e3c53228bb31b75a446114b5fd0cd240.tar.gz |
Remove assumption that extensions are in ext/ext-name
Fixes also a weird ln (symlink) hack for phpdbg
Diffstat (limited to 'build')
-rwxr-xr-x | build/config-stubs | 4 | ||||
-rw-r--r-- | build/genif.sh | 3 | ||||
-rw-r--r-- | build/order_by_dep.awk | 14 |
3 files changed, 13 insertions, 8 deletions
diff --git a/build/config-stubs b/build/config-stubs index 28208085a7..765eb541b0 100755 --- a/build/config-stubs +++ b/build/config-stubs @@ -4,5 +4,7 @@ dir=$1; shift for stubfile in $dir/*/config0.m4 $dir/*/config.m4 $dir/*/config9.m4; do - echo "sinclude($stubfile)" + echo "config_m4_src=$stubfile +config_m4_dir=`dirname $stubfile` +sinclude($stubfile)" done diff --git a/build/genif.sh b/build/genif.sh index 14e19b7d9a..2ca2e6de7c 100644 --- a/build/genif.sh +++ b/build/genif.sh @@ -24,7 +24,8 @@ cd $srcdir module_ptrs="$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk`" for ext in ${1+"$@"} ; do - header_list="$header_list ext/$ext/*.h*" + ext_dir="$( cut -d ';' -f 2 <<< "$ext" )" + header_list="$header_list $ext_dir/*.h*" done includes=`$awk -f ./build/print_include.awk $header_list` diff --git a/build/order_by_dep.awk b/build/order_by_dep.awk index 0fdd960652..66f59bacd6 100644 --- a/build/order_by_dep.awk +++ b/build/order_by_dep.awk @@ -6,12 +6,12 @@ BEGIN { SUBSEP=":"; } -function get_deps(module_name, depline, cmd) +function get_deps(module_name, module_dir, depline, cmd) { # this could probably be made *much* better RS=orig_rs; FS="[(,) \t]+" - cmd = "grep PHP_ADD_EXTENSION_DEP ext/" module_name "/config*.m4" + cmd = "grep PHP_ADD_EXTENSION_DEP " module_dir "/config*.m4" while (cmd | getline) { # printf("GOT: %s,%s,%s,%s,%s\n", $1, $2, $3, $4, $5); if (!length($5)) { @@ -63,14 +63,16 @@ function count(arr, n, i) return n; } -/^[a-zA-Z0-9_-]+/ { +/^[a-zA-Z0-9_-;]+/ { + split($1, mod, ";"); + # mini hack for pedantic awk - gsub("[^a-zA-Z0-9_-]", "", $1) + gsub("[^a-zA-Z0-9_-]", "", mod[1]) # add each item to array - mods[mod_count++] = $1 + mods[mod_count++] = mod[1] # see if it has any module deps - get_deps($1); + get_deps(mod[1], mod[2]); } END { # order it correctly |