mirror of
https://github.com/janet-lang/janet
synced 2025-11-01 16:13:02 +00:00
On install, merge janetconf.h into janet.h
This results in a cleaner amalgmated build
This commit is contained in:
@@ -126,9 +126,6 @@
|
||||
<File Source="dist\janet.h"/>
|
||||
<RemoveFolder Id="RemoveCDir" On="uninstall" />
|
||||
</Component>
|
||||
<Component Directory="CDir">
|
||||
<File Source="dist\janetconf.h"/>
|
||||
</Component>
|
||||
<Component Directory="CDir">
|
||||
<File Source="dist\janet.lib"/>
|
||||
</Component>
|
||||
|
||||
12
tools/patch-header.janet
Normal file
12
tools/patch-header.janet
Normal file
@@ -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))))
|
||||
Reference in New Issue
Block a user