Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

339 lines (285 sloc) 13.011 kb
prefix = $(DESTDIR)@prefix@
srcdir = @abs_srcdir@
abs_srcdir = @abs_srcdir@
abs_builddir = @abs_builddir@
OPEN_DYLAN_PLATFORM_NAME = @OPEN_DYLAN_PLATFORM_NAME@
RUNTIME_SOURCES = @RUNTIME_SOURCES@
fdmake = @PERL@ $(srcdir)/admin/builds/fdmake.pl
DYLANCOMPILER = @DYLANCOMPILER@
.PHONY: 1-stage-bootstrap 1-stage-bootstrap-reentry \
2-stage-bootstrap 2-stage-bootstrap-reentry \
3-stage-bootstrap 3-stage-bootstrap-reentry \
bootstrap-stage-1 bootstrap-stage-2 bootstrap-stage-3 \
all install install-stage release release-stage uninstall clean check
all: @bootstrap_target@
###
# 3-stage bootstrap includes stages 1 and 2 and 3: it rebuilds the compiler
# and libraries, then rebuilds them again to take advantage of new
# optimizations. The 3-stage bootstrap is useful to build Open Dylan locally
# without installing it; if you want to install it, do a 3-stage bootstrap and
# run make install
3-stage-bootstrap:
$(MAKE) 3-stage-bootstrap-reentry \
BOOTSTRAP_2_COMPILER="$(abs_builddir)/Bootstrap.1/bin/dylan-compiler -build"
3-stage-bootstrap-reentry: bootstrap-stage-1 bootstrap-stage-2 bootstrap-stage-3
###
# 2-stage bootstrap includes both stages 1 and 2: it rebuilds the compiler to
# support new primitives and rebuilds the libraries using that compiler.
2-stage-bootstrap:
$(MAKE) 2-stage-bootstrap-reentry \
BOOTSTRAP_2_COMPILER="$(abs_builddir)/Bootstrap.1/bin/dylan-compiler -build"
2-stage-bootstrap-reentry: bootstrap-stage-1 bootstrap-stage-2
###
# 1-stage bootstrap includes only stage 2: it rebuilds compiler and libraries
# when the existing compiler and libraries will understand the primitives.
1-stage-bootstrap:
$(MAKE) 1-stage-bootstrap-reentry \
BOOTSTRAP_2_COMPILER="$(DYLANCOMPILER)"
1-stage-bootstrap-reentry: bootstrap-stage-2
###
# Stage 1 builds a compiler that can understand new primitives used in the
# BOOTSTRAP_1_PRIMITIVE_LIBS libraries. An existing compiler won't understand
# the new stuff, so until a new compiler is built, existing libs are used
# instead. Note that the stage 1 dylan-compiler loads a mix of existing and
# stage 1 libraries.
BOOTSTRAP_1_PRIMITIVE_LIBS = \
dylan functional-extensions machine-word byte-vector \
threads transcendentals functional-dylan \
common-extensions common-dylan unix-portability \
c-ffi bit-vector bit-set collectors plists set \
table-extensions collections streams standard-io \
print format format-out io date file-system \
operating-system locators settings system \
generic-arithmetic big-integers duim-utilities \
duim-geometry duim-dcs duim-sheets duim-graphics \
duim-layouts duim-gadgets duim-frames duim-core \
duim-extended-geometry duim-gadget-panes duim \
winsock2 sockets network midi \
deuce duim-deuce com ole ole-server sql odbc-ffi \
sql-odbc corba-dylan corba-protocol dylan-orb \
iop-protocol ir-protocol ir-stubs orb-connections \
orb-core orb-iiop orb-ir orb-poa orb-streams \
orb-utilities portableserver-protocol \
naming-protocol naming-stubs naming-client
BOOTSTRAP_1_REGISTRY = $(abs_srcdir)/sources/bootstrap1-registry
BOOTSTRAP_1_ENV = \
OPEN_DYLAN_PLATFORM_NAME=$(OPEN_DYLAN_PLATFORM_NAME) \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.1/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.1 \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.1 \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.1/build \
OPEN_DYLAN_USER_REGISTRIES=$(BOOTSTRAP_1_REGISTRY) \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
$(abs_builddir)/Bootstrap.1:
mkdir $(abs_builddir)/Bootstrap.1
mkdir $(abs_builddir)/Bootstrap.1/bin
mkdir $(abs_builddir)/Bootstrap.1/lib
mkdir $(abs_builddir)/Bootstrap.1/lib/runtime
mkdir $(abs_builddir)/Bootstrap.1/build
mkdir $(abs_builddir)/Bootstrap.1/build/logs
$(BOOTSTRAP_1_REGISTRY):
mkdir $(BOOTSTRAP_1_REGISTRY)
cp -r $(srcdir)/sources/registry/generic $(BOOTSTRAP_1_REGISTRY)
cp -r $(srcdir)/sources/registry/$(OPEN_DYLAN_PLATFORM_NAME) $(BOOTSTRAP_1_REGISTRY)
for lib in $(BOOTSTRAP_1_PRIMITIVE_LIBS); do \
rm -f $(BOOTSTRAP_1_REGISTRY)/generic/$$lib; \
rm -f $(BOOTSTRAP_1_REGISTRY)/$(OPEN_DYLAN_PLATFORM_NAME)/$$lib; \
done
$(abs_builddir)/Bootstrap.1/bin/dylan-compiler:
@echo Building Open Dylan bootstrap stage 1...
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.1 \
$(MAKE) -C sources/jamfiles install
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.1 \
$(MAKE) -C $(RUNTIME_SOURCES) install
@$(BOOTSTRAP_1_ENV) \
$(fdmake) --compiler="$(DYLANCOMPILER)" dylan-compiler
bootstrap-stage-1: \
$(abs_builddir)/Bootstrap.1 \
$(BOOTSTRAP_1_REGISTRY) \
$(abs_builddir)/Bootstrap.1/bin/dylan-compiler
###
# Stage 2 bootstrap builds altered libraries and compiler and does not link to
# any existing or stage 1 libraries.
BOOTSTRAP_2_ENV = \
OPEN_DYLAN_PLATFORM_NAME=$(OPEN_DYLAN_PLATFORM_NAME) \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.2/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.2/build \
OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
BOOTSTRAP_2_UNSET_ENV = \
OPEN_DYLAN_RELEASE_ROOT \
OPEN_DYLAN_RELEASE_INSTALL \
OPEN_DYLAN_RELEASE_BUILD \
OPEN_DYLAN_RELEASE_REGISTRIES \
OPEN_DYLAN_RELEASE_SOURCES
$(abs_builddir)/Bootstrap.2:
mkdir $(abs_builddir)/Bootstrap.2
mkdir $(abs_builddir)/Bootstrap.2/bin
mkdir $(abs_builddir)/Bootstrap.2/lib
mkdir $(abs_builddir)/Bootstrap.2/lib/runtime
mkdir $(abs_builddir)/Bootstrap.2/build
mkdir $(abs_builddir)/Bootstrap.2/build/logs
$(abs_builddir)/Bootstrap.2/bin/dylan-compiler:
@echo Building Open Dylan bootstrap stage 2...
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.2 \
$(MAKE) -C sources/jamfiles install
@unset $(BOOTSTRAP_2_UNSET_ENV) ; \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.2 \
$(MAKE) -C $(RUNTIME_SOURCES) install
@unset $(BOOTSTRAP_2_UNSET_ENV) ; \
$(BOOTSTRAP_2_ENV) \
$(fdmake) --compiler="$(BOOTSTRAP_2_COMPILER)" dylan-compiler
bootstrap-stage-2: \
$(abs_builddir)/Bootstrap.2 \
$(abs_builddir)/Bootstrap.2/bin/dylan-compiler
###
# Stage 3 builds libraries and compiler using stage 2 products, taking
# advantage of any new optimizations etc. in this release. It basically builds
# an installation without actually installing it.
BOOTSTRAP_3_ENV = \
OPEN_DYLAN_PLATFORM_NAME=$(OPEN_DYLAN_PLATFORM_NAME) \
OPEN_DYLAN_RELEASE_ROOT=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_RELEASE_INSTALL=$(abs_builddir)/Bootstrap.2 \
OPEN_DYLAN_RELEASE_BUILD=$(abs_builddir)/Bootstrap.2/build \
OPEN_DYLAN_RELEASE_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_RELEASE_SOURCES=$(abs_srcdir)/sources \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.3/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.3 \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.3 \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.3/build \
OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
BOOTSTRAP_3_LIBRARIES = dylan-compiler dswank make-dylan-app
BOOTSTRAP_3_COMPILER = \
$(abs_builddir)/Bootstrap.2/bin/dylan-compiler -build
$(abs_builddir)/Bootstrap.3:
mkdir $(abs_builddir)/Bootstrap.3
mkdir $(abs_builddir)/Bootstrap.3/bin
mkdir $(abs_builddir)/Bootstrap.3/lib
mkdir $(abs_builddir)/Bootstrap.3/lib/runtime
mkdir $(abs_builddir)/Bootstrap.3/build
mkdir $(abs_builddir)/Bootstrap.3/build/logs
bootstrap-stage-3: $(abs_builddir)/Bootstrap.3
@echo Building Open Dylan bootstrap stage 3...
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.3 \
$(MAKE) -C sources/jamfiles install
@OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.3 \
$(MAKE) -C $(RUNTIME_SOURCES) install
@$(BOOTSTRAP_3_ENV) \
$(fdmake) --compiler="$(BOOTSTRAP_3_COMPILER)" $(BOOTSTRAP_3_LIBRARIES)
###
# Install stage installs stage 3 into prefix
$(prefix)/sources:
install -d $(prefix)
@echo Copying sources...
cp -R $(abs_srcdir)/sources $(prefix)
@echo Removing unnecessary directories...
find $(prefix)/sources -depth -name '.*' -exec rm -rf {} \;
-rm -r $(prefix)/sources/bootstrap1-registry
install-stage: $(prefix)/sources
install -d $(prefix)/bin $(prefix)/databases $(prefix)/lib $(prefix)/lib/runtime
@echo Installing Open Dylan...
cp -R $(abs_builddir)/Bootstrap.3/bin $(prefix)
cp -R $(abs_builddir)/Bootstrap.3/databases $(prefix)
-cp -R $(abs_builddir)/Bootstrap.3/include $(prefix)
cp -R $(abs_builddir)/Bootstrap.3/lib $(prefix)
cp $(abs_srcdir)/License.txt $(prefix)
cp $(abs_srcdir)/packages/unix/README $(prefix)
install: @bootstrap_target@ 3-stage-bootstrap install-stage
version = $(shell $(abs_builddir)/Bootstrap.3/bin/dylan-compiler -shortversion)
###
# release packs a tarball
release-stage:
-mkdir $(abs_builddir)/release
-mkdir $(abs_builddir)/release/opendylan-$(version)
-mkdir $(abs_builddir)/release/opendylan-$(version)/bin
-mkdir $(abs_builddir)/release/opendylan-$(version)/databases
-mkdir $(abs_builddir)/release/opendylan-$(version)/include
-mkdir $(abs_builddir)/release/opendylan-$(version)/lib
-mkdir $(abs_builddir)/release/opendylan-$(version)/sources
@echo Copying sources...
cp -R $(abs_srcdir)/sources $(abs_builddir)/release/opendylan-$(version)
@echo Removing unnecessary directories...
find $(abs_builddir)/release/opendylan-$(version)/sources -depth -name '.*' -exec rm -rf {} \;
-rm -r $(abs_builddir)/release/opendylan-$(version)/sources/bootstrap1-registry
cp -R $(abs_builddir)/Bootstrap.3/bin $(abs_builddir)/release/opendylan-$(version)
cp -R $(abs_builddir)/Bootstrap.3/databases $(abs_builddir)/release/opendylan-$(version)
-cp -R $(abs_builddir)/Bootstrap.3/include $(abs_builddir)/release/opendylan-$(version)
cp -R $(abs_builddir)/Bootstrap.3/lib $(abs_builddir)/release/opendylan-$(version)
cp $(abs_srcdir)/License.txt $(abs_builddir)/release/opendylan-$(version)
cp $(abs_srcdir)/packages/unix/README $(abs_builddir)/release/opendylan-$(version)
cd $(abs_builddir)/release; \
tar cjf $(abs_builddir)/opendylan-$(version)-$(OPEN_DYLAN_PLATFORM_NAME).tar.bz2 opendylan-$(version)
-mkdir $(abs_builddir)/release/opendylan-$(version)/build
cp -R $(abs_builddir)/Bootstrap.3/build $(abs_builddir)/release/opendylan-$(version)
cd $(abs_builddir)/release/; \
tar cjf $(abs_builddir)/opendylan-$(version)-$(OPEN_DYLAN_PLATFORM_NAME)-debug-info.tar.bz2 opendylan-$(version)/build
release: @bootstrap_target@ 3-stage-bootstrap release-stage
###
# Maintenance and test targets
# The only safe directory to delete is $(prefix)/sources. $(prefix)/bin and the
# others may have user content if $(prefix) is /usr or /usr/local.
uninstall:
rm -rf $(prefix)/sources
install-strip:
clean:
-rm -rf $(abs_builddir)/Bootstrap.1
-rm -rf $(abs_builddir)/Bootstrap.2
-rm -rf $(abs_builddir)/Bootstrap.3
-rm -rf $(abs_builddir)/release
-rm -rf $(abs_builddir)/opendylan-*.tar.bz2
-rm -rf $(BOOTSTRAP_1_REGISTRY)
$(MAKE) -C $(RUNTIME_SOURCES) clean
distclean: clean
-rm -f aclocal.m4
-rm -f configure
-rm -f config.log
-rm -f config.status
-rm -f config.status.lineno
-rm -f Makefile sources/lib/run-time/pentium-linux/Makefile sources/lib/run-time/pentium-freebsd/Makefile
-rm -f sources/dfmc/c-run-time/Makefile
-rm -f sources/jamfiles/Makefile sources/jamfiles/config.jam
-rm -rf build-aux
-rm -rf autom4te.cache
mostlyclean:
maintainer-clean:
TAGS:
dist:
CHECK_STAGE = 3
CHECK_COMPILER_STAGE = $(CHECK_STAGE)
CHECK_APPS = \
libraries-test-suite-app \
c-ffi-test-suite-app \
duim-test-suite-app \
deuce-test-suite-app \
jam-test-suite-app \
channels-tests \
command-line-parser-test-suite-app
CHECK_ENV = \
OPEN_DYLAN_PLATFORM_NAME=$(OPEN_DYLAN_PLATFORM_NAME) \
OPEN_DYLAN_RELEASE_ROOT=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_RELEASE_INSTALL=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_RELEASE_BUILD=$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/build \
OPEN_DYLAN_RELEASE_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_RELEASE_SOURCES=$(abs_srcdir)/sources \
OPEN_DYLAN_BUILD_LOGS=$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/build/logs \
OPEN_DYLAN_USER_ROOT=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_USER_INSTALL=$(abs_builddir)/Bootstrap.$(CHECK_STAGE) \
OPEN_DYLAN_USER_BUILD=$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/build \
OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/registry \
OPEN_DYLAN_USER_SOURCES=$(abs_srcdir)/sources
check: bootstrap-stage-$(CHECK_COMPILER_STAGE)
@$(CHECK_ENV) \
$(fdmake) \
--compiler="$(abs_builddir)/Bootstrap.$(CHECK_COMPILER_STAGE)/bin/dylan-compiler -build -save" \
$(CHECK_APPS) && \
for app in $(CHECK_APPS); do \
$(abs_builddir)/Bootstrap.$(CHECK_STAGE)/bin/$$app; \
done
installcheck:
installdirs:
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=./$@ $(SHELL) ./config.status
Jump to Line
Something went wrong with that request. Please try again.