-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (58 loc) · 2.13 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
DIR ?= .
FORCE ?=
DRAFT ?= draft
all: std_11 std_14 std_17 std_20 std_23
.PHONY: all
${DRAFT}:
git clone https://github.com/cplusplus/draft ${DRAFT}
std_11: extract draft
(cd draft; git checkout n3337)
./extract -s ${DRAFT}/source -d ${DIR}/std_11 ${FORCE}
.PHONY: std_11
std_14: extract draft
(cd draft; git checkout n4140)
./extract -s ${DRAFT}/source -d ${DIR}/std_14 ${FORCE}
.PHONY: std_14
std_17: extract draft
(cd draft; git checkout n4659)
./extract -s ${DRAFT}/source -d ${DIR}/std_17 ${FORCE}
.PHONY: std_17
std_20: extract draft
(cd draft; git checkout n4861)
./extract -s ${DRAFT}/source -d ${DIR}/std_20 ${FORCE}
.PHONY: std_20
std_23: extract draft
(cd draft; git checkout n4950)
./extract -s ${DRAFT}/source -d ${DIR}/std_23 ${FORCE}
.PHONY: std_23
clean:
$(RM) -vr ${DRAFT}
.PHONY: clean
cleanall: clean
$(RM) -vr ${DIR}/std_11 ${DIR}/std_14 ${DIR}/std_17 ${DIR}/std_20
.PHONY: cleanall
print-%:
@echo $* = $($*)
.PHONY: print-%
help:
@echo "DESCRIPTION"
@echo " Extract c++ std headers synopsis'"
@echo ""
@echo "TARGETS"
@echo " all - run std_{11|14|17|20} targets"
@echo " draft - clone cplusplus/draft repo to \"${DRAFT}\" directory"
@echo " std_11 - extract headers for c++11 standard"
@echo " std_14 - extract headers for c++14 standard"
@echo " std_17 - extract headers for c++17 standard"
@echo " std_20 - extract headers for c++20 standard"
@echo " std_23 - extract headers for c++23 standard"
@echo " clean - remove \"${DRAFT}\" directory"
@echo " cleanall - remove \"${DRAFT}\" directory"
@echo " and all c++ standards directories"
@echo " print-<VARIABLE> - print <VARIABLE> content"
@echo ""
@echo "VARIABLES"
@echo " DIR - output umbrella directory"
@echo " FORCE - set to '-f' to override headers"
@echo " DRAFT - directory to clone cplusplus/draft repo to"
.PHONY: help