aboutsummaryrefslogtreecommitdiff
path: root/src/boot/Makefile.in
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
committerdos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
commitab8cc85adde879fb963c94d15675783f2cf4b183 (patch)
treec202482327f474583b750b2c45dedfc4e4312b1d /src/boot/Makefile.in
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/boot/Makefile.in')
-rw-r--r--src/boot/Makefile.in166
1 files changed, 166 insertions, 0 deletions
diff --git a/src/boot/Makefile.in b/src/boot/Makefile.in
new file mode 100644
index 00000000..444748bf
--- /dev/null
+++ b/src/boot/Makefile.in
@@ -0,0 +1,166 @@
+AXIOM_LOCAL_LISP_sources = initial-env.lisp
+AXIOM_LOCAL_LISP = ../lisp/base-lisp$(EXEEXT)
+BOOTSYS_FOR_TARGET = $(axiom_target_bindir)/bootsys$(EXEEXT)
+PROCLAIMS=(load "$(srcdir)/boot-proclaims.lisp")
+
+boot_objects = initial-env.$(FASLEXT) $(boot_sources:.boot=.$(FASLEXT))
+
+boot_SOURCES = \
+ initial-env.lisp.pamphlet \
+ $(addsuffix .pamphlet, $(boot_sources))
+
+pamphlets = Makefile.pamphlet $(boot_SOURCES)
+boot_sources = tokens.boot includer.boot scanner.boot \
+ pile.boot ast.boot parser.boot translator.boot
+
+boot_clisp = $(boot_sources:.boot=.clisp)
+boot_data = $(boot_sources:.boot=.data)
+boot_fn = $(boot_sources:.boot=.fn)
+boot_cached_clisp = $(boot_sources:.boot=.clisp)
+
+COMPILE_LISP = \
+ $(axiom_build_document) --tag=lisp --mode=compile --output=$@
+
+BOOT_TO_LISP = \
+ $(axiom_build_document) --tag=boot --mode=translate \
+ --use=./prev-stage/bootsys $<
+
+subdir = src/boot/
+
+.PHONY: all-ax all-boot
+all: all-ax all-boot
+
+all-ax all-boot: stamp
+
+stamp: $(BOOTSYS_FOR_TARGET)
+ @rm -f stamp
+ $(STAMP) $@
+
+$(BOOTSYS_FOR_TARGET): stage2/bootsys$(EXEEXT)
+ $(INSTALL_PROGRAM) stage2/bootsys$(EXEEXT) $(axiom_build_bindir)
+
+.PRECIOUS: stage0/%.clisp
+.PRECIOUS: stage0/%.$(FASLEXT)
+
+stage0_boot_clisp = $(addprefix stage0/, $(boot_clisp))
+
+stage0_boot_objects = $(addprefix stage0/, $(boot_objects))
+
+stage0/stamp: stage0/bootsys$(EXEEXT)
+ @rm -f $@
+ @$(STAMP) $@
+
+stage0/bootsys$(EXEEXT): $(stage0_boot_objects)
+ $(AXIOM_LOCAL_LISP) -- --make --main="|AxiomCore|::|topLevel|"\
+ --output=$@ --load-directory=stage0 \
+ $(stage0_boot_objects)
+
+
+.PHONY: mk-stage0-dir
+mk-stage0-dir:
+ @[ -d stage0 ] || $(mkinstalldirs) stage0
+
+$(stage0_boot_objects): $(AXIOM_LOCAL_LISP)
+
+stage0/%.$(FASLEXT): stage0/%.clisp
+ $(AXIOM_LOCAL_LISP) -- --compile \
+ --load-directory=stage0 --output=$@ $<
+
+
+stage0/%.clisp: $(srcdir)/%.boot.pamphlet mk-stage0-dir
+ $(axiom_build_document) --tangle=$*.clisp --output=$@ $<
+
+%/initial-env.$(FASLEXT): initial-env.lisp mk-%-dir
+ $(AXIOM_LOCAL_LISP) -- --compile --output=$@ $<
+
+.PRECIOUS: stage1/%.$(FASLEXT)
+.PRECIOUS: stage1/%.clisp
+
+stage1/stamp: stage1/bootsys$(EXEEXT)
+ rm -f $@
+ $(STAMP) $@
+
+stage1/bootsys$(EXEEXT): $(addprefix stage1/, $(boot_objects))
+ $(AXIOM_LOCAL_LISP) -- --make --main="|AxiomCore|::|topLevel|" \
+ --output=$@ --load-directory=stage1 \
+ $(addprefix stage1/, $(boot_objects))
+
+stage1/%.$(FASLEXT): stage1/%.clisp
+ $(AXIOM_LOCAL_LISP) -- --compile \
+ --load-directory=stage1 $<
+
+stage1/%.clisp: %.boot stage0/stamp mk-stage1-dir
+ stage0/bootsys -- --translate --output=$@ $<
+
+.PHONY: mk-stage1-dir
+mk-stage1-dir:
+ @[ -d stage1 ] || $(mkinstalldirs) stage1
+
+.PRECIOUS: stage2/%.$(FASLEXT)
+.PRECIOUS: stage2/%.clisp
+
+stage2/stamp: stage2/bootsys$(EXEEXT)
+ @echo Building stage 2
+ $(STAMP) $@
+
+stage2/bootsys$(EXEEXT): $(addprefix stage2/, $(boot_objects))
+ $(AXIOM_LOCAL_LISP) -- --make --main="|AxiomCore|::|topLevel|" \
+ --output=$@ --load-directory=stage2 \
+ $(addprefix stage2/, $(boot_objects))
+
+stage2/%.$(FASLEXT): stage2/%.clisp
+ $(AXIOM_LOCAL_LISP) -- --compile \
+ --load-directory=stage2 $<
+
+stage2/%.clisp: %.boot stage1/stamp mk-stage2-dir
+ stage1/bootsys -- --translate --output=$@ $<
+
+.PHONY: mk-stage2-dir
+mk-stage2-dir:
+ @[ -d stage2 ] || $(mkinstalldirs) stage2
+
+## Dependency for various modules.
+## FIXME: This should be automatically extracted from the
+## Boot source file at packaging time.
+
+%/tokens.($FASLEXT): %/initial-env.$(FASLEXT)
+
+%/includer.$(FASLEXT): %/tokens.$(FASLEXT)
+
+%/scanner.$(FASLEXT): %/tokens.$(FASLEXT) %/includer.$(FASLEXT)
+
+%/pile.$(FASLEXT): %/scanner.$(FASLEXT) %/includer.$(FASLEXT)
+
+%/ast.$(FASLEXT): %/includer.$(FASLEXT)
+
+%/parser.$(FASLEXT): %/ast.$(FASLEXT) %/scanner.$(FASLEXT) %/includer.$(FASLEXT)
+
+%/translator.$(FASLEXT): %/parser.$(FASLEXT) %/ast.$(FASLEXT) \
+ %/pile.$(FASLEXT) %/scanner.$(FASLEXT) \
+ %/includer.$(FASLEXT)
+
+.PRECIOUS: %.boot
+%.boot: $(srcdir)/%.boot.pamphlet
+ $(axiom_build_document) --tangle $<
+.PRECIOUS: %.boot
+
+%.boot: $(srcdir)/%.boot.pamphlet
+ $(axiom_build_document) --tangle $<
+.PRECIOUS: %.lisp
+
+initial-env.lisp: initial-env.lisp.pamphlet
+ $(axiom_build_document) --tangle $<
+
+mostlyclean-local:
+ @rm -f $(AXIOM_LOCAL_LISP)
+ @rm -f $(BOOTSYS_FOR_TARGET)
+ @rm -rf prev-stage
+ @rm -rf stage0 stage1 stage2
+ @rm -f *.data *.fn
+ @rm -f stamp
+
+clean-local: mostlyclean-local
+ @rm -f $(boot_sources)
+ @rm -f *.clisp *.lisp
+
+distclean-local: clean-local