-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (60 loc) · 1.45 KB
/
Makefile
File metadata and controls
88 lines (60 loc) · 1.45 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
######
#
# A Simple Makefile
#
######
MAKEFLAGS += --silent
######
PATSCC=\
$(PATSHOME)/bin/patscc
PATSOPT=\
$(PATSHOME)/bin/patsopt
ATSCC2JS=\
$(PATSHOME)/bin/atscc2js
######
DIR=./DATS
######
all::
######
#
all:: ; make -C $(DIR) && printf "$?" && echo "Build Successful" \
|| printf "\nBuilding acc Failed\n"
all:: ; [ -f "./DATS/acc" ] && mv ./DATS/acc .
#
######
regress:: \
acc; ./$<
######
testall:: all
testall:: regress
testall:: cleanall
######
test0:: cleanall
test0:: all
trytest: test0
trytest: ; ./acc tcatsc ${ARG1}
######
install:: ; [ -f "./acc" ] && \
echo "Installing acc at \$$PATSHOME/bin/" && mv acc $(PATSHOME)/bin/ || \
echo "Oops. Something went wrong. Build acc manually with the command 'make && make install'"
######
check_install:: ; printf "acc is located at: " && which acc
######
testrun:: ; @printf "\e[33mbuilding...\e[0m\n"
testrun:: test0
testrun:: ; @printf "\e[36mrunning tests... \e[0m\n" && printf "\e[36m>>>\e[0m\n"
testrun:: ; @printf "Each test will output the current error message (with patscc) and the corresponding pretty-printed message (with acc)\n"
testrun:: ; -@sh ./TEST/tests.sh
######
run-withargs:: ; -@./acc -tcats ${ARG1}
run-valgrind:: ; -@valgrind ./acc -tcats ${ARG1} >/dev/null
######
clean:: ; make -C $(DIR) clean
clean:: ; rm -f .log
clean:: ; rm -f *~
clean:: ; rm -f *_?ats.c
######
cleanall:: clean
cleanall:: ; make -C $(DIR) cleanall
cleanall:: ; rm -f acc
###### end of [Makefile] ######