forked from dylan-lang/http
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 869 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# The impetus for this Makefile was to include Git version info in the generated
# executable and to install http-server-app as a static executable named simply
# "http-server". The expectation is that during development people will use `deft build`
# or `deft test`.
# TODO: use the .gitattributes filtering that Deft uses instead of this version hack.
DYLAN ?= $${HOME}/dylan
.PHONY: build clean install
build:
file="server/core/server.dylan"; \
backup=$$(mktemp); \
temp=$$(mktemp); \
cp -p $${file} $${backup}; \
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"$$(git describe --always --tags)\" /*__*/,g" > $${temp}; \
mv $${temp} $${file}; \
dylan update; \
dylan build --unify http-server-app; \
cp -p $${backup} $${file}
install: build
mkdir -p $(DYLAN)/bin
cp _build/sbin/http-server-app $(DYLAN)/bin/http-server
clean:
rm -rf _build registry