Allow expand_macros.pl to #include stuff to expand

This commit is contained in:
Pragmatic Software 2013-11-28 05:36:41 +00:00
parent b042e073db
commit 9c1a077d2e
2 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 474,
BUILD_REVISION => 475,
BUILD_DATE => "2013-11-27",
};

View File

@ -156,7 +156,7 @@ while($code =~ m/(.)/msg) {
print "code after \\n additions: [$code]\n" if $debug;
$code =~ s/#include [<"'].*?['">]//gm;
#$code =~ s/#include [<"'].*?['">]//gm;
print "code after include removal: [$code]\n" if $debug;
@ -289,6 +289,7 @@ close $fh;
my ($ret, $result) = execute(5, "gcc -E prog.c");
$result =~ s/.*# \d+ "prog.c"(\s+\d+)*//ms;
$result =~ s/^#.*$//gm;
$result =~ s/[\n\r]/ /gm;
$result =~ s/\s+/ /gm;