citrun

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

commit 406e1c1e5c87fc2dcbb7f25498946377a8bcf6fd
parent 597dece684a4c0f408302da842c9e88baff9aa8f
Author: Kyle Milz <kyle@0x30.net>
Date:   Wed, 28 Dec 2016 22:21:40 -0700

move Jamrules tail into it's own file, again

Diffstat:
AJamrules.tail | 24++++++++++++++++++++++++
Mconfigure | 30+-----------------------------
2 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/Jamrules.tail b/Jamrules.tail @@ -0,0 +1,24 @@ + +echo ░█▀▀░░░▀█▀░▀█▀░░░█▀▄░█░█░█▀█ ; +echo ░█░░░░░░█░░░█░░░░█▀▄░█░█░█░█ ; +echo ░▀▀▀░░░▀▀▀░░▀░░░░▀░▀░▀▀▀░▀░▀ ; + +# Quote an entire file and add a variable declaration prefixing the string. +rule Stringize +{ + MakeLocate $(1) : $(LOCATE_SOURCE) ; + SEARCH on $(2) = $(SEARCH_SOURCE) ; + Depends $(1) : $(2) ; + Clean clean : $(1) ; +} + +actions Stringize +{ + # 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 -e '1s/^/static const char *$(1:B) = /' -i.bak $(<) + rm $(<).bak +} diff --git a/configure b/configure @@ -3,9 +3,6 @@ # Checks that a bunch of crap is installed, creates Jamrules file. # uname=`uname` -echo ░█▀▀░░░▀█▀░▀█▀░░░█▀▄░█░█░█▀█ -echo ░█░░░░░░█░░░█░░░░█▀▄░█░█░█░█ -echo ░▀▀▀░░░▀▀▀░░▀░░░░▀░▀░▀▀▀░▀░▀ echo Configuring C It Run 0.0 for $uname echo @@ -95,33 +92,8 @@ INST_LIBS = ${INST_EXTRALIB-} ${LDGROUP_START-} ${CLANG_LIBS} ${LDGROUP_END-} `llvm-config --libs ${LLVM_LIBS}` `llvm-config --system-libs` ; - -EOF - -# -# Write bottom of Jamrules, no variable interpolation. -# -cat <<'EOF' >> Jamrules -# Quote an entire file and add a variable declaration prefixing the string. -rule Stringize -{ - MakeLocate $(1) : $(LOCATE_SOURCE) ; - SEARCH on $(2) = $(SEARCH_SOURCE) ; - Depends $(1) : $(2) ; - Clean clean : $(1) ; -} - -actions Stringize -{ - # 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 -e '1s/^/static const char *$(1:B) = /' -i.bak $(<) - rm $(<).bak -} EOF +cat Jamrules.tail >> Jamrules # # Show summary.