summaryrefslogtreecommitdiffstats
path: root/eshtrans
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-23 14:18:23 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-23 14:18:23 (EST)
commit2d2c37f572b2b3a0d257372ad7b9f034c5785491 (patch)
treeacad35f11ca1d273a6fc3e4e851e25529415d527 /eshtrans
parent016fade613b1fc2300bc4c46ad501ea8286e4a2c (diff)
downloadeggshell-2d2c37f572b2b3a0d257372ad7b9f034c5785491.zip
eggshell-2d2c37f572b2b3a0d257372ad7b9f034c5785491.tar.gz
eggshell-2d2c37f572b2b3a0d257372ad7b9f034c5785491.tar.bz2
eshtrans/Makefile: Build eshtrans with itself
The old bootstrapping/stage-one makefile is kept at Makefile.old.
Diffstat (limited to 'eshtrans')
-rw-r--r--eshtrans/Makefile6
-rw-r--r--eshtrans/Makefile.old28
2 files changed, 30 insertions, 4 deletions
diff --git a/eshtrans/Makefile b/eshtrans/Makefile
index 7dbd280..5a093b6 100644
--- a/eshtrans/Makefile
+++ b/eshtrans/Makefile
@@ -18,11 +18,9 @@ clean:
rm -f eshtrans $(OBJECTS)
eshtrans: $(OBJECTS) Makefile
- cat $(OBJECTS) >$@
- printf 'main "$${@}"\n' >>$@
- chmod a+x $@
+ ../eshld/eshld -o $@ $(OBJECTS)
$(OBJECTS): Makefile
.esh.sh:
- cp $< $@
+ ./eshtrans $<
diff --git a/eshtrans/Makefile.old b/eshtrans/Makefile.old
new file mode 100644
index 0000000..b47c4a7
--- /dev/null
+++ b/eshtrans/Makefile.old
@@ -0,0 +1,28 @@
+SOURCES = \
+ main.esh \
+ common.esh \
+ tokens.esh \
+ backend/main.esh \
+ backend/codegen.esh \
+ frontend/main.esh \
+ frontend/parser.esh \
+ frontend/lexer.esh
+OBJECTS = $(SOURCES:.esh=.sh)
+
+all: eshtrans.old
+
+.SUFFIXES:
+.SUFFIXES: .esh .sh
+
+clean:
+ rm -f eshtrans.old $(OBJECTS)
+
+eshtrans.old: $(OBJECTS)
+ cat $(OBJECTS) >$@
+ printf 'main "$${@}"\n' >>$@
+ chmod a+x $@
+
+$(OBJECTS):
+
+.esh.sh:
+ cp $< $@