File: Makefile

package info (click to toggle)
normaliz 3.1.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 21,636 kB
  • ctags: 1,508
  • sloc: cpp: 18,185; makefile: 253
file content (109 lines) | stat: -rw-r--r-- 3,737 bytes parent folder | download | duplicates (2)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
## default normaliz bin
ifndef (NORMALIZ)
  NORMALIZ = ../source/normaliz
endif


#NORMPARA += -c
#NORMPARA += -x=1
DIFF = diff -b
#NICE = nice -n19


TEST_FILES_S = $(patsubst %.in,%.diff,$(wildcard test-s/*.in))
TEST_FILES_V = $(patsubst %.in,%.diff,$(wildcard test-v/*.in))
TEST_FILES_N = $(patsubst %.in,%.diff,$(wildcard test-n/*.in))
TEST_FILES_NN = $(patsubst %.in,%.diff,$(wildcard test-nn/*.in))
TEST_FILES_W = $(patsubst %.in,%.diff,$(wildcard test-w/*.in))
TEST_FILES_MM = $(patsubst %.in,%.diff,$(wildcard test-mm/*.in))
TEST_FILES_H = $(patsubst %.in,%.diff,$(wildcard test-h/*.in))
TEST_FILES_P = $(patsubst %.in,%.diff,$(wildcard test-p/*.in))
TEST_FILES_Q = $(patsubst %.in,%.diff,$(wildcard test-q/*.in))
TEST_FILES_1 = $(patsubst %.in,%.diff,$(wildcard test-1/*.in))
TEST_FILES_D = $(patsubst %.in,%.diff,$(wildcard test-d/*.in))
TEST_FILES_D1 = $(patsubst %.in,%.diff,$(wildcard test-d1/*.in))
TEST_FILES_R1 = $(patsubst %.in,%.diff,$(wildcard test-r1/*.in))
TEST_FILES_DEFAULT = $(patsubst %.in,%.diff,$(wildcard test-/*.in))
TEST_FILES_HH = $(patsubst %.in,%.diff,$(wildcard test-hh/*.in))
TEST_FILES_HH_INTHULL = $(patsubst %.in,%.IntHull.diff,$(wildcard test-hh/*.in))


all: tests testv testn test1 testN testq testp testd testh testdefault testd1 testr1 testM testw testH
tests: $(TEST_FILES_S)
testv: $(TEST_FILES_V)
testN: $(TEST_FILES_NN)
testw: $(TEST_FILES_W)
testn: $(TEST_FILES_N)
testh: $(TEST_FILES_H)
testp: $(TEST_FILES_P)
testq: $(TEST_FILES_Q)
test1: $(TEST_FILES_1)
testdefault: $(TEST_FILES_DEFAULT)
testd: $(TEST_FILES_D)
testd1: $(TEST_FILES_D1)
testr1: $(TEST_FILES_R1)
testM: $(TEST_FILES_MM)
testH: $(TEST_FILES_HH) $(TEST_FILES_HH_INTHULL)

#compare rule
%.diff: %.out %.ref
	$(DIFF) $*.ref $*.out > $*.diff

#rules to generate the test files
test-s/%.out: $(NORMALIZ) test-s/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -s test-s/$*
test-v/%.out: $(NORMALIZ) test-v/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -v test-v/$*
test-1/%.out: $(NORMALIZ) test-1/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -1 test-1/$*
test-n/%.out: $(NORMALIZ) test-n/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -n test-n/$*
test-nn/%.out: $(NORMALIZ) test-nn/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -N test-nn/$*
test-w/%.out: $(NORMALIZ) test-w/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -w -x=1 test-w/$*
test-mm/%.out: $(NORMALIZ) test-mm/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -M test-mm/$*
test-p/%.out: $(NORMALIZ) test-p/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -p test-p/$*
test-q/%.out: $(NORMALIZ) test-q/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -q test-q/$*
test-d/%.out: $(NORMALIZ) test-d/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -d test-d/$*
test-h/%.out: $(NORMALIZ) test-h/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -h test-h/$*
test-/%.out: $(NORMALIZ) test-/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) test-/$*
test-d1/%.out: $(NORMALIZ) test-d1/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -d1 test-d1/$*
test-r1/%.out: $(NORMALIZ) test-r1/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -r1 test-r1/$*
# for this rule with two targets USING PATTERNS, make will execute it only once
# to create the two target files
test-hh/%.out test-hh/%.IntHull.out: $(NORMALIZ) test-hh/%.in
	$(NICE) $(NORMALIZ) $(NORMPARA) -H test-hh/$*



clean:
	-rm -f test-*/*.diff

distclean: clean
	-rm -f test-*/*.out

.PRECIOUS: test-s/%.out
.PRECIOUS: test-v/%.out
.PRECIOUS: test-1/%.out
.PRECIOUS: test-n/%.out
.PRECIOUS: test-nn/%.out
.PRECIOUS: test-w/%.out
.PRECIOUS: test-mm/%.out
.PRECIOUS: test-p/%.out
.PRECIOUS: test-q/%.out
.PRECIOUS: test-d/%.out
.PRECIOUS: test-d1/%.out
.PRECIOUS: test-r1/%.out
.PRECIOUS: test-h/%.out
.PRECIOUS: test-/%.out
.PRECIOUS: test-hh/%.out
.PHONY: all testdefault tests testn test1 testN testw testp testh testd testd1 testH clean distclean