Fix PHP_ADD_EXTENSION_DEP without indentation

Adjust FS in order_by_dep.awk to only each whitespace around (,)
rather than any whitespace. Thus a leading indent does not result
in a separate element.
This commit is contained in:
Nikita Popov 2021-06-10 11:48:25 +02:00
parent 52a72e2ea1
commit be92a87371

View File

@ -10,14 +10,14 @@ function get_deps(module_name, module_dir, depline, cmd)
{
# this could probably be made *much* better
RS=orig_rs;
FS="[(,) \t]+"
FS="[ \t]*[(,)][ \t]*"
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)) {
$5 = 0;
#printf("GOT: %s,%s,%s,%s\n", $1, $2, $3, $4);
if (!length($4)) {
$4 = 0;
}
mod_deps[module_name, $4] = $5;
mod_deps[module_name, $3] = $4;
}
close(cmd)
RS=" ";