diff options
Diffstat (limited to 'bin/mftl.awk')
-rw-r--r-- | bin/mftl.awk | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/mftl.awk b/bin/mftl.awk index 21976337..916348b2 100644 --- a/bin/mftl.awk +++ b/bin/mftl.awk @@ -19,7 +19,7 @@ BEGIN { FS = "[ \t:]" } } # Check lines matching expected "targets:dependencies" format -/^[a-zA-Z0-9][a-zA-Z0-9 \t_-]+:([^=]|$)/ { +/^[a-zA-Z0-9][a-zA-Z0-9./ \t_-]+:([^=]|$)/ { # Iterate through the targets that don't look like substitutions or # inference rules and stack them up into an array's keys to keep them @@ -31,6 +31,12 @@ BEGIN { FS = "[ \t:]" } # Print unique determined targets, sorted END { - for (t in ats) - print t | "sort" + sort = "" + for (t in ats) { + if (!sort) + sort = "sort" + print t | sort + } + if (sort) + close(sort) } |