diff --git a/.gitignore b/.gitignore index f3b8cabd5..30f984f4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ *~ *.pyc /Makefile -/aclocal.m4 /Bootstrap.*/ +/_build/ +/aclocal.m4 /config.log /config.status /configure /config/build-aux/ /autom4te*.cache/ -/sources/bootstrap1-registry/ /sources/corba/scepter/front-end/file/parser.dylan /sources/corba/orb/iop-protocol/ /sources/corba/orb/ir-protocol/ diff --git a/Makefile.in b/Makefile.in index 74f0845f8..ad2a24f7c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,7 +7,7 @@ # possible during cross compilation) then the workspace tool needs to be told # to generate registries for that platform instead. # * Make sure it's still possible to build when off-network, as long as deps -# are already installed. +# are already installed. dylan-tool probably needs changes to make this work. prefix = @prefix@ @@ -66,20 +66,25 @@ all: @bootstrap_target@ # registry and submodules. (In future we can use the dylan-tool bundled with # the OD release instead of building it here.) +# WORKSPACE_DIR is where dylan-tool generates the registry and puts the _build +# directory. See https://opendylan.org/package/dylan-tool/index.html#workspaces +# # TODO: use `$(DYLAN_TOOL) status --directory` instead, when that is fixed to -# output only the directory name. +# output only the workspace directory name. That will handle multi-repository +# workspaces correctly. +WORKSPACE_DIR = $(abs_srcdir) -WORKSPACE_DIR := $(shell dirname $(abs_srcdir)) -DYLAN_TOOL_APP = $(WORKSPACE_DIR)/_build/bin/dylan-tool +DYLAN_TOOL_APP = $(abs_srcdir)/_build/sbin/dylan-tool-app build-dylan-tool: @echo Building dylan-tool... - @OPEN_DYLAN_USER_ROOT=$(WORKSPACE_DIR)/_build \ + @OPEN_DYLAN_USER_ROOT=$(abs_srcdir)/_build \ + OPEN_DYLAN_USER_REGISTRIES=$(abs_srcdir)/sources/app/dylan-tool/registry \ $(MAKE) -C sources/app/dylan-tool build # Add --verbose before "update" to debug. update-workspace: - $(DYLAN_TOOL_APP) update + $(DYLAN_TOOL_APP) --verbose update ######################################################################## # Stage 1 builds a compiler that can understand new primitives used in the @@ -90,9 +95,10 @@ update-workspace: BOOTSTRAP_1_ROOT = $(abs_builddir)/Bootstrap.1 -# This must be in the same directory as the main registry because files are -# copied from one to the other and the relative pathnames won't work otherwise. -BOOTSTRAP_1_REGISTRY = $(WORKSPACE_DIR)/bootstrap1-registry +# Note that putting this registry anywhere but in sources/ only works because +# dylan-tool generates files with absolute pathnames. Relative pathnames +# wouldn't work when the registry is copied to a different directory. +BOOTSTRAP_1_REGISTRY = $(BOOTSTRAP_1_ROOT)/registry BOOTSTRAP_1_ENV = \ OPEN_DYLAN_TARGET_PLATFORM=$(TARGET_PLATFORM) \ @@ -117,7 +123,7 @@ bootstrap-stage-1-dirs: # directory. $(BOOTSTRAP_1_REGISTRY): update-workspace mkdir -p $(BOOTSTRAP_1_REGISTRY) - cp -r $(WORKSPACE_DIR)/registry/$(TARGET_PLATFORM) $(BOOTSTRAP_1_REGISTRY) + cp -r $(WORKSPACE_DIR)/registry/* $(BOOTSTRAP_1_REGISTRY) for lib in $(BOOTSTRAP_1_PRIMITIVE_LIBS); do \ rm -f $(BOOTSTRAP_1_REGISTRY)/*/$$lib; \ done @@ -306,7 +312,6 @@ clean: -rm -rf $(abs_builddir)/Bootstrap.3 -rm -rf $(abs_builddir)/release -rm -rf $(abs_builddir)/opendylan-*.tar.bz2 - -rm -rf $(BOOTSTRAP_1_REGISTRY) -rm -rf $(WORKSPACE_DIR)/registry -rm -rf $(WORKSPACE_DIR)/_build @for target_platform in $(RUNTIME_TARGET_PLATFORMS); do \ @@ -342,7 +347,7 @@ distclean: clean -rm -f Makefile -rm -f sources/lib/run-time/Makefile -rm -f sources/jamfiles/Makefile sources/jamfiles/config.jam - -rm -rf build-aux + -rm -rf config/build-aux -rm -rf autom4te.cache mostlyclean: