diff options
-rw-r--r-- | Makefile.in | 16 | ||||
-rw-r--r-- | config/open-axiom.m4 | 4 | ||||
-rwxr-xr-x | configure | 24 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.in | 3 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 1 | ||||
-rw-r--r-- | src/boot/Makefile.am | 242 | ||||
-rw-r--r-- | src/boot/Makefile.in | 891 | ||||
-rw-r--r-- | src/include/Lisp.H | 2 | ||||
-rw-r--r-- | src/include/vm.H | 2 | ||||
-rw-r--r-- | src/io/Makefile.in | 1 | ||||
-rw-r--r-- | src/rt/Makefile.in | 1 | ||||
-rw-r--r-- | src/syntax/Makefile.in | 1 |
15 files changed, 1041 insertions, 157 deletions
diff --git a/Makefile.in b/Makefile.in index 8085a60b..cb614405 100644 --- a/Makefile.in +++ b/Makefile.in @@ -134,7 +134,6 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/src/hyper/Makefile.in \ $(top_srcdir)/src/driver/Makefile.in \ $(top_srcdir)/src/lisp/Makefile.in \ - $(top_srcdir)/src/boot/Makefile.in \ $(top_srcdir)/src/interp/Makefile.in \ $(top_srcdir)/src/share/Makefile.in \ $(top_srcdir)/src/input/Makefile.in \ @@ -171,12 +170,12 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config/openaxiom-c-macros.h CONFIG_CLEAN_FILES = src/lib/Makefile src/utils/Makefile \ src/hyper/Makefile src/driver/Makefile src/lisp/Makefile \ - src/boot/Makefile src/interp/Makefile src/share/Makefile \ - src/input/Makefile src/etc/Makefile src/doc/Makefile \ - src/clef/Makefile src/sman/Makefile src/graph/Makefile \ - src/graph/Gdraws/Makefile src/graph/view2D/Makefile \ - src/graph/view3D/Makefile src/graph/viewAlone/Makefile \ - src/graph/viewman/Makefile src/gui/gui.pro + src/interp/Makefile src/share/Makefile src/input/Makefile \ + src/etc/Makefile src/doc/Makefile src/clef/Makefile \ + src/sman/Makefile src/graph/Makefile src/graph/Gdraws/Makefile \ + src/graph/view2D/Makefile src/graph/view3D/Makefile \ + src/graph/viewAlone/Makefile src/graph/viewman/Makefile \ + src/gui/gui.pro CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -323,6 +322,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ +LNKEXT = @LNKEXT@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ @@ -557,8 +557,6 @@ src/driver/Makefile: $(top_builddir)/config.status $(top_srcdir)/config/var-def. cd $(top_builddir) && $(SHELL) ./config.status $@ src/lisp/Makefile: $(top_builddir)/config.status $(top_srcdir)/config/var-def.mk $(top_srcdir)/src/lisp/Makefile.in $(top_srcdir)/config/setup-dep.mk cd $(top_builddir) && $(SHELL) ./config.status $@ -src/boot/Makefile: $(top_builddir)/config.status $(top_srcdir)/config/var-def.mk $(top_srcdir)/src/boot/Makefile.in $(top_srcdir)/config/setup-dep.mk - cd $(top_builddir) && $(SHELL) ./config.status $@ src/interp/Makefile: $(top_builddir)/config.status $(top_srcdir)/config/var-def.mk $(top_srcdir)/src/interp/Makefile.in $(top_srcdir)/config/setup-dep.mk cd $(top_builddir) && $(SHELL) ./config.status $@ src/share/Makefile: $(top_builddir)/config.status $(top_srcdir)/config/var-def.mk $(top_srcdir)/src/share/Makefile.in $(top_srcdir)/config/setup-dep.mk diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index 7a1c158b..6c374f66 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -154,7 +154,7 @@ AC_SUBST(oa_lisp_flavor) ## Most Lisp systems don't use conventional methods for building programs. oa_standard_linking=no AC_SUBST(oa_standard_linking) - +oa_lnkext='$(FASLEXT)' ## The pipe below is OK, for as of this writting, the free Lisp systems ## ECL, GCL, SBCL, CLisp, and Clozure CL all exit at end of standard input. AC_MSG_CHECKING([which flavor of Lisp]) @@ -168,6 +168,7 @@ else *"ECL"*) oa_lisp_flavor=ecl oa_standard_linking=yes + oa_lnkext='$(OBJEXT)' ;; *"SBCL"*) oa_lisp_flavor=sbcl @@ -197,6 +198,7 @@ AM_CONDITIONAL([OA_STANDARD_LINKING],[test $oa_standard_linking = yes]) AC_DEFINE_UNQUOTED([OPENAXIOM_BASE_RTS], [Runtime::${oa_lisp_flavor}], [The kind of base runtime system for this build.]) +AC_SUBST(LNKEXT,[$oa_lnkext]) ]) dnl --------------------------------- @@ -737,6 +737,7 @@ LDFLAGS CFLAGS CC oa_delay_ffi +LNKEXT OA_STANDARD_LINKING_FALSE OA_STANDARD_LINKING_TRUE OA_GCL_RT_FALSE @@ -3807,7 +3808,7 @@ oa_lisp_flavor=unknown ## Most Lisp systems don't use conventional methods for building programs. oa_standard_linking=no - +oa_lnkext='$(FASLEXT)' ## The pipe below is OK, for as of this writting, the free Lisp systems ## ECL, GCL, SBCL, CLisp, and Clozure CL all exit at end of standard input. { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of Lisp" >&5 @@ -3822,6 +3823,7 @@ else *"ECL"*) oa_lisp_flavor=ecl oa_standard_linking=yes + oa_lnkext='$(OBJEXT)' ;; *"SBCL"*) oa_lisp_flavor=sbcl @@ -3875,6 +3877,8 @@ cat >>confdefs.h <<_ACEOF #define OPENAXIOM_BASE_RTS Runtime::${oa_lisp_flavor} _ACEOF +LNKEXT=$oa_lnkext + if test x"$oa_include_gcl" != xyes; then @@ -5653,6 +5657,14 @@ else OA_BUILD_GCL_FALSE= fi + if test x$oa_lisp_flavor = xecl; then + OA_ECL_RT_TRUE= + OA_ECL_RT_FALSE='#' +else + OA_ECL_RT_TRUE='#' + OA_ECL_RT_FALSE= +fi + if test x$oa_delay_ffi = xyes; then OA_DELAYED_FFI_TRUE= OA_DELAYED_FFI_FALSE='#' @@ -19446,7 +19458,7 @@ esac ## We are ready to instantiate makefiles. -ac_config_files="$ac_config_files Makefile src/Makefile src/io/Makefile src/syntax/Makefile src/rt/Makefile src/algebra/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile src/io/Makefile src/syntax/Makefile src/rt/Makefile src/boot/Makefile src/algebra/Makefile" ac_config_files="$ac_config_files src/lib/Makefile:config/var-def.mk:src/lib/Makefile.in:config/setup-dep.mk" @@ -19458,8 +19470,6 @@ ac_config_files="$ac_config_files src/driver/Makefile:config/var-def.mk:src/driv ac_config_files="$ac_config_files src/lisp/Makefile:config/var-def.mk:src/lisp/Makefile.in:config/setup-dep.mk" -ac_config_files="$ac_config_files src/boot/Makefile:config/var-def.mk:src/boot/Makefile.in:config/setup-dep.mk" - ac_config_files="$ac_config_files src/interp/Makefile:config/var-def.mk:src/interp/Makefile.in:config/setup-dep.mk" ac_config_files="$ac_config_files src/share/Makefile:config/var-def.mk:src/share/Makefile.in:config/setup-dep.mk" @@ -19642,6 +19652,10 @@ if test -z "${OA_BUILD_GCL_TRUE}" && test -z "${OA_BUILD_GCL_FALSE}"; then as_fn_error $? "conditional \"OA_BUILD_GCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${OA_ECL_RT_TRUE}" && test -z "${OA_ECL_RT_FALSE}"; then + as_fn_error $? "conditional \"OA_ECL_RT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${OA_DELAYED_FFI_TRUE}" && test -z "${OA_DELAYED_FFI_FALSE}"; then as_fn_error $? "conditional \"OA_DELAYED_FFI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -20638,13 +20652,13 @@ do "src/io/Makefile") CONFIG_FILES="$CONFIG_FILES src/io/Makefile" ;; "src/syntax/Makefile") CONFIG_FILES="$CONFIG_FILES src/syntax/Makefile" ;; "src/rt/Makefile") CONFIG_FILES="$CONFIG_FILES src/rt/Makefile" ;; + "src/boot/Makefile") CONFIG_FILES="$CONFIG_FILES src/boot/Makefile" ;; "src/algebra/Makefile") CONFIG_FILES="$CONFIG_FILES src/algebra/Makefile" ;; "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile:config/var-def.mk:src/lib/Makefile.in:config/setup-dep.mk" ;; "src/utils/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/Makefile:config/var-def.mk:src/utils/Makefile.in:config/setup-dep.mk" ;; "src/hyper/Makefile") CONFIG_FILES="$CONFIG_FILES src/hyper/Makefile:config/var-def.mk:src/hyper/Makefile.in:config/setup-dep.mk" ;; "src/driver/Makefile") CONFIG_FILES="$CONFIG_FILES src/driver/Makefile:config/var-def.mk:src/driver/Makefile.in:config/setup-dep.mk" ;; "src/lisp/Makefile") CONFIG_FILES="$CONFIG_FILES src/lisp/Makefile:config/var-def.mk:src/lisp/Makefile.in:config/setup-dep.mk" ;; - "src/boot/Makefile") CONFIG_FILES="$CONFIG_FILES src/boot/Makefile:config/var-def.mk:src/boot/Makefile.in:config/setup-dep.mk" ;; "src/interp/Makefile") CONFIG_FILES="$CONFIG_FILES src/interp/Makefile:config/var-def.mk:src/interp/Makefile.in:config/setup-dep.mk" ;; "src/share/Makefile") CONFIG_FILES="$CONFIG_FILES src/share/Makefile:config/var-def.mk:src/share/Makefile.in:config/setup-dep.mk" ;; "src/input/Makefile") CONFIG_FILES="$CONFIG_FILES src/input/Makefile:config/var-def.mk:src/input/Makefile.in:config/setup-dep.mk" ;; diff --git a/configure.ac b/configure.ac index 2a948ae3..035e7931 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,7 @@ AC_LANG([C++]) OPENAXIOM_HOST_COMPILERS OPENAXIOM_REQUIRE_CXX11 AM_CONDITIONAL([OA_BUILD_GCL], [test x$oa_include_gcl = xyes]) +AM_CONDITIONAL([OA_ECL_RT], [test x$oa_lisp_flavor = xecl]) AM_CONDITIONAL([OA_DELAYED_FFI], [test x$oa_delay_ffi = xyes]) OPENAXIOM_HOST_DATA_PROPERTIES @@ -116,13 +117,13 @@ AC_CONFIG_FILES([ src/io/Makefile src/syntax/Makefile src/rt/Makefile + src/boot/Makefile src/algebra/Makefile]) OPENAXIOM_MAKEFILE([src/lib/Makefile]) OPENAXIOM_MAKEFILE([src/utils/Makefile]) OPENAXIOM_MAKEFILE([src/hyper/Makefile]) OPENAXIOM_MAKEFILE([src/driver/Makefile]) OPENAXIOM_MAKEFILE([src/lisp/Makefile]) -OPENAXIOM_MAKEFILE([src/boot/Makefile]) OPENAXIOM_MAKEFILE([src/interp/Makefile]) OPENAXIOM_MAKEFILE([src/share/Makefile]) OPENAXIOM_MAKEFILE([src/input/Makefile]) diff --git a/src/ChangeLog b/src/ChangeLog index 36ecb376..9630e63d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-08-17 Gabriel Dos Reis <gdr@axiomatics.org> + + * boot/Makefile.am: New. + * boot/Makefile.in: Regenerate. + 2014-08-16 Gabriel Dos Reis <gdr@integrable-solutions.net> * lisp/core.lisp.in (coreQuit) [SBCL]: Use sb-ext:exit since diff --git a/src/Makefile.am b/src/Makefile.am index 41bae540..5f40cf76 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013, Gabriel Dos Reis. +# Copyright (C) 2012-2014, Gabriel Dos Reis. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/src/Makefile.in b/src/Makefile.in index fe45f1c0..a09f81d7 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (C) 2012-2013, Gabriel Dos Reis. +# Copyright (C) 2012-2014, Gabriel Dos Reis. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -253,6 +253,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ +LNKEXT = @LNKEXT@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 5ebcfb14..25ae6f47 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -437,6 +437,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ +LNKEXT = @LNKEXT@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ diff --git a/src/boot/Makefile.am b/src/boot/Makefile.am new file mode 100644 index 00000000..b24e923e --- /dev/null +++ b/src/boot/Makefile.am @@ -0,0 +1,242 @@ +# Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. +# All rights reserved. +# Copyright (C) 2007-2014, Gabriel Dos Reis. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# - Neither the name of The Numerical ALgorithms Group Ltd. nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# +# Abstract: +# OpenAxiom is built in layers. The first layer is contructed into +# an image called `bootsys'. The `bootsys' image is used +# to translate Boot code to Common Lisp code. Since a Boot coded +# interpreter is needed to translate the code for the Boot coded +# interpreter we have a ``boot-strapping'' problem. In order to get +# the whole process to start we need certain files kept in +# common lisp form. This directory contains those files. +# + +# We start with a Lisp image created in a previous build step (src/lisp). +# That image is used to build Boot translator executable through the +# entire bootstrap process. + +DRIVER = $(top_builddir)/src/driver/open-axiom$(EXEEXT) +OA_LISPSYS = $(oa_target_bindir)/lisp$(EXEEXT) + +# Command used to link FASLs to produce a final executable. +LISP_LINK = \ + $(DRIVER) --execpath=$(OA_LISPSYS) --make \ + --main="|AxiomCore|::|topLevel|" --system=$(oa_targetdir) \ + --prologue='(pushnew :open-axiom-boot *features*)' + +# We use a noinst_ primary because we take care of installation +# procedure ourselves. +noinst_PROGRAMS = bootsys + +bootsys_SOURCES = \ + utility.boot \ + tokens.boot \ + includer.boot \ + scanner.boot \ + pile.boot \ + ast.boot \ + parser.boot \ + translator.boot + +oa_target_bootdir = $(oa_targetdir)/boot +if OA_ECL_RT +oa_bootsys_linkset = $(oa_target_bootdir)/linkset +else +oa_bootsys_linkset = +endif + +bootsys_DEPENDENCIES = stage2/bootsys$(EXEEXT) $(oa_bootsys_linkset) + +# FASLs that comprises `bootsys' +bootsys_clisp = $(bootsys_SOURCES:.boot=.clisp) +bootsys_objects = $(bootsys_SOURCES:.boot=.$(LNKEXT)) + +# Garbage produced by GCL during compilation +bootsys_data = $(bootsys_SOURCES:.boot=.data) +bootsys_fn = $(bootsys_SOURCES:.boot=.fn) + +STAMP = touch + +# Make rule toplevel entry points. +.PHONY: all-boot + +all-am: all-boot +all-boot: $(oa_target_bindir)/bootsys$(EXEEXT) $(oa_bootsys_linkset) + +# The final `bootsys' image. +$(oa_target_bindir)/bootsys$(EXEEXT): stage2/bootsys$(EXEEXT) + cp -p $< $@ + +$(oa_bootsys_linkset): $(addprefix $(oa_target_bootdir)/, $(bootsys_objects)) + rm -f $@ + echo '($(patsubst %, "%", $(bootsys_objects)))' > $@ + +$(oa_target_bootdir)/%.$(LNKEXT): stage2/%.$(LNKEXT) $(oa_target_bootdir) + cp $< $@ + +$(oa_target_bootdir): + $(mkdir_p) $(oa_target_bootdir) + +.PRECIOUS: strap/%.$(FASLEXT) +.PRECIOUS: strap/%.$(LNKEXT) + +# +# The bootstrapping `bootsys' image. +# + +# The bootstrapping Lisp code is cached in the subdirectory strap/. +# It is built first, followed by stage 1, and stage 2 `bootsys' images. +strap_bootsys_clisp = $(addprefix strap/, $(bootsys_clisp)) + +strap_bootsys_objects = \ + $(addprefix strap/, $(bootsys_objects)) + +strap/stamp: strap/bootsys$(EXEEXT) + @rm -f $@ + @$(STAMP) $@ + +strap/bootsys$(EXEEXT): $(strap_bootsys_objects) + $(LISP_LINK) --output=$@ \ + --load-directory=strap $(strap_bootsys_objects) + +$(strap_bootsys_objects): $(OA_LISPSYS) + +# +# Stage 1 `bootsys' image. +# + +.PRECIOUS: stage1/%.$(FASLEXT) +.PRECIOUS: stage1/%.$(LNKEXT) +.PRECIOUS: stage1/%.clisp + +stage1_bootsys_clisp = $(addprefix stage1/, $(bootsys_clisp)) + +stage1_bootsys_objects = \ + $(addprefix stage1/, $(bootsys_objects)) + +stage1/stamp: stage1/bootsys$(EXEEXT) + rm -f $@ + $(STAMP) $@ + +stage1/bootsys$(EXEEXT): $(stage1_bootsys_objects) + $(LISP_LINK) --output=$@ \ + --load-directory=stage1 $(stage1_bootsys_objects) + +stage1/%.clisp: %.boot strap/stamp stage1/.started + $(DRIVER) --execpath=strap/bootsys$(EXEEXT) --translate --import=skip --output=$@ $< + + +# +# Stage 2 `bootsys' image. +# + +.PRECIOUS: stage2/%.$(FASLEXT) +.PRECIOUS: stage2/%.$(LNKEXT) +.PRECIOUS: stage2/%.clisp + +stage2_bootsys_clisp = $(addprefix stage2/, $(bootsys_clisp)) + +stage2_bootsys_objects = \ + $(addprefix stage2/, $(bootsys_objects)) + +stage2/stamp: stage2/bootsys$(EXEEXT) + @echo Building stage 2 + $(STAMP) $@ + +stage2/bootsys$(EXEEXT): $(stage2_bootsys_objects) + $(LISP_LINK) --output=$@ \ + --load-directory=stage2 $(stage2_bootsys_objects) + +stage2/%.clisp: %.boot stage1/stamp stage2/.started + $(DRIVER) --execpath=stage1/bootsys$(EXEEXT) --translate --import=skip --output=$@ $< + +# +# Generic rules for compiling FASLs +# + +.PRECIOUS: %/.started +%/.started: + $(mkdir_p) $* + $(STAMP) $@ + +# Dependency for various modules. +# FIXME: This should be automatically extracted from the +# Boot source file at packaging time. +LISP_COMPILE = \ + $(DRIVER) --execpath=$(OA_LISPSYS) --output=$@ --compile + +%/utility.$(LNKEXT): %/utility.clisp %/.started + $(LISP_COMPILE) --load-directory=$* $< + +%/tokens.$(LNKEXT): %/tokens.clisp %/utility.$(LNKEXT) + $(LISP_COMPILE) --load-directory=$* $< + +%/includer.$(LNKEXT): %/includer.clisp %/tokens.$(LNKEXT) + $(LISP_COMPILE) --load-directory=$* $< + +%/scanner.$(LNKEXT): %/scanner.clisp %/tokens.$(LNKEXT) %/includer.$(LNKEXT) + $(LISP_COMPILE) --load-directory=$* $< + +%/pile.$(LNKEXT): %/pile.clisp %/scanner.$(LNKEXT) %/includer.$(LNKEXT) + $(LISP_COMPILE) --load-directory=$* $< + +%/ast.$(LNKEXT): %/ast.clisp %/includer.$(LNKEXT) + $(LISP_COMPILE) --load-directory=$* $< + +%/parser.$(LNKEXT): %/parser.clisp %/ast.$(LNKEXT) %/scanner.$(LNKEXT) \ + %/includer.$(LNKEXT) + $(LISP_COMPILE) --load-directory=$* $< + +%/translator.$(LNKEXT): %/translator.clisp %/parser.$(LNKEXT) \ + %/ast.$(LNKEXT) %/pile.$(LNKEXT) %/scanner.$(LNKEXT) \ + %/includer.$(LNKEXT) + $(LISP_COMPILE) --load-directory=$* $< + + +# +# Cleaning mess +# + +mostlyclean-local: + @rm -f $(oa_target_bindir)/bootsys$(EXEEXT) + @rm -rf prev-stage + @rm -rf strap stage1 stage2 + @rm -rf $(oa_target_bootdir) + @rm -f *.data *.fn + +clean-local: mostlyclean-local + @rm -f *.clisp + +distclean-local: clean-local diff --git a/src/boot/Makefile.in b/src/boot/Makefile.in index 4433414f..d0c35a72 100644 --- a/src/boot/Makefile.in +++ b/src/boot/Makefile.in @@ -1,89 +1,736 @@ -## Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -## All rights reserved. -## Copyright (C) 2007-2014, Gabriel Dos Reis. -## All rights reserved. -## -## Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## -## - Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## -## - Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## -## - Neither the name of The Numerical ALgorithms Group Ltd. nor the -## names of its contributors may be used to endorse or promote products -## derived from this software without specific prior written permission. -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -## IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -## PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -## OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -## LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -## SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -## - -## -## Abstract: -## OpenAxiom is built in layers. The first layer is contructed into -## an image called `bootsys'. The `bootsys' image is used -## to translate Boot code to Common Lisp code. Since a Boot coded -## interpreter is needed to translate the code for the Boot coded -## interpreter we have a ``boot-strapping'' problem. In order to get -## the whole process to start we need certain files kept in -## common lisp form. This directory contains those files. -## - -## We start with a Lisp image created in a previous build step (src/lisp). -## That image is used to build Boot translator executable through the -## entire bootstrap process. - +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. +# All rights reserved. +# Copyright (C) 2007-2014, Gabriel Dos Reis. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# - Neither the name of The Numerical ALgorithms Group Ltd. nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# +# Abstract: +# OpenAxiom is built in layers. The first layer is contructed into +# an image called `bootsys'. The `bootsys' image is used +# to translate Boot code to Common Lisp code. Since a Boot coded +# interpreter is needed to translate the code for the Boot coded +# interpreter we have a ``boot-strapping'' problem. In order to get +# the whole process to start we need certain files kept in +# common lisp form. This directory contains those files. +# + +# We start with a Lisp image created in a previous build step (src/lisp). +# That image is used to build Boot translator executable through the +# entire bootstrap process. + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +noinst_PROGRAMS = bootsys$(EXEEXT) +subdir = src/boot +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/config/mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ + $(top_srcdir)/config/ltoptions.m4 \ + $(top_srcdir)/config/ltsugar.m4 \ + $(top_srcdir)/config/ltversion.m4 \ + $(top_srcdir)/config/lt~obsolete.m4 \ + $(top_srcdir)/config/open-axiom.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config/openaxiom-c-macros.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_bootsys_OBJECTS = +bootsys_OBJECTS = $(am_bootsys_OBJECTS) +bootsys_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(bootsys_SOURCES) +DIST_SOURCES = $(bootsys_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FASLEXT = @FASLEXT@ +FGREP = @FGREP@ +GCLOPTS = @GCLOPTS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LATEX = @LATEX@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIPO = @LIPO@ +LNKEXT = @LNKEXT@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKE = @MAKE@ +MAKEINDEX = @MAKEINDEX@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKTEMP = @MKTEMP@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OA_LISP = @OA_LISP@ +OA_QT_MOC = @OA_QT_MOC@ +OA_QT_QMAKE = @OA_QT_QMAKE@ +OA_WINDOWS_POWERSHELL = @OA_WINDOWS_POWERSHELL@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PDFLATEX = @PDFLATEX@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TOUCH = @TOUCH@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_CLFAGS = @X_CLFAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +char_type = @char_type@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +double_type = @double_type@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +float_type = @float_type@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +int_type = @int_type@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libext = @libext@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oa_c_macros = @oa_c_macros@ +oa_c_runtime = @oa_c_runtime@ +oa_c_runtime_extra = @oa_c_runtime_extra@ +oa_cflags = @oa_cflags@ +oa_configdir = @oa_configdir@ +oa_delay_ffi = @oa_delay_ffi@ +oa_editor = @oa_editor@ +oa_enable_checking = @oa_enable_checking@ +oa_enable_profiling = @oa_enable_profiling@ +oa_enable_threads = @oa_enable_threads@ +oa_eval_flags = @oa_eval_flags@ +oa_host_has_regex = @oa_host_has_regex@ +oa_keep_files = @oa_keep_files@ +oa_lisp_flavor = @oa_lisp_flavor@ +oa_optimize_options = @oa_optimize_options@ +oa_quiet_flags = @oa_quiet_flags@ +oa_shrlib_flags = @oa_shrlib_flags@ +oa_shrobj_flags = @oa_shrobj_flags@ +oa_src_algdir = @oa_src_algdir@ +oa_src_datadir = @oa_src_datadir@ +oa_src_docdir = @oa_src_docdir@ +oa_src_srcdir = @oa_src_srcdir@ +oa_src_texdir = @oa_src_texdir@ +oa_standard_linking = @oa_standard_linking@ +oa_target_bindir = @oa_target_bindir@ +oa_target_datadir = @oa_target_datadir@ +oa_target_docdir = @oa_target_docdir@ +oa_target_includedir = @oa_target_includedir@ +oa_target_libdir = @oa_target_libdir@ +oa_target_srcdir = @oa_target_srcdir@ +oa_target_texdir = @oa_target_texdir@ +oa_targetdir = @oa_targetdir@ +oa_use_dynamic_lib = @oa_use_dynamic_lib@ +oa_use_libtool_for_shared_lib = @oa_use_libtool_for_shared_lib@ +oa_use_x = @oa_use_x@ +oldincludedir = @oldincludedir@ +open_axiom_installdir = @open_axiom_installdir@ +pdfdir = @pdfdir@ +pointer_type = @pointer_type@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +shared_ext = @shared_ext@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +string_type = @string_type@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +void_type = @void_type@ DRIVER = $(top_builddir)/src/driver/open-axiom$(EXEEXT) -AXIOM_LOCAL_LISP = $(oa_target_bindir)/lisp$(EXEEXT) - - -## FASLs that comprises `bootsys' -boot_SOURCES = utility.boot tokens.boot includer.boot scanner.boot \ - pile.boot ast.boot parser.boot translator.boot -boot_clisp = $(boot_SOURCES:.boot=.clisp) -boot_objects = $(boot_SOURCES:.boot=.$(LNKEXT)) +OA_LISPSYS = $(oa_target_bindir)/lisp$(EXEEXT) + +# Command used to link FASLs to produce a final executable. +LISP_LINK = \ + $(DRIVER) --execpath=$(OA_LISPSYS) --make \ + --main="|AxiomCore|::|topLevel|" --system=$(oa_targetdir) \ + --prologue='(pushnew :open-axiom-boot *features*)' + +bootsys_SOURCES = \ + utility.boot \ + tokens.boot \ + includer.boot \ + scanner.boot \ + pile.boot \ + ast.boot \ + parser.boot \ + translator.boot oa_target_bootdir = $(oa_targetdir)/boot -ifeq (@oa_lisp_flavor@,ecl) -oa_boot_linkset = $(oa_target_bootdir)/linkset -else -oa_boot_linkset = -endif +@OA_ECL_RT_FALSE@oa_bootsys_linkset = +@OA_ECL_RT_TRUE@oa_bootsys_linkset = $(oa_target_bootdir)/linkset +bootsys_DEPENDENCIES = stage2/bootsys$(EXEEXT) $(oa_bootsys_linkset) + +# FASLs that comprises `bootsys' +bootsys_clisp = $(bootsys_SOURCES:.boot=.clisp) +bootsys_objects = $(bootsys_SOURCES:.boot=.$(LNKEXT)) # Garbage produced by GCL during compilation -boot_data = $(boot_SOURCES:.boot=.data) -boot_fn = $(boot_SOURCES:.boot=.fn) +bootsys_data = $(bootsys_SOURCES:.boot=.data) +bootsys_fn = $(bootsys_SOURCES:.boot=.fn) +STAMP = touch + +# +# The bootstrapping `bootsys' image. +# + +# The bootstrapping Lisp code is cached in the subdirectory strap/. +# It is built first, followed by stage 1, and stage 2 `bootsys' images. +strap_bootsys_clisp = $(addprefix strap/, $(bootsys_clisp)) +strap_bootsys_objects = \ + $(addprefix strap/, $(bootsys_objects)) + +stage1_bootsys_clisp = $(addprefix stage1/, $(bootsys_clisp)) +stage1_bootsys_objects = \ + $(addprefix stage1/, $(bootsys_objects)) + +stage2_bootsys_clisp = $(addprefix stage2/, $(bootsys_clisp)) +stage2_bootsys_objects = \ + $(addprefix stage2/, $(bootsys_objects)) + + +# Dependency for various modules. +# FIXME: This should be automatically extracted from the +# Boot source file at packaging time. +LISP_COMPILE = \ + $(DRIVER) --execpath=$(OA_LISPSYS) --output=$@ --compile + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/boot/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/boot/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +bootsys$(EXEEXT): $(bootsys_OBJECTS) $(bootsys_DEPENDENCIES) $(EXTRA_bootsys_DEPENDENCIES) + @rm -f bootsys$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bootsys_OBJECTS) $(bootsys_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-local distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic -# reference to this directory from toplevel -subdir = src/boot/ - -## Make rule toplevel entry points. +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile 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 maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + + +# Make rule toplevel entry points. .PHONY: all-boot -all: all-boot -all-boot: $(oa_target_bindir)/bootsys$(EXEEXT) $(oa_boot_linkset) +all-am: all-boot +all-boot: $(oa_target_bindir)/bootsys$(EXEEXT) $(oa_bootsys_linkset) -## The final `bootsys' image. +# The final `bootsys' image. $(oa_target_bindir)/bootsys$(EXEEXT): stage2/bootsys$(EXEEXT) cp -p $< $@ -$(oa_boot_linkset): $(addprefix $(oa_target_bootdir)/, $(boot_objects)) +$(oa_bootsys_linkset): $(addprefix $(oa_target_bootdir)/, $(bootsys_objects)) rm -f $@ - echo '($(patsubst %, "%", $(boot_objects)))' > $@ + echo '($(patsubst %, "%", $(bootsys_objects)))' > $@ $(oa_target_bootdir)/%.$(LNKEXT): stage2/%.$(LNKEXT) $(oa_target_bootdir) cp $< $@ @@ -94,127 +741,93 @@ $(oa_target_bootdir): .PRECIOUS: strap/%.$(FASLEXT) .PRECIOUS: strap/%.$(LNKEXT) -## -## The bootstrapping `bootsys' image. -## - -# The bootstrapping Lisp code is cached in the subdirectory strap/. -# It is built first, followed by stage 1, and stage 2 `bootsys' images. -strap_boot_clisp = $(addprefix strap/, $(boot_clisp)) - -strap_boot_objects = \ - $(addprefix strap/, $(boot_objects)) - strap/stamp: strap/bootsys$(EXEEXT) @rm -f $@ @$(STAMP) $@ -strap/bootsys$(EXEEXT): $(strap_boot_objects) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --make --main="|AxiomCore|::|topLevel|"\ - --system=$(oa_targetdir) \ - --prologue='(pushnew :open-axiom-boot *features*)' \ - --output=$@ --load-directory=strap $(strap_boot_objects) +strap/bootsys$(EXEEXT): $(strap_bootsys_objects) + $(LISP_LINK) --output=$@ \ + --load-directory=strap $(strap_bootsys_objects) +$(strap_bootsys_objects): $(OA_LISPSYS) -$(strap_boot_objects): $(AXIOM_LOCAL_LISP) - -## -## Stage 1 `bootsys' image. -## +# +# Stage 1 `bootsys' image. +# .PRECIOUS: stage1/%.$(FASLEXT) .PRECIOUS: stage1/%.$(LNKEXT) .PRECIOUS: stage1/%.clisp -stage1_boot_clisp = $(addprefix stage1/, $(boot_clisp)) - -stage1_boot_objects = \ - $(addprefix stage1/, $(boot_objects)) - stage1/stamp: stage1/bootsys$(EXEEXT) rm -f $@ $(STAMP) $@ -stage1/bootsys$(EXEEXT): $(stage1_boot_objects) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --make --main="|AxiomCore|::|topLevel|" \ - --system=$(oa_targetdir) \ - --prologue='(pushnew :open-axiom-boot *features*)' \ - --output=$@ --load-directory=stage1 $(stage1_boot_objects) +stage1/bootsys$(EXEEXT): $(stage1_bootsys_objects) + $(LISP_LINK) --output=$@ \ + --load-directory=stage1 $(stage1_bootsys_objects) stage1/%.clisp: %.boot strap/stamp stage1/.started $(DRIVER) --execpath=strap/bootsys$(EXEEXT) --translate --import=skip --output=$@ $< - -## -## Stage 2 `bootsys' image. -## +# +# Stage 2 `bootsys' image. +# .PRECIOUS: stage2/%.$(FASLEXT) .PRECIOUS: stage2/%.$(LNKEXT) .PRECIOUS: stage2/%.clisp -stage2_boot_clisp = $(addprefix stage2/, $(boot_clisp)) - -stage2_boot_objects = \ - $(addprefix stage2/, $(boot_objects)) - stage2/stamp: stage2/bootsys$(EXEEXT) @echo Building stage 2 $(STAMP) $@ -stage2/bootsys$(EXEEXT): $(stage2_boot_objects) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --make --main="|AxiomCore|::|topLevel|" \ - --system=$(oa_targetdir) \ - --prologue='(pushnew :open-axiom-boot *features*)' \ - --output=$@ --load-directory=stage2 $(stage2_boot_objects) +stage2/bootsys$(EXEEXT): $(stage2_bootsys_objects) + $(LISP_LINK) --output=$@ \ + --load-directory=stage2 $(stage2_bootsys_objects) stage2/%.clisp: %.boot stage1/stamp stage2/.started $(DRIVER) --execpath=stage1/bootsys$(EXEEXT) --translate --import=skip --output=$@ $< -## -## Generic rules for compiling FASLs -## +# +# Generic rules for compiling FASLs +# .PRECIOUS: %/.started %/.started: $(mkdir_p) $* $(STAMP) $@ -## Dependency for various modules. -## FIXME: This should be automatically extracted from the -## Boot source file at packaging time. - %/utility.$(LNKEXT): %/utility.clisp %/.started - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< + $(LISP_COMPILE) --load-directory=$* $< %/tokens.$(LNKEXT): %/tokens.clisp %/utility.$(LNKEXT) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< + $(LISP_COMPILE) --load-directory=$* $< %/includer.$(LNKEXT): %/includer.clisp %/tokens.$(LNKEXT) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< + $(LISP_COMPILE) --load-directory=$* $< %/scanner.$(LNKEXT): %/scanner.clisp %/tokens.$(LNKEXT) %/includer.$(LNKEXT) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< + $(LISP_COMPILE) --load-directory=$* $< %/pile.$(LNKEXT): %/pile.clisp %/scanner.$(LNKEXT) %/includer.$(LNKEXT) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< + $(LISP_COMPILE) --load-directory=$* $< %/ast.$(LNKEXT): %/ast.clisp %/includer.$(LNKEXT) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< + $(LISP_COMPILE) --load-directory=$* $< %/parser.$(LNKEXT): %/parser.clisp %/ast.$(LNKEXT) %/scanner.$(LNKEXT) \ %/includer.$(LNKEXT) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< + $(LISP_COMPILE) --load-directory=$* $< %/translator.$(LNKEXT): %/translator.clisp %/parser.$(LNKEXT) \ %/ast.$(LNKEXT) %/pile.$(LNKEXT) %/scanner.$(LNKEXT) \ %/includer.$(LNKEXT) - $(DRIVER) --execpath=$(AXIOM_LOCAL_LISP) --output=$@ --compile --load-directory=$* $< - + $(LISP_COMPILE) --load-directory=$* $< -## -## Cleaning mess -## +# +# Cleaning mess +# mostlyclean-local: @rm -f $(oa_target_bindir)/bootsys$(EXEEXT) @@ -227,3 +840,7 @@ clean-local: mostlyclean-local @rm -f *.clisp distclean-local: clean-local + +# 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/include/Lisp.H b/src/include/Lisp.H index e10aeaf6..724ab54b 100644 --- a/src/include/Lisp.H +++ b/src/include/Lisp.H @@ -1,4 +1,4 @@ -// Copyright (C) 2013, Gabriel Dos Reis. +// Copyright (C) 2013-2014, Gabriel Dos Reis. // All rights reserved. // Written by Gabriel Dos Reis. // diff --git a/src/include/vm.H b/src/include/vm.H index 3fbe94ae..6a3dc872 100644 --- a/src/include/vm.H +++ b/src/include/vm.H @@ -127,7 +127,7 @@ namespace OpenAxiom { // Next, // II. All foreign pointers that are aligned on 8-boundary are // directly represented. Any foreign pointer not meeting - // this condition is allocated in internal obejcts. As a + // this condition is stored in an internal object. As a // consequence, the last four bits of all foreign addresses // directly represented follow the pattern 0bx000. // diff --git a/src/io/Makefile.in b/src/io/Makefile.in index 2b0c7d32..3118c271 100644 --- a/src/io/Makefile.in +++ b/src/io/Makefile.in @@ -250,6 +250,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ +LNKEXT = @LNKEXT@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ diff --git a/src/rt/Makefile.in b/src/rt/Makefile.in index 9cbce2df..a1361602 100644 --- a/src/rt/Makefile.in +++ b/src/rt/Makefile.in @@ -250,6 +250,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ +LNKEXT = @LNKEXT@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ diff --git a/src/syntax/Makefile.in b/src/syntax/Makefile.in index 56fcaf5a..57a44ec7 100644 --- a/src/syntax/Makefile.in +++ b/src/syntax/Makefile.in @@ -250,6 +250,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ +LNKEXT = @LNKEXT@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ |