Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (27 sloc) 365 Bytes
# AWK script to add Makefile rules to "cc -M" output.
BEGIN {
if (rule == "") {
print "ERROR: you must set \"rule\" from command-line."
exit 1
}
inrule = 0
}
$1 ~ /\.o:$/ {
print
if ($NF == "\\") {
inrule = 1
next
} else
print rule
}
$1 !~ /\.o:$/ {
print
if (inrule) {
if ($NF == "\\")
next
else {
print rule
inrule = 0
}
}
}
Something went wrong with that request. Please try again.