/usr/share/gerris/lib/m4.awk is in gerris-mpi 20110329-dfsg.2-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | function replace_params(s, b, i)
{
for (i in b)
gsub(b[i], "($" i ")", s);
return s;
}
BEGIN {
print "m4_changecom()m4_dnl";
}
{
if ($1 == "GfsDefine" || $1 == "Define") {
macro = $2;
delete b;
if (match(macro, /(.+)\((.+)\)/, a)) {
macro = a[1];
split(a[2],b,",");
}
printf ("m4_define(`%s',`%s", macro, replace_params($3, b));
for (i = 4; i <= NF; i++)
printf (" %s", replace_params($i, b));
printf ("')\n");
}
else if ($1 == "GfsInclude" || $1 == "Include")
printf ("m4_include(%s)\n", $2);
else
print $0;
}
|