shithub: MicroHs

Download patch

ref: 22468c3c253cdb5a65c30254ec6326b81ad987f5
parent: 6ba9268d27f576828a2c16113815d54bb90d868a
author: James Hobson <james@hobson.space>
date: Tue Apr 9 08:31:34 EDT 2024

Tests work

--- a/Makefile
+++ b/Makefile
@@ -127,7 +127,7 @@
 
 #
 clean:
-	rm -rf src/*/*.hi src/*/*.o *.comb *.tmp *~ bin/* a.out $(GHCOUTDIR) tmp/* Tools/*.o Tools/*.hi dist-newstyle generated/*-stage* .mhscache
+	rm -rf src/*/*.hi src/*/*.o *.comb *.tmp *~ bin/* a.out $(GHCOUTDIR) tmp/* Tools/*.o Tools/*.hi dist-newstyle generated/*-stage* .mhscache targets.conf
 	make clean -f Makefile.emscripten
 	cd tests; make clean
 
@@ -174,5 +174,5 @@
 nfibtest: bin/mhs bin/mhseval
 	bin/mhs -itests Nfib && bin/mhseval
 
-emscripten: bin/mhs
+emscripten: bin/mhs targets.conf
 	make test -f Makefile.emscripten
--- a/Makefile.emscripten
+++ b/Makefile.emscripten
@@ -4,14 +4,14 @@
 CONF=unix-64
 .PHONY: test
 
-emtarget : targets.conf
+tests/emtarget : targets.conf
 	echo '' >> targets.conf
 	echo [emscripten] >> targets.conf
-	echo cc = "$(CC)" >> targets.conf
-	echo conf = "$(CONF)" >> targets.conf
-	touch emtarget
+	echo cc = \"$(CC)\" >> targets.conf
+	echo conf = \"$(CONF)\" >> targets.conf
+	touch tests/emtarget
 
-test: emtarget
+test: tests/emtarget
 	$(TMHS) -temscripten Hello -otests/Hello.js && $(NODE) tests/Hello.js > tests/Hello.out && diff tests/Hello.ref tests/Hello.out
 	$(TMHS) -temscripten IOTest -otests/IOTest.js && (echo q | $(NODE) tests/IOTest.js a bb ccc | sed 's/^[0-9]*ms/1ms/' > tests/IOTest.out) && diff tests/IOTest.ref tests/IOTest.out
 	$(TMHS) -temscripten StringTest -otests/StringTest.js && $(NODE) tests/StringTest.js > tests/StringTest.out && diff tests/StringTest.ref tests/StringTest.out
@@ -50,4 +50,4 @@
 	$(TMHS) -temscripten Info -otests/Info.js && $(NODE) tests/Info.js
 
 clean:
-	rm -f tests/*.out tests/*.tmp tests/*.js tests/*.wasm
+	rm -f tests/*.out tests/*.tmp tests/*.js tests/*.wasm tests/emtarget
--