From 2dc04d2957ef2f93aea1a83f4f55d11fbeebc6e2 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Tue, 17 Nov 2020 09:48:31 -0600 Subject: On install, merge janetconf.h into janet.h This results in a cleaner amalgmated build --- tools/msi/janet.wxs | 3 --- tools/patch-header.janet | 12 ++++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 tools/patch-header.janet (limited to 'tools') diff --git a/tools/msi/janet.wxs b/tools/msi/janet.wxs index c747b0d4..80a0b7e4 100644 --- a/tools/msi/janet.wxs +++ b/tools/msi/janet.wxs @@ -126,9 +126,6 @@ - - - diff --git a/tools/patch-header.janet b/tools/patch-header.janet new file mode 100644 index 00000000..bbc86653 --- /dev/null +++ b/tools/patch-header.janet @@ -0,0 +1,12 @@ +# Patch janet.h + +(def [_ janeth janetconf output] (dyn :args)) + +(def- replace-peg + (peg/compile + ~(% (* '(to `#include "janetconf.h"`) + (constant ,(slurp janetconf)) + (thru `#include "janetconf.h"`) + '(any 1))))) + +(spit output (first (peg/match replace-peg (slurp janeth)))) -- cgit v1.2.3