citrun

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

commit 97ebd2c9406001c6ab3b09835548b801fceb6525
parent 6bfd5d20fc3fff45811425e0f8f5949616abc2cd
Author: Kyle Milz <kyle@0x30.net>
Date:   Sat, 20 Aug 2016 14:29:39 -0600

Jam: move script to where its used

Diffstat:
MJamrules | 7++++++-
Dbin/stringize | 17-----------------
2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/Jamrules b/Jamrules @@ -81,7 +81,12 @@ rule Stringize actions Stringize { - $(TOP)/bin/stringize "static const char *$(1:B)" $(2) > $(1) ; + # Quote the entire original source file and put it in the destination. + sed -e ' s/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$/\\n"/; ' < $(>) > $(<) + echo ";" >> $(<) + + # Add the declaration to the start of the file. + sed -i -e '1s/^/static const char *$(1:B) = /' $(<) } actions ReplaceTokens diff --git a/bin/stringize b/bin/stringize @@ -1,17 +0,0 @@ -#!/bin/sh - -if test "$#" = 0; then - echo "Usage: $0 DECL-SPEC FILE..." - exit 1 -fi -decl="$1" -shift - -echo "$decl =" -sed ' -s/\\/\\\\/g; -s/"/\\"/g; -s/^/"/; -s/$/\\n"/; -' "$@" -echo ";"