cpp.req: fix for cpp 4.8.x output
Adapt cpp output parser to handle cpp 4.8.x output properly. $ cpp-4.7 /dev/null # 1 "/dev/null" # 1 "<command-line>" # 1 "/dev/null" $ cpp-4.8 /dev/null # 1 "/dev/null" # 1 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 "<command-line>" 2 # 1 "/dev/null"
This commit is contained in:
parent
24478642d6
commit
f1dc627616
@ -140,7 +140,7 @@ CppReq()
|
||||
fi
|
||||
|
||||
# Keep only linemarks and includes, strip filename quotes.
|
||||
sed -ni '/^# .* "\//{s/"//g;p};/^#i.* ["<]/{s/[<">]//g;p}' $tmpdir/out
|
||||
sed -ni '/^# .* "\(\/\|<command-line>"\)/{s/"//g;p};/^#i.* ["<]/{s/[<">]//g;p}' $tmpdir/out
|
||||
|
||||
# Prepare the list of files in cpp output which are packaged in this subpackage.
|
||||
awk '$1=="#" && $4==1 { print $3 }' <$tmpdir/out |
|
||||
@ -188,7 +188,7 @@ CppReq()
|
||||
Stack[++SP] = f
|
||||
}
|
||||
function Pop(f) {
|
||||
if (f != Stack[--SP])
|
||||
if (f != Stack[--SP] && f != "<command-line>")
|
||||
printf "%s: %s: expected pop %s, got pop %s\n",
|
||||
prog, hdr, Stack[SP], f >"/dev/stderr"
|
||||
if (SPmark > SP)
|
||||
|
Loading…
Reference in New Issue
Block a user