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

Commit 220e4ab

Browse files
committed
Makefile: build with -unify flag
1 parent c077628 commit 220e4ab

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

Makefile

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

25+
git_version := "$(shell git describe --tags --always --match 'v*')"
26+
2527
.PHONY: build build-with-version clean install install-debug really-install remove-dylan-tool-artifacts test dist distclean
2628

2729
build: remove-dylan-tool-artifacts
28-
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build dylan-tool-app
30+
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build -unify dylan-tool-app
2931

3032
# Hack to add the version to the binary with git tag info. Don't want this to
3133
# be the normal build because it causes unnecessary rebuilds.
@@ -34,22 +36,15 @@ build-with-version: remove-dylan-tool-artifacts
3436
orig=$$(mktemp); \
3537
temp=$$(mktemp); \
3638
cp -p $${file} $${orig}; \
37-
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"$$(git describe --tags --always)\" /*__*/,g" > $${temp}; \
39+
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"${git_version}\" /*__*/,g" > $${temp}; \
3840
mv $${temp} $${file}; \
39-
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build dylan-tool-app; \
41+
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry \
42+
dylan-compiler -build -unify dylan-tool-app; \
4043
cp -p $${orig} $${file}
4144

42-
# After the next OD release (post 2022.1) this should install a static exe
43-
# built with the -unify flag.
4445
really-install:
45-
mkdir -p $(install_bin)
46-
mkdir -p $(install_lib)
47-
cp _build/bin/dylan-tool-app $(install_bin)/
48-
cp -r _build/lib/lib* $(install_lib)/
4946
mkdir -p $(DYLAN)/bin
50-
@if [ ! -L "$(link_source)" ]; then \
51-
ln -s $$(realpath $(link_target)) $$(realpath $(link_source)); \
52-
fi;
47+
cp _build/sbin/dylan-tool-app $(DYLAN)/bin/
5348

5449
install: build-with-version really-install
5550

0 commit comments

Comments
 (0)