This repository has been archived by the owner on May 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
50 lines (44 loc) · 1.44 KB
/
Makefile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
GIT_VERSION=$(shell git describe --tags --dirty --always)
DIST_NAME=gabor-melis#-$(GIT_VERSION)
DIST_FILE=dist/$(DIST_NAME).zip
BIN=rumcajsz
.PHONY: $(BIN)
$(BIN):
./higgsml-build
# Check out the versions of library dependencies with which the
# software was tested.
#
# This won't work if you have quicklisp loaded already. The default
# ./configure options include --no-userinit, --no-sysinit which is
# usually enough to prevent it from being loaded.
quicklisp:
curl -O http://beta.quicklisp.org/quicklisp.lisp
build/run-lisp.sh --load quicklisp.lisp \
--eval '(quicklisp-quickstart:install :path "./quicklisp/")' \
--eval '(exit)'
rm -f quicklisp.lisp
cd quicklisp/local-projects/ && ../../build/fetch-local-projects.sh
build/run-lisp.sh --load quicklisp/setup.lisp \
--load build/install-dependencies.lisp \
--eval '(exit)'
.PHONY: clean
clean:
find . -name '*~' -o -name '*.fasl' | xargs rm -f
.PHONY: distclean
distclean: clean
rm -rf dist/
.PHONY: archclean
archclean: distclean
rm -rf SETTINGS $(BIN)
.PHONY: dist
dist: $(BIN)
-mkdir dist
git archive --format=zip --prefix "$(DIST_NAME)/" HEAD > "$(DIST_FILE)"
# Can't find how to filter files or make zip add a prefix. Do
# it all by hand.
mkdir "$(DIST_NAME)/"
cp -a quicklisp/ "$(BIN)" "$(DIST_NAME)/"
# "Filter out" .git dirs by removing them from the copy.
find "$(DIST_NAME)/quicklisp/" -name .git -type d | xargs rm -rf
zip -r "$(DIST_FILE)" "$(DIST_NAME)/"
rm -rf "$(DIST_NAME)"