projects/guix·blob python-team · refs

42 lines · 1.7 KiB

1By default, Nim stores intermediate object files in ~/.cache/nim. patch moves
2the nimcache into the working directory of the guix build. This should not be
3needed past version 0.4.4 of Chawan.
4
5diff --git a/Makefile b/Makefile
6index 8f538522..6ffc8149 100644
7--- a/Makefile
8+++ b/Makefile
9@@ -227,7 +227,7 @@ $(OUTDIR_LIBEXEC)/urldec: $(OUTDIR_LIBEXEC)/urlenc
10
11 # Do not add FLAGS here, because that breaks cross-compilation.
12 $(OBJDIR)/chac: src/chac.nim lib/monoucha0/monoucha/* lib/monoucha0/monoucha/qjs/*
13- $(NIMC) -o:$@ $<
14+ $(NIMC) --nimcache:"$(OBJDIR)/chac_cache" -o:$@ $<
15
16 $(OUTDIR_LIBEXEC)/%.jsb: src/%.js $(OBJDIR)/chac
17 $(OBJDIR)/chac $(chac_flags) $< $@
18@@ -314,7 +314,7 @@ uninstall:
19 for f in $(manpages1); do rm -f "$(DESTDIR)$(MANPREFIX1)/$$f"; done
20
21 test/net/run: test/net/run.nim
22- $(NIMC) test/net/run.nim
23+ $(NIMC) --nimcache:"$(OBJDIR)/test_net" test/net/run.nim
24
25 .PHONY: map
26 map:
27@@ -351,12 +351,12 @@ test_flags = --verbosity:0
28 .PHONY: test_charset
29 test_charset: test/charset/run.sh $(OBJDIR)/chagashi_test
30 (cd test/charset && ./run.sh)
31- $(NIM) r $(test_flags) test/charset/basic.nim
32- CGS_TESTDIR=$(OBJDIR)/chagashi_test $(NIM) r $(test_flags) test/charset/data.nim
33+ $(NIM) r $(test_flags) --nimcache:"$(OBJDIR)/test_charset" test/charset/basic.nim
34+ CGS_TESTDIR=$(OBJDIR)/chagashi_test $(NIM) r --nimcache:"$(OBJDIR)/test_charset_data" $(test_flags) test/charset/data.nim
35
36 .PHONY: test_nim
37 test_nim: test/nim/ttwtstr.nim
38- (cd test/nim && $(NIM) r $(test_flags) ttwtstr.nim)
39+ (cd test/nim && $(NIM) r --nimcache:"$(OBJDIR)/test_twtstr" $(test_flags) ttwtstr.nim)
40
41 .PHONY: test
42 test: test_js test_layout test_net test_md test_pager test_charset test_nim