diff options
-rwxr-xr-x | cppawk | 6 | ||||
-rw-r--r-- | testcases | 10 |
2 files changed, 13 insertions, 3 deletions
@@ -29,13 +29,13 @@ # site configuration prepro=/usr/bin/cpp -incopt=-iquote # GNU cpp feature: use -I if unavailable -awk=/usr/bin/gawk +incopt=-iquote # GNU cpp feature: use -I if unavailable +awk=/usr/bin/gawk # Use GNU awk +prepro_opts="-D__gawk__=1" # Blank out for generic or use __mawk__, etc. # globals awk_file= awk_opts= -prepro_opts= tmp_file= delhashbang="sed -e /^#!/d" @@ -83,3 +83,13 @@ BEGIN { print max(42, 73) }' BEGIN { print max(42, 73) }' : 73 +-- +16: +./cppawk ' +BEGIN { +#if __gawk__ + print "gawk" +#endif +}' +: +gawk |