From 9c1a077d2ea0d567906822070811187457db4f2c Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 28 Nov 2013 05:36:41 +0000 Subject: [PATCH] Allow expand_macros.pl to #include stuff to expand --- PBot/VERSION.pm | 2 +- modules/expand_macros.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 2bee0fd4..97dd2f4a 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -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", }; diff --git a/modules/expand_macros.pl b/modules/expand_macros.pl index e256cda0..8539e98e 100755 --- a/modules/expand_macros.pl +++ b/modules/expand_macros.pl @@ -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;