commit 30ebd62d1199665c0e0cffd0dae73196839666c6
parent f5e7842f93e78b2e03aea53bdadd0fa601d3c630
Author: kyle <kyle@0x30.net>
Date: Mon, 26 Dec 2016 14:35:53 -0700
Jam: merge Jamrules.tail into Jamrules
Diffstat:
2 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/Jamrules.tail b/Jamrules.tail
@@ -1,20 +0,0 @@
-
-# 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
@@ -72,7 +72,7 @@ else
fi
#
-# Write Jamrules. Any errors inside backticks get ignored.
+# Write top of Jamrules. Any errors inside backticks get ignored.
#
cat <<EOF > Jamrules
CC = ${CC-cc} ;
@@ -95,13 +95,37 @@ INST_LIBS = ${INST_EXTRALIB-}
${LDGROUP_START-} ${CLANG_LIBS} ${LDGROUP_END-}
`llvm-config --libs ${LLVM_LIBS}`
`llvm-config --system-libs` ;
+
EOF
#
-# Show summary and then append static rules in Jamrules.tail.
+# 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
+
+#
+# Show summary.
#
echo === Configuration Summary ===================================================
head -n 9 Jamrules
echo =============================================================================
-
-cat Jamrules.tail >> Jamrules