summaryrefslogtreecommitdiff
path: root/build/order_by_dep.awk
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-13 14:27:59 +0800
committerXinchen Hui <laruence@gmail.com>2015-11-13 14:27:59 +0800
commit7e47bf1e65086d6bb69bd9e9c79ccb179c5302b4 (patch)
tree35c61a7083a4ff9a6fa93a9d19b3854de10e6b8e /build/order_by_dep.awk
parent6d83a8c2a7dc254eed0bc7fc5bd06c1cc1568ed1 (diff)
downloadphp-git-7e47bf1e65086d6bb69bd9e9c79ccb179c5302b4.tar.gz
Revert "Remove assumption that extensions are in ext/ext-name"
This reverts commit 82b73fd1e3c53228bb31b75a446114b5fd0cd240. Conflicts: build/genif.sh build/order_by_dep.awk
Diffstat (limited to 'build/order_by_dep.awk')
-rw-r--r--build/order_by_dep.awk14
1 files changed, 6 insertions, 8 deletions
diff --git a/build/order_by_dep.awk b/build/order_by_dep.awk
index 281898ecee..0fdd960652 100644
--- a/build/order_by_dep.awk
+++ b/build/order_by_dep.awk
@@ -6,12 +6,12 @@ BEGIN {
SUBSEP=":";
}
-function get_deps(module_name, module_dir, depline, cmd)
+function get_deps(module_name, depline, cmd)
{
# this could probably be made *much* better
RS=orig_rs;
FS="[(,) \t]+"
- cmd = "grep PHP_ADD_EXTENSION_DEP " module_dir "/config*.m4"
+ cmd = "grep PHP_ADD_EXTENSION_DEP ext/" module_name "/config*.m4"
while (cmd | getline) {
# printf("GOT: %s,%s,%s,%s,%s\n", $1, $2, $3, $4, $5);
if (!length($5)) {
@@ -63,16 +63,14 @@ function count(arr, n, i)
return n;
}
-/^[a-zA-Z0-9_;-]+/ {
- split($1, mod, ";");
-
+/^[a-zA-Z0-9_-]+/ {
# mini hack for pedantic awk
- gsub("[^a-zA-Z0-9_-]", "", mod[1])
+ gsub("[^a-zA-Z0-9_-]", "", $1)
# add each item to array
- mods[mod_count++] = mod[1]
+ mods[mod_count++] = $1
# see if it has any module deps
- get_deps(mod[1], mod[2]);
+ get_deps($1);
}
END {
# order it correctly