##// END OF EJS Templates
Platform-specific makefile
naryl -
r59:09309f46 default
parent child Browse files
Show More
@@ -1,50 +1,61 b''
1 1
2 BIN = txt2web
3 DIST = $(BIN).tar.xz
4 SCRIPT = $(BIN).ros
2 PKG = txt2web
3 SCRIPT = $(PKG).ros
4
5 ifeq ($(OS),Windows_NT)
6 BIN = $(PKG).exe
7 DIST = $(PKG).zip
8 ARCMD = "zip"
9 ARARGS = "-r"
10 else
11 BIN = $(PKG)
12 DIST = $(PKG).tar.xz
13 ARCMD = "tar"
14 ARARGS = "cfvJ"
15 endif
5 16
6 17 BLACK := $(shell tput setaf 0)
7 18 RED := $(shell tput setaf 1)
8 19 GREEN := $(shell tput setaf 2)
9 20 YELLOW := $(shell tput setaf 3)
10 21 LIGHTPURPLE := $(shell tput setaf 4)
11 22 PURPLE := $(shell tput setaf 5)
12 23 BLUE := $(shell tput setaf 6)
13 24 WHITE := $(shell tput setaf 7)
14 25
15 26 RESET := $(shell tput sgr0)
16 27
17 28 all: $(BIN)
18 29
19 30 run:
20 31 bin/${SCRIPT}
21 32
22 33 dist: $(DIST)
23 34
24 35 graphs: diagrams.png
25 36
26 37 $(BIN): bin/$(BIN)
27 38 ln -f $<
28 39
29 bin/$(BIN): *.asd src/*.lisp src/*.ps strings/*.sexp bin/$(BIN).ros
40 bin/$(BIN): *.asd src/*.lisp src/*.ps strings/*.sexp bin/$(PKG).ros
30 41 @echo
31 42 @echo "* ${GREEN}Building ${YELLOW}${BIN} ${GREEN}binary${RESET}..."
32 43 ros build bin/$(SCRIPT)
33 44
34 45 %.png: %.dot
35 46 dot $< -T png -o $@
36 47
37 48 $(DIST): $(BIN) extras/*
38 49 @echo
39 50 @echo "* ${GREEN}Packaging${RESET}..."
40 tar cfvJ $@ $< extras
51 $(ARCMD) $(ARARGS) $@ $< extras
41 52
42 53 clean:
43 54 rm -f $(BIN) bin/$(BIN) $(DIST)
44 55
45 56 clean-cache:
46 57 -rm -rf ~/.cache/common-lisp
47 58
48 59 fresh: clean clean-cache all
49 60
50 61 .PHONY: all run graphs clean clean-cache fresh
General Comments 0
You need to be logged in to leave comments. Login now