diff options
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | Makefile.in | 33 | ||||
-rw-r--r-- | src/Makefile.am | 18 | ||||
-rw-r--r-- | src/Makefile.in | 46 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 27 | ||||
-rw-r--r-- | src/boot/Makefile.in | 38 | ||||
-rw-r--r-- | src/driver/main.c | 2 | ||||
-rw-r--r-- | src/driver/utils.c | 23 | ||||
-rw-r--r-- | src/driver/utils.h | 3 | ||||
-rw-r--r-- | src/interp/Makefile.in | 23 |
10 files changed, 147 insertions, 73 deletions
diff --git a/Makefile.am b/Makefile.am index a180983e..1d2eeedc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -110,6 +110,13 @@ install: check: cd src && $(MAKE) all-check +mostlyclean-local: + cd src && $(MAKE) $(AM_MAKEFLAGS) mostlyclean + clean-local: + cd src && $(MAKE) $(AM_MAKEFLAGS) clean @-rm -rf $(target) @-rm -rf build + +distclean-local: + cd src && $(MAKE) $(AM_MAKEFLAGS) distclean diff --git a/Makefile.in b/Makefile.in index deb1f14f..4ad84dbe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -823,7 +823,7 @@ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-tags + distclean-libtool distclean-local distclean-tags dvi: dvi-recursive @@ -873,7 +873,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-generic mostlyclean-libtool +mostlyclean-am: mostlyclean-generic mostlyclean-libtool \ + mostlyclean-local pdf: pdf-recursive @@ -893,16 +894,17 @@ uninstall-am: clean-libtool clean-local ctags ctags-recursive dist dist-all \ dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + distclean-libtool distclean-local distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am .PHONY: $(OA_SRC_TARGETS) @@ -941,10 +943,17 @@ install: check: cd src && $(MAKE) all-check +mostlyclean-local: + cd src && $(MAKE) $(AM_MAKEFLAGS) mostlyclean + clean-local: + cd src && $(MAKE) $(AM_MAKEFLAGS) clean @-rm -rf $(target) @-rm -rf build +distclean-local: + cd src && $(MAKE) $(AM_MAKEFLAGS) distclean + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/Makefile.am b/src/Makefile.am index de5ad770..b56fa7e1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,6 +37,11 @@ DIST_SUBDIRS = \ lisp scripts share sman \ testsuite utils +subdirs = \ + algebra boot clef doc driver \ + etc graph hyper input interp \ + lib lisp share sman utils + oa_targetdir = $(top_builddir)/$(target) if OA_BUILD_SMAN @@ -134,4 +139,17 @@ all-check: cd input && $(MAKE) $(AM_MAKEFLAGS) all-check mostlyclean-local: + for d in $(subdirs); do \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) mostlyclean); \ + done -rm -f stamp-subdirs + +clean-local: + for d in $(subdirs); do \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) clean); \ + done + +distclean-local: + for d in $(subdirs); do \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) distclean); \ + done diff --git a/src/Makefile.in b/src/Makefile.in index 6bc8e8b3..50815c9c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -298,6 +298,11 @@ DIST_SUBDIRS = \ lisp scripts share sman \ testsuite utils +subdirs = \ + algebra boot clef doc driver \ + etc graph hyper input interp \ + lib lisp share sman utils + oa_targetdir = $(top_builddir)/$(target) @OA_BUILD_SMAN_TRUE@OA_SMAN_TARGETS = all-sman all-clef @OA_BUILD_GRAPHICS_TRUE@OA_GRAPHICS_TARGETS = all-graph @@ -563,11 +568,12 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags +distclean-am: clean-am distclean-generic distclean-local \ + distclean-tags dvi: dvi-recursive @@ -633,17 +639,18 @@ uninstall-am: .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive distclean \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am + clean-libtool clean-local ctags ctags-recursive distclean \ + distclean-generic distclean-libtool distclean-local \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool \ + mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am all-local: all-src @@ -732,8 +739,21 @@ all-check: cd input && $(MAKE) $(AM_MAKEFLAGS) all-check mostlyclean-local: + for d in $(subdirs); do \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) mostlyclean); \ + done -rm -f stamp-subdirs +clean-local: + for d in $(subdirs); do \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) clean); \ + done + +distclean-local: + for d in $(subdirs); do \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) distclean); \ + done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 67abf263..d58c619d 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -94,13 +94,23 @@ DOC=$(axiom_target_docdir)/src/algebra OUTSRC=$(axiom_target_srcdir)/algebra INPUT=../input -## We use interpsys, built from previous stage, to bootstrap the algebra -## files. In fact, we use interpsys to build everything. -COMPILE_LISP = $(INTERPSYS) --compile --output=$@ $< +# Name of the driver to launch the compiler +DRIVER = ../driver/open-axiom$(EXEEXT) + +INTERPSYS = ../interp/interpsys$(EXEEXT) +COMPILE_SPAD = $(DRIVER) --execpath=$(INTERPSYS) \ + --system="$(AXIOM)" \ + --sysalg="$(axiom_src_datadir)/algebra/" \ + --strap=strap --optimize=3 \ + --system-algebra --compile $< -INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \ - --sysalg="$(axiom_src_datadir)/algebra/" +## We use interpsys, built from previous stage, to bootstrap the algebra +## files. In fact, we use interpsys to build everything. +COMPILE_LISP = $(DRIVER) --execpath=$(INTERPSYS) \ + --system="$(AXIOM)" \ + --sysalg="$(axiom_src_datadir)/algebra/" \ + --compile --output=$@ $< SPADFILES= \ @@ -1210,7 +1220,7 @@ ${OUT}/%.$(FASLEXT): %.NRLIB/code.$(FASLEXT) .PREVIOUS: %.spad .PRECIOUS: %.NRLIB/code.$(FASLEXT) %.NRLIB/code.$(FASLEXT): %.spad - ${INTERPSYS} --strap=strap --system-algebra --optimize=3 --compile $< + $(COMPILE_SPAD) # Compile bootstrap file to machine object code, and the result # immediately available for AXIOMsys consumption. @@ -1252,11 +1262,10 @@ $(axiom_build_texdir)/diagrams.tex: $(axiom_src_docdir)/diagrams.tex @cp -p $< $@ SPADPRSR.NRLIB/code.$(FASLEXT): spad-parser.spad - ${INTERPSYS} --system-algebra --compile $< + $(COMPILE_SPAD) PARSER.NRLIB/code.$(FASLEXT): script-parser.spad - ${INTERPSYS} --system-algebra --compile $< - + $(COMPILE_SPAD) ${INPUT}/TESTFR.input: $(srcdir)/fr.spad.pamphlet diff --git a/src/boot/Makefile.in b/src/boot/Makefile.in index eedf1e86..c7557598 100644 --- a/src/boot/Makefile.in +++ b/src/boot/Makefile.in @@ -47,6 +47,7 @@ ## That image is used to build Boot translator executable through the ## entire bootstrap process. +DRIVER = $(top_builddir)/src/driver/open-axiom$(EXEEXT) AXIOM_LOCAL_LISP_sources = initial-env.lisp AXIOM_LOCAL_LISP = ../lisp/lisp$(EXEEXT) @@ -73,14 +74,10 @@ boot_fn = $(boot_sources:.boot=.fn) subdir = src/boot/ ## Make rule toplevel entry points. -.PHONY: all-ax all-boot -all: all-ax all-boot +.PHONY: all-boot +all: all-boot -all-ax all-boot: stamp - -stamp: $(axiom_target_bindir)/bootsys$(EXEEXT) $(oa_boot_linkset) - @rm -f stamp - $(STAMP) $@ +all-boot: $(axiom_target_bindir)/bootsys$(EXEEXT) $(oa_boot_linkset) ## The final `bootsys' image. $(axiom_target_bindir)/bootsys$(EXEEXT): stage2/bootsys$(EXEEXT) @@ -116,7 +113,7 @@ strap/stamp: strap/bootsys$(EXEEXT) @$(STAMP) $@ strap/bootsys$(EXEEXT): $(strap_boot_objects) - $(AXIOM_LOCAL_LISP) -- --make --main="|AxiomCore|::|topLevel|"\ + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --make --main="|AxiomCore|::|topLevel|"\ --system=$(axiom_targetdir) \ --prologue='(pushnew :open-axiom-boot *features*)' \ --output=$@ --load-directory=strap $(strap_boot_objects) @@ -142,13 +139,13 @@ stage1/stamp: stage1/bootsys$(EXEEXT) $(STAMP) $@ stage1/bootsys$(EXEEXT): $(stage1_boot_objects) - $(AXIOM_LOCAL_LISP) -- --make --main="|AxiomCore|::|topLevel|" \ + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --make --main="|AxiomCore|::|topLevel|" \ --system=$(axiom_targetdir) \ --prologue='(pushnew :open-axiom-boot *features*)' \ --output=$@ --load-directory=stage1 $(stage1_boot_objects) stage1/%.clisp: %.boot strap/stamp stage1/.started - strap/bootsys -- --translate --import=skip --output=$@ $< + $(DRIVER) --execpath=strap/bootsys$(EXEEXT) --translate --import=skip --output=$@ $< ## @@ -169,13 +166,13 @@ stage2/stamp: stage2/bootsys$(EXEEXT) $(STAMP) $@ stage2/bootsys$(EXEEXT): $(stage2_boot_objects) - $(AXIOM_LOCAL_LISP) -- --make --main="|AxiomCore|::|topLevel|" \ + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --make --main="|AxiomCore|::|topLevel|" \ --system=$(axiom_targetdir) \ --prologue='(pushnew :open-axiom-boot *features*)' \ --output=$@ --load-directory=stage2 $(stage2_boot_objects) stage2/%.clisp: %.boot stage1/stamp stage2/.started - stage1/bootsys -- --translate --import=skip --output=$@ $< + $(DRIVER) --execpath=stage1/bootsys$(EXEEXT) --translate --import=skip --output=$@ $< ## ## Generic rules for compiling FASLs @@ -191,31 +188,31 @@ stage2/%.clisp: %.boot stage1/stamp stage2/.started ## Boot source file at packaging time. %/initial-env.$(LNKEXT): initial-env.lisp %/.started - $(AXIOM_LOCAL_LISP) -- --compile --output=$@ $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --compile --output=$@ $< %/tokens.$(LNKEXT): %/tokens.clisp %/initial-env.$(LNKEXT) - $(AXIOM_LOCAL_LISP) -- --output=$@ --compile --load-directory=$* $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< %/includer.$(LNKEXT): %/includer.clisp %/tokens.$(LNKEXT) - $(AXIOM_LOCAL_LISP) -- --output=$@ --compile --load-directory=$* $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< %/scanner.$(LNKEXT): %/scanner.clisp %/tokens.$(LNKEXT) %/includer.$(LNKEXT) - $(AXIOM_LOCAL_LISP) -- --output=$@ --compile --load-directory=$* $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< %/pile.$(LNKEXT): %/pile.clisp %/scanner.$(LNKEXT) %/includer.$(LNKEXT) - $(AXIOM_LOCAL_LISP) -- --output=$@ --compile --load-directory=$* $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< %/ast.$(LNKEXT): %/ast.clisp %/includer.$(LNKEXT) - $(AXIOM_LOCAL_LISP) -- --output=$@ --compile --load-directory=$* $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< %/parser.$(LNKEXT): %/parser.clisp %/ast.$(LNKEXT) %/scanner.$(LNKEXT) \ %/includer.$(LNKEXT) - $(AXIOM_LOCAL_LISP) -- --output=$@ --compile --load-directory=$* $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< %/translator.$(LNKEXT): %/translator.clisp %/parser.$(LNKEXT) \ %/ast.$(LNKEXT) %/pile.$(LNKEXT) %/scanner.$(LNKEXT) \ %/includer.$(LNKEXT) - $(AXIOM_LOCAL_LISP) -- --output=$@ --compile --load-directory=$* $< + $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< ## @@ -228,7 +225,6 @@ mostlyclean-local: @rm -rf strap stage1 stage2 @rm -rf $(oa_target_bootdir) @rm -f *.data *.fn - @rm -f stamp clean-local: mostlyclean-local @rm -f *.clisp diff --git a/src/driver/main.c b/src/driver/main.c index ad2eac1d..3dd06ebe 100644 --- a/src/driver/main.c +++ b/src/driver/main.c @@ -127,6 +127,8 @@ main(int argc, char* argv[]) case core_driver: case script_driver: case compiler_driver: + case translator_driver: + case linker_driver: putenv("LC_ALL=C"); setlocale(LC_ALL, ""); return execute_core(&command, driver); diff --git a/src/driver/utils.c b/src/driver/utils.c index 20e130fb..42b0183d 100644 --- a/src/driver/utils.c +++ b/src/driver/utils.c @@ -130,11 +130,10 @@ get_driver_name(Driver driver) case script_driver: case compiler_driver: case core_driver: + case translator_driver: + case linker_driver: return OPENAXIOM_CORE_PATH; - case alien_driver: - return 0; - default: abort(); } @@ -163,7 +162,6 @@ build_rts_options(Command* command, Driver driver) case sman_driver: case execute_driver: case unknown_driver: - case alien_driver: break; case core_driver: @@ -171,6 +169,8 @@ build_rts_options(Command* command, Driver driver) case compiler_driver: case script_driver: + case translator_driver: + case linker_driver: switch (OPENAXIOM_BASE_RTS) { case gcl_runtime: command->rt_args.allocate(3); @@ -200,6 +200,12 @@ build_rts_options(Command* command, Driver driver) command->rt_args[1] = (char*) "-norc"; break; + case ecl_runtime: + command->rt_args.allocate(2); + command->rt_args[0] = (char*) "-q"; + command->rt_args[1] = (char*) "-norc"; + break; + default: abort(); } @@ -298,16 +304,17 @@ preprocess_arguments(Command* command, int argc, char** argv) } else if (const char* val = is_prefix("--execpath=", argv[i])) { command->exec_path = val; - driver = alien_driver; - break; } else { /* Apparently we will invoke the Core system; we need to pass on this option. */ if (strcmp(argv[i], "--script") == 0) driver = script_driver; - else if(strcmp(argv[i], "--compile") == 0) + else if(strcmp(argv[i], "--compile") == 0 + or strcmp(argv[i], "--translate") == 0) driver = compiler_driver; + else if (strcmp(argv[i], "--make") == 0) + driver = linker_driver; else { if (argv[i][0] == '-') /* Maybe option for the driver. */ @@ -478,7 +485,7 @@ execute_core(const Command* command, Driver driver) args[command->rt_args.size() + command->core.argc] = NULL; execv(execpath, args.data()); - perror(strerror(errno)); + perror(execpath); return -1; #endif /* __WIN32__ */ } diff --git a/src/driver/utils.h b/src/driver/utils.h index 70b5bb85..10f47f79 100644 --- a/src/driver/utils.h +++ b/src/driver/utils.h @@ -55,7 +55,8 @@ namespace OpenAxiom { script_driver, // start the core system in script mode. compiler_driver, // start the core system in compiler mode. execute_driver, // Execute a command. - alien_driver // Alien driver. + translator_driver, // Start the core system in translator mode. + linker_driver // start the core system in linking mode. }; // A list of runtime support systems for OpenAxiom. diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index 32bc13c5..ae85a4c9 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -44,12 +44,11 @@ AUTO=$(axiom_targetdir)/autoload autoload_objects = -# Build platform-dependent Lisp image, at the base of other -# derived Lisp images (interpsys, AXIOMsys) -LISPSYS= $(axiom_build_bindir)/lisp$(EXEEXT) +# Driver to launch translation and compilation +DRIVER = $(top_builddir)/src/driver/open-axiom$(EXEEXT) # Translator from Boot to Lisp (or machine code) -BOOTSYS= $(axiom_target_bindir)/bootsys$(EXEEXT) -- --syslib=$(axiom_target_libdir) +BOOTSYS = $(axiom_target_bindir)/bootsys$(EXEEXT) # Minimal OpenAxiom image necessary to build the algebra SAVESYS= interpsys$(EXEEXT) @@ -242,7 +241,9 @@ ${SAVESYS}: database.date \ $(axiom_targetdir)/algebra/exposed.$(FASLEXT) \ $(axiom_target_datadir)/msgs/s2-us.msgs \ $(ASAUTO) $(TRANOBJS) $(OBJS) makeint.$(LNKEXT) - $(BOOTSYS) -- --system="$(AXIOM)/" --system-algebra \ + $(DRIVER) --execpath=$(BOOTSYS) \ + --syslib=$(axiom_target_libdir) \ + --system="$(AXIOM)/" --system-algebra \ --sysalg="$(axiom_src_datadir)/algebra/" \ --prologue="(pushnew :open-axiom-basic-system *features*)" \ --make --output=$@ --main="BOOT::|systemMain|" \ @@ -257,7 +258,8 @@ ${AXIOMSYS}: database.date \ $(axiom_targetdir)/algebra/exposed.$(FASLEXT) \ $(axiom_target_datadir)/msgs/s2-us.msgs \ $(ASAUTO) $(TRANOBJS) $(OBJS) makeint.$(LNKEXT) - $(BOOTSYS) -- \ + $(DRIVER) --execpath=$(BOOTSYS) \ + --syslib=$(axiom_target_libdir) \ --system="$(AXIOM)/" \ --sysalg="$(axiom_targetdir)/algebra/" \ --prologue="(pushnew :open-axiom-algebra-system *features*)" \ @@ -269,7 +271,8 @@ exposed.lsp: $(axiom_src_algdir)/exposed.lsp.pamphlet $(axiom_targetdir)/algebra/exposed.$(FASLEXT) : exposed.lsp boot-pkg.$(LNKEXT) $(mkdir_p) $(axiom_targetdir)/algebra - $(BOOTSYS) --compile --output=$@ --load-directory=. $< + $(DRIVER) --execpath=$(BOOTSYS) --syslib=$(axiom_target_libdir) \ + --compile --output=$@ --load-directory=. $< database.date: @ echo 617 the database was updated...remaking interpsys @@ -283,10 +286,12 @@ $(AUTO)/%.$(FASLEXT): %.$(FASLEXT) @cp -p $< $@ %.$(LNKEXT) %.$(FASLEXT): %.boot - $(BOOTSYS) --compile --output=$@ --load-directory=. $< + $(DRIVER) --execpath=$(BOOTSYS) --syslib=$(axiom_target_libdir) \ + --compile --output=$@ --load-directory=. $< %.$(LNKEXT) %.$(FASLEXT): %.lisp - $(BOOTSYS) --compile --output=$@ --load-directory=. $< + $(DRIVER) --execpath=$(BOOTSYS) --syslib=$(axiom_target_libdir) \ + --compile --output=$@ --load-directory=. $< ## Translation to Fortran fortcall.$(FASLEXT): sys-macros.$(FASLEXT) |