Add support of splitting parameter classes to ARCH, DEFS, LIB
in ARCH, there are all -m flags (will be expanded into ARCH_FLAGS in Makefile) in DEFS, there are all -D flags (will be expanded into DEFS in Makefile) in LIB, there are all -l flags (will be expanded into LIBNAME in Makefile) If no MODE option specified, the generator behaves as in previous version.
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
BEGIN {
|
||||
PAT = tolower(PAT);
|
||||
if (length(MODE) == 0)
|
||||
MODE = ".*";
|
||||
}
|
||||
!/^#/{
|
||||
#remove cr on windows
|
||||
@@ -39,10 +41,22 @@ BEGIN {
|
||||
PAT=$2;
|
||||
|
||||
for (i = 3; i <= NF; i = i + 1) {
|
||||
if ($i ~ /^-/)
|
||||
printf "%s ",$i;
|
||||
else
|
||||
printf "-D_%s ",$i;
|
||||
if ($i ~ /^-l/) {
|
||||
if ("LIB" ~ MODE)
|
||||
printf "%s ",$i;
|
||||
}
|
||||
else if ($i ~ /^-m/) {
|
||||
if ("ARCH" ~ MODE)
|
||||
printf "%s ",$i;
|
||||
}
|
||||
else if ($i ~ /^-D/) {
|
||||
if ("DEFS" ~ MODE)
|
||||
printf "%s ",$i;
|
||||
}
|
||||
else {
|
||||
if ("DEFS" ~ MODE)
|
||||
printf "-D_%s ",$i;
|
||||
}
|
||||
}
|
||||
|
||||
if (PAT=="END")
|
||||
|
||||
Reference in New Issue
Block a user