Skip to content
This repository was archived by the owner on Apr 21, 2024. It is now read-only.

Housekeeping stuff #59

Merged
merged 4 commits into from
May 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,25 @@ install_lib = $(install_dir)/lib
link_target = $(install_bin)/dylan-tool-app
link_source = $(DYLAN)/bin/dylan

.PHONY: build clean install test dist distclean
.PHONY: build build-with-version clean install install-debug really-install remove-dylan-tool-artifacts test dist distclean

# Add the local registry to OPEN_DYLAN_USER_REGISTRIES because if the variable
# is already set and does not include the local registry, the local registry is
# ignored. We do not want to end up building ${OD}/sources/app/dylan-tool.
build:
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry:${OPEN_DYLAN_USER_REGISTRIES} \
dylan-compiler -build dylan-tool-app
build: remove-dylan-tool-artifacts
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build dylan-tool-app

# Hack to add the version to the binary with git tag info. Don't want this to
# be the normal build because it causes unnecessary rebuilds.
build-with-version:
file="commands/utils.dylan"; \
orig=$$(mktemp); \
temp=$$(mktemp); \
cp -p $${file} $${orig}; \
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"$$(git describe --tags)\" /*__*/,g" > $${temp}; \
mv $${temp} $${file}; \
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry:${OPEN_DYLAN_USER_REGISTRIES} \
dylan-compiler -build dylan-tool-app; \
cp -p $${orig} $${file}
build-with-version: remove-dylan-tool-artifacts
file="sources/commands/utils.dylan"; \
orig=$$(mktemp); \
temp=$$(mktemp); \
cp -p $${file} $${orig}; \
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"$$(git describe --tags --always)\" /*__*/,g" > $${temp}; \
mv $${temp} $${file}; \
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build dylan-tool-app; \
cp -p $${orig} $${file}

# After the next OD release (post 2022.1) this should install a static exe
# built with the -unify flag.
really-install:
mkdir -p $(install_bin)
mkdir -p $(install_lib)
Expand All @@ -54,8 +51,6 @@ really-install:
ln -s $$(realpath $(link_target)) $$(realpath $(link_source)); \
fi;

# After the next OD release this should install a static exe built with the
# -unify flag.
install: build-with-version really-install

# Build and install without the version hacking above.
Expand All @@ -64,13 +59,19 @@ install-debug: build really-install
# dylan-tool needs to be buildable with submodules so that it can be built on
# new platforms without having to manually install deps.
test: build
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry:${OPEN_DYLAN_USER_REGISTRIES} \
dylan-compiler -build dylan-tool-test-suite \
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry \
dylan-compiler -build dylan-tool-test-suite \
&& DYLAN_CATALOG=ext/pacman-catalog _build/bin/dylan-tool-test-suite

dist: distclean install

clean:
# Sometimes I use dylan-tool to develop dylan-tool, so this makes sure to clean
# up its artifacts.
remove-dylan-tool-artifacts:
rm -rf _packages
find registry -not -path '*/generic/*' -type f -exec rm {} \;

clean: remove-dylan-tool-artifacts
rm -rf _build

distclean: clean
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Dylan Tool

[![Gitter](https://badges.gitter.im/dylan-lang/general.svg)](https://gitter.im/dylan-lang/general?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![tests](https://github.com/cgay/dylan-tool/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/cgay/dylan-tool/actions/workflows/build-and-test.yml)
[![tests](https://github.com/dylan-lang/dylan-tool/actions/workflows/test.yaml/badge.svg)](https://github.com/dylan-lang/dylan-tool/actions/workflows/test.yaml)
[![GitHub issues](https://img.shields.io/github/issues/dylan-lang/dylan-tool?color=blue)](https://github.com/dylan-lang/dylan-tool/issues)
[![Matrix](https://img.shields.io/matrix/dylan-lang-general:matrix.org?color=blue&label=Chat%20on%20Matrix&server_fqdn=matrix.org)](https://app.element.io/#/room/#dylan-language:matrix.org)

The `dylan` tool simplifies the management of Dylan workspaces and packages and
provides a simplified interface to the Open Dylan compiler for building and
Expand Down
2 changes: 1 addition & 1 deletion ext/json
Submodule json updated 1 files
+9 −0 dylan-package.json
2 changes: 1 addition & 1 deletion ext/sphinx-extensions
2 changes: 1 addition & 1 deletion ext/testworks
2 changes: 1 addition & 1 deletion registry/generic/dylan-tool
Original file line number Diff line number Diff line change
@@ -1 +1 @@
abstract://dylan/dylan-tool.lid
abstract://dylan/sources/dylan-tool.lid
2 changes: 1 addition & 1 deletion registry/generic/dylan-tool-app
Original file line number Diff line number Diff line change
@@ -1 +1 @@
abstract://dylan/dylan-tool-app.lid
abstract://dylan/sources/dylan-tool-app.lid
2 changes: 1 addition & 1 deletion registry/generic/dylan-tool-test-suite
Original file line number Diff line number Diff line change
@@ -1 +1 @@
abstract://dylan/tests/dylan-tool-test-suite.lid
abstract://dylan/sources/test-suite.lid
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions sources/test-suite.lid
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
library: dylan-tool-test-suite
files: test-suite-library.dylan
test-utils.dylan
shared-test.dylan
pacman/catalog-test.dylan
pacman/deps-test.dylan
pacman/install-test.dylan
pacman/packages-test.dylan
pacman/versions-test.dylan
workspaces/registry-test.dylan
workspaces/workspaces-test.dylan
test-suite.dylan
File renamed without changes.
12 changes: 0 additions & 12 deletions tests/dylan-tool-test-suite.lid

This file was deleted.