summaryrefslogtreecommitdiff
path: root/build/order_by_dep.awk
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-16 18:04:10 +0800
committerXinchen Hui <laruence@gmail.com>2015-11-16 18:04:29 +0800
commitae196280bba7a63c85a7e36f7c2fe0da97ba9c4b (patch)
treeac8122d48e293ea91a1a78436c5c48d395d37711 /build/order_by_dep.awk
parent5bdc5f4e2be9fce97e7639356b9d6c26e32de679 (diff)
downloadphp-git-ae196280bba7a63c85a7e36f7c2fe0da97ba9c4b.tar.gz
Revert pushed by mistake
Revert "Revert "Remove assumption that extensions are in ext/ext-name"" This reverts commit 7e47bf1e65086d6bb69bd9e9c79ccb179c5302b4.
Diffstat (limited to 'build/order_by_dep.awk')
-rw-r--r--build/order_by_dep.awk14
1 files changed, 8 insertions, 6 deletions
diff --git a/build/order_by_dep.awk b/build/order_by_dep.awk
index 0fdd960652..281898ecee 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