aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-15 10:38:11 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-15 10:38:11 -0400
commitf7c896cfd80b511c30be5452edb0a350a7dd253c (patch)
tree0ceb08c10e94d4b5236c725ada18a3d0b76b145b /mk
parent0c49c1af28c7128d9dd140eb3ba392300778bd59 (diff)
Dedup some markdown -> C++ big literal stuff in build system
This pattern rule was unwisely hidden in `src/libstore/local.mk`. Now it is properly in `mk/` and we reuse it for the profile docs too.
Diffstat (limited to 'mk')
-rw-r--r--mk/cxx-big-literal.mk5
-rw-r--r--mk/lib.mk1
2 files changed, 6 insertions, 0 deletions
diff --git a/mk/cxx-big-literal.mk b/mk/cxx-big-literal.mk
new file mode 100644
index 000000000..85365df8e
--- /dev/null
+++ b/mk/cxx-big-literal.mk
@@ -0,0 +1,5 @@
+%.gen.hh: %
+ @echo 'R"foo(' >> $@.tmp
+ $(trace-gen) cat $< >> $@.tmp
+ @echo ')foo"' >> $@.tmp
+ @mv $@.tmp $@
diff --git a/mk/lib.mk b/mk/lib.mk
index 92f0983d5..34fa624d8 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -101,6 +101,7 @@ include mk/libraries.mk
include mk/programs.mk
include mk/patterns.mk
include mk/templates.mk
+include mk/cxx-big-literal.mk
include mk/tests.mk