Skip to content

Commit

Permalink
WIP -- "website" submodule is blocking progress
Browse files Browse the repository at this point in the history
These changes are about making build with packages work without requiring a
separate workspace directory above the package directory, so for example moving
the bootstrap1-registry into Bootstrap.1/registry.  The "website" module isn't
in the catalog but is a dev dependency. I could just remove it as a dev
dependency to make progress. Or I could work on improving the state of the
integrated website and doc generation....
  • Loading branch information
cgay committed Mar 12, 2024
1 parent b94ccad commit 45f280c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
29 changes: 17 additions & 12 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down Expand Up @@ -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
Expand All @@ -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) \
Expand All @@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 45f280c

Please sign in to comment.