##// 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
2 PKG = txt2web
3 DIST = $(BIN).tar.xz
3 SCRIPT = $(PKG).ros
4 SCRIPT = $(BIN).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 BLACK := $(shell tput setaf 0)
17 BLACK := $(shell tput setaf 0)
7 RED := $(shell tput setaf 1)
18 RED := $(shell tput setaf 1)
8 GREEN := $(shell tput setaf 2)
19 GREEN := $(shell tput setaf 2)
9 YELLOW := $(shell tput setaf 3)
20 YELLOW := $(shell tput setaf 3)
10 LIGHTPURPLE := $(shell tput setaf 4)
21 LIGHTPURPLE := $(shell tput setaf 4)
11 PURPLE := $(shell tput setaf 5)
22 PURPLE := $(shell tput setaf 5)
12 BLUE := $(shell tput setaf 6)
23 BLUE := $(shell tput setaf 6)
13 WHITE := $(shell tput setaf 7)
24 WHITE := $(shell tput setaf 7)
14
25
15 RESET := $(shell tput sgr0)
26 RESET := $(shell tput sgr0)
16
27
17 all: $(BIN)
28 all: $(BIN)
18
29
19 run:
30 run:
20 bin/${SCRIPT}
31 bin/${SCRIPT}
21
32
22 dist: $(DIST)
33 dist: $(DIST)
23
34
24 graphs: diagrams.png
35 graphs: diagrams.png
25
36
26 $(BIN): bin/$(BIN)
37 $(BIN): bin/$(BIN)
27 ln -f $<
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 @echo
41 @echo
31 @echo "* ${GREEN}Building ${YELLOW}${BIN} ${GREEN}binary${RESET}..."
42 @echo "* ${GREEN}Building ${YELLOW}${BIN} ${GREEN}binary${RESET}..."
32 ros build bin/$(SCRIPT)
43 ros build bin/$(SCRIPT)
33
44
34 %.png: %.dot
45 %.png: %.dot
35 dot $< -T png -o $@
46 dot $< -T png -o $@
36
47
37 $(DIST): $(BIN) extras/*
48 $(DIST): $(BIN) extras/*
38 @echo
49 @echo
39 @echo "* ${GREEN}Packaging${RESET}..."
50 @echo "* ${GREEN}Packaging${RESET}..."
40 tar cfvJ $@ $< extras
51 $(ARCMD) $(ARARGS) $@ $< extras
41
52
42 clean:
53 clean:
43 rm -f $(BIN) bin/$(BIN) $(DIST)
54 rm -f $(BIN) bin/$(BIN) $(DIST)
44
55
45 clean-cache:
56 clean-cache:
46 -rm -rf ~/.cache/common-lisp
57 -rm -rf ~/.cache/common-lisp
47
58
48 fresh: clean clean-cache all
59 fresh: clean clean-cache all
49
60
50 .PHONY: all run graphs clean clean-cache fresh
61 .PHONY: all run graphs clean clean-cache fresh
General Comments 0
You need to be logged in to leave comments. Login now