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

Commit 53e47ff

Browse files
authored
Merge pull request #59 from cgay/dev
Housekeeping stuff
2 parents 8d2f4ce + 4bd1b0c commit 53e47ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+48
-45
lines changed

Makefile

+23-22
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,25 @@ install_lib = $(install_dir)/lib
2222
link_target = $(install_bin)/dylan-tool-app
2323
link_source = $(DYLAN)/bin/dylan
2424

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

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

3430
# Hack to add the version to the binary with git tag info. Don't want this to
3531
# be the normal build because it causes unnecessary rebuilds.
36-
build-with-version:
37-
file="commands/utils.dylan"; \
38-
orig=$$(mktemp); \
39-
temp=$$(mktemp); \
40-
cp -p $${file} $${orig}; \
41-
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"$$(git describe --tags)\" /*__*/,g" > $${temp}; \
42-
mv $${temp} $${file}; \
43-
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry:${OPEN_DYLAN_USER_REGISTRIES} \
44-
dylan-compiler -build dylan-tool-app; \
45-
cp -p $${orig} $${file}
32+
build-with-version: remove-dylan-tool-artifacts
33+
file="sources/commands/utils.dylan"; \
34+
orig=$$(mktemp); \
35+
temp=$$(mktemp); \
36+
cp -p $${file} $${orig}; \
37+
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"$$(git describe --tags --always)\" /*__*/,g" > $${temp}; \
38+
mv $${temp} $${file}; \
39+
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build dylan-tool-app; \
40+
cp -p $${orig} $${file}
4641

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

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

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

7166
dist: distclean install
7267

73-
clean:
68+
# Sometimes I use dylan-tool to develop dylan-tool, so this makes sure to clean
69+
# up its artifacts.
70+
remove-dylan-tool-artifacts:
71+
rm -rf _packages
72+
find registry -not -path '*/generic/*' -type f -exec rm {} \;
73+
74+
clean: remove-dylan-tool-artifacts
7475
rm -rf _build
7576

7677
distclean: clean

README.md

+3-1

ext/json

ext/testworks

registry/generic/dylan-tool

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
abstract://dylan/dylan-tool.lid
1+
abstract://dylan/sources/dylan-tool.lid

registry/generic/dylan-tool-app

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
abstract://dylan/dylan-tool-app.lid
1+
abstract://dylan/sources/dylan-tool-app.lid
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
abstract://dylan/tests/dylan-tool-test-suite.lid
1+
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.

main.dylan sources/main.dylan

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.

shared.dylan sources/shared.dylan

File renamed without changes.
File renamed without changes.
File renamed without changes.

sources/test-suite.lid

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
library: dylan-tool-test-suite
2+
files: test-suite-library.dylan
3+
test-utils.dylan
4+
shared-test.dylan
5+
pacman/catalog-test.dylan
6+
pacman/deps-test.dylan
7+
pacman/install-test.dylan
8+
pacman/packages-test.dylan
9+
pacman/versions-test.dylan
10+
workspaces/registry-test.dylan
11+
workspaces/workspaces-test.dylan
12+
test-suite.dylan
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/dylan-tool-test-suite.lid

-12
This file was deleted.

0 commit comments

Comments
 (0)