@@ -22,10 +22,12 @@ install_lib = $(install_dir)/lib
22
22
link_target = $(install_bin ) /dylan-tool-app
23
23
link_source = $(DYLAN ) /bin/dylan
24
24
25
+ git_version := "$(shell git describe --tags --always --match 'v* ') "
26
+
25
27
.PHONY : build build-with-version clean install install-debug really-install remove-dylan-tool-artifacts test dist distclean
26
28
27
29
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
29
31
30
32
# Hack to add the version to the binary with git tag info. Don't want this to
31
33
# be the normal build because it causes unnecessary rebuilds.
@@ -34,22 +36,15 @@ build-with-version: remove-dylan-tool-artifacts
34
36
orig=$$(mktemp ) ; \
35
37
temp=$$(mktemp ) ; \
36
38
cp -p $$ {file} $$ {orig}; \
37
- cat $$ {file} | sed " s,/.__./.*/.__./,/*__*/ \" $$ (git describe --tags --always) \" /*__*/,g" > $$ {temp}; \
39
+ cat $$ {file} | sed " s,/.__./.*/.__./,/*__*/ \" ${git_version} \" /*__*/,g" > $$ {temp}; \
38
40
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; \
40
43
cp -p $$ {orig} $$ {file}
41
44
42
- # After the next OD release (post 2022.1) this should install a static exe
43
- # built with the -unify flag.
44
45
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 ) /
49
46
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/
53
48
54
49
install : build-with-version really-install
55
50
0 commit comments