citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 2283e084d29408e1f9ee09dde3a42fbd24f17fa2
parent 500cdfc8837f2710adae0c356f7ef4013dd4d3c2
Author: Kyle Milz <kyle@windows.krwm.net>
Date:   Sat, 31 Dec 2016 00:08:49 -0800

Jam: move inline perl into file

Diffstat:
MJamrules.tail | 10+---------
Asrc/stringize.pl | 9+++++++++
2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/Jamrules.tail b/Jamrules.tail @@ -14,13 +14,5 @@ rule Stringize actions Stringize { - perl -e 'print "static const char *$(1:B) = "; - while (<>) { - $_ =~ s/\\/\\\\/g ; - $_ =~ s/"/\\"/g; - $_ =~ s/^/"/; - $_ =~ s/$/\\n"/; - print - } - print ";" ' < $(>) > $(<) + perl src/stringize.pl $(1:B) < $(>) > $(<) } diff --git a/src/stringize.pl b/src/stringize.pl @@ -0,0 +1,9 @@ +print "static const char *$ARGV[0] = "; +while (<STDIN>) { + $_ =~ s/\\/\\\\/g ; + $_ =~ s/"/\\"/g; + $_ =~ s/^/"/; + $_ =~ s/$/\\n"/; + print ; +} +print ";";