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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
|
## default normaliz bin
ifndef (NORMALIZ)
NORMALIZ = ../source/normaliz
endif
#NICE = nice -n19
#NORMPARA += -c
#NORMPARA += -x=1
ifeq ($(STRICT),yes)
DIFF = diff -b
else
DIFF = diff -b -I ".*embedding.*\|.*resulting.*\|.*triangulation.*\|.*float.*\|.*fixed.*"
#DIFF = diff -b
endif
TEST_FILES_DEG = $(patsubst %.in,%.diff,$(wildcard test-degenerate/*.in))
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_DN = $(patsubst %.in,%.diff,$(wildcard test-dnn/*.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))
TEST_FILES_INT = $(patsubst %.in,%.diff,$(wildcard test-Int/*.in))
TEST_FILES_PR = $(patsubst %.in,%.diff,$(wildcard test-pr/*.in))
TEST_FILES_PR_PROJCONE = $(patsubst %.in,%.ProjectCone.diff,$(wildcard test-pr/*.in))
TEST_FILES_SPECIAL = $(patsubst %.in,%.diff,$(wildcard test-Special/*.in))
TEST_FILES_LARGE = $(patsubst %.in,%.diff,$(wildcard test-LARGE/*.in))
TEST_FILES_FUS = $(patsubst %.in,%.diff,$(wildcard test-fus/*.in))
TEST_FILES_PATCH = $(patsubst %.in,%.diff,$(wildcard test-patch/*.in))
TEST_FILES_NF = $(patsubst %.in,%.diff,$(wildcard test-nf/*.in))
TEST_FILES_NF_HH = $(patsubst %.in,%.diff,$(wildcard test-nf-hh/*.in))
TEST_FILES_NF_HH_INTHULL = $(patsubst %.in,%.IntHull.diff,$(wildcard test-nf-hh/*.in))
TEST_FILES_DEGQ = $(patsubst %.in,%.diff,$(wildcard test-Qdegenerate/*.in))
TEST_FILES_DEC = $(patsubst %.in,%.diff,$(wildcard test-dec/*.in))
TEST_FILES_DEC_TRI = $(patsubst %.in,%.tri.diff,$(wildcard test-dec/*.in))
TEST_FILES_AUT = $(patsubst %.in,%.diff,$(wildcard test-Aut/*.in))
TEST_FILES_AUT_AUT = $(patsubst %.in,%.aut.diff,$(wildcard test-Aut/*.in))
TEST_FILES_NF_AUT = $(patsubst %.in,%.diff,$(wildcard test-nf-Aut/*.in))
TEST_FILES_NF_AUT_AUT = $(patsubst %.in,%.aut.diff,$(wildcard test-nf-Aut/*.in))
TEST_FILES_STD = $(patsubst %.in,%.diff,$(wildcard test-StDec/*.in))
TEST_FILES_STD_DEC = $(patsubst %.in,%.dec.diff,$(wildcard test-StDec/*.in))
TEST_FILES_FAC = $(patsubst %.in,%.diff,$(wildcard test-Fac/*.in))
TEST_FILES_FAC_FAC = $(patsubst %.in,%.fac.diff,$(wildcard test-Fac/*.in))
TEST_FILES_INC = $(patsubst %.in,%.diff,$(wildcard test-Inc/*.in))
TEST_FILES_INC_INC = $(patsubst %.in,%.inc.diff,$(wildcard test-Inc/*.in))
TEST_FILES_GEN = $(patsubst %.in,%.diff,$(wildcard test-gen/*.in))
TEST_FILES_GEN_GEN = $(patsubst %.in,%.gen.diff,$(wildcard test-gen/*.in))
TEST_FILES_CST = $(patsubst %.in,%.diff,$(wildcard test-cst/*.in))
TEST_FILES_CST_CST = $(patsubst %.in,%.cst.diff,$(wildcard test-cst/*.in))
TEST_FILES_MRK = $(patsubst %.in,%.diff,$(wildcard test-mrk/*.in))
TEST_FILES_MRK_MRK = $(patsubst %.in,%.mrk.diff,$(wildcard test-mrk/*.in))
TEST_FILES_GRB = $(patsubst %.in,%.diff,$(wildcard test-grb/*.in))
TEST_FILES_GRB_GRB = $(patsubst %.in,%.grb.diff,$(wildcard test-grb/*.in))
TEST_FILES_IND = $(patsubst %.in,%.diff,$(wildcard test-ind/*.in))
TEST_FILES_IND_IND = $(patsubst %.in,%.ind.diff,$(wildcard test-ind/*.in))
all: tests testv testn test1 testN testq testp testd testh testdefault testd1 testdnn testr1 testM testw testH testpr testdeg testDec testStDec testFac testInc testgen testcst testSpecial testclo testmrk testgrb testfus testind
## Don't include testLARGE into all! It requires the optional libraries and runs very long.
testdeg: $(TEST_FILES_DEG)
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: $(filter-out test-/ChF_8_1024.diff test-/ChF_8_1024Nr.diff test-/lowrankPF.diff test-/smallPF.diff test-/ThierryPF.diff, $(TEST_FILES_DEFAULT))
testd: $(TEST_FILES_D)
testd1: $(TEST_FILES_D1)
testdnn: $(TEST_FILES_DN)
testr1: $(TEST_FILES_R1)
testM: $(TEST_FILES_MM)
testInt: $(TEST_FILES_INT)
testnf: $(TEST_FILES_NF)
testdegQ: $(TEST_FILES_DEGQ)
testSpecial: $(filter-out test-Special/5x5PF.diff, $(TEST_FILES_SPECIAL))
testLARGE: $(TEST_FILES_LARGE)
testfus: $(TEST_FILES_FUS)
# testpatch takes very long. Mut be run separately.
testpatch: $(TEST_FILES_PATCH)
testH: $(TEST_FILES_HH) $(TEST_FILES_HH_INTHULL)
testDec: $(TEST_FILES_DEC) $(TEST_FILES_DEC_TRI)
testpr: $(TEST_FILES_PR) $(TEST_FILES_PR_PROJCONE)
testnfH: $(TEST_FILES_NF_HH) $(TEST_FILES_NF_HH_INTHULL)
testAut: $(TEST_FILES_AUT) $(TEST_FILES_AUT_AUT)
testnfAut: $(TEST_FILES_NF_AUT) $(TEST_FILES_NF_AUT_AUT)
testStDec: $(TEST_FILES_STD) $(TEST_FILES_STD_DEC)
testFac: $(TEST_FILES_FAC) $(TEST_FILES_FAC_FAC)
testInc: $(TEST_FILES_INC) $(TEST_FILES_INC_INC)
testgen: $(TEST_FILES_GEN) $(TEST_FILES_GEN_GEN)
testcst: $(TEST_FILES_CST) $(TEST_FILES_CST_CST)
testmrk: $(filter-out test-mrk/Kwak10-mrk.mrk.diff test-mrk/polytope.mrk.diff, $(TEST_FILES_MRK) $(TEST_FILES_MRK_MRK))
testgrb: $(TEST_FILES_GRB) $(TEST_FILES_GRB_GRB)
testind: $(TEST_FILES_IND) $(TEST_FILES_IND_IND)
# the next test is only inderted for code coverage
# calling all "new" command line options
# that are tested via options in input files
#or are left to be chosen by Normaliz
testclo: test-clopt/whow.out
test-clopt/whow.out: $(NORMALIZ) test-clopt/whow.in
$(NICE) $(NORMALIZ) -DTtyCbjViGS test-clopt/whow --NoSuppHypsOutput --LongLong
mkdir -p Dummy
$(NICE) $(NORMALIZ) -JoeFv test-clopt/whow --all-files --NoExtRaysOutput --OutputDir=Dummy
$(NICE) $(NORMALIZ) -kB test-clopt/whow.in --ignore --files --NoMatricesOutput --WritePreComp
$(NICE) $(NORMALIZ) -MP test-clopt/whow --gen --cst --ht1 --lat --mod --ext --egn --esp --typ --msp
$(NICE) $(NORMALIZ) --help > /dev/null
$(NICE) $(NORMALIZ) --version
rm -f blabla12345*
total: all testInt testnf testnfH testdegQ testAut testnfAut
msys: all testAut
#compare rule
## the double diff below is NOT a mistake.
## The goal is to print the diff on stdout AND into the diff file.
## make would not stop after tee, since tee is successful.
## Therefore the second diff
%.diff: %.out %.ref
ifeq ($(OUTPUTCHECK),yes)
@ $(DIFF) $*.ref $*.ref > $*.diff
else
ifeq ($(STRICT),yes)
@ $(DIFF) $*.ref $*.out | tee $*.diff
$(DIFF) $*.ref $*.out > $*.diff
else
@ cp $*.out $*.out_test
@ sed -i.orig 's/ ~[^)]*)/)/g' $*.out_test
@ rm $*.out_test.orig
@ sed 's/ ~[^)]*)/)/g' $*.ref | $(DIFF) $*.out_test - | tee $*.diff
@ sed 's/ ~[^)]*)/)/g' $*.ref | $(DIFF) $*.out_test - > $*.diff
@ rm $*.out_test
endif
endif
#ignore comparison for some extremely sensitive tests
test-/5x5PF.diff: test-/5x5PF.out test-/5x5PF.ref
-$(DIFF) test-/5x5PF.ref test-/5x5PF.out > test-/5x5PF.diff
#rules to generate the test files
test-degenerate/%.out: $(NORMALIZ) test-degenerate/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-degenerate/$*
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 -f 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) -c --inv test-/$* > /dev/null
test-d1/%.out: $(NORMALIZ) test-d1/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -d1 test-d1/$*
test-dnn/%.out: $(NORMALIZ) test-dnn/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -dN test-dnn/$*
test-r1/%.out: $(NORMALIZ) test-r1/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -r1 test-r1/$*
test-LARGE/%.out: $(NORMALIZ) test-LARGE/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -x=16 test-LARGE/$*
test-fus/%.out: $(NORMALIZ) test-fus/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-fus/$*
test-Qdegenerate/%.out: $(NORMALIZ) test-Qdegenerate/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-Qdegenerate/$*
test-nf/%.out: $(NORMALIZ) test-nf/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -c test-nf/$* > /dev/null
test-nf-hh/%.out test-nf-hh/%.IntHull.out: $(NORMALIZ) test-nf-hh/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -H test-nf-hh/$*
# for the next rules 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/$*
test-pr/%.out test-pr/%.ProjectCone.out: $(NORMALIZ) test-pr/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-pr/$*
test-dec/%.out test-dec/%.tri: $(NORMALIZ) test-dec/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-dec/$*
test-Aut/%.out test-Aut/%.aut: $(NORMALIZ) test-Aut/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -c test-Aut/$* > /dev/null
test-nf-Aut/%.out test-nf-Aut/%.aut: $(NORMALIZ) test-nf-Aut/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-nf-Aut/$*
test-Int/%.out: $(NORMALIZ) test-Int/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -c --inv test-Int/$* > /dev/null
test-Special/%.out: $(NORMALIZ) test-Special/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -ca test-Special/$* > /dev/null
test-StDec/%.out test-StDec/%.dec: $(NORMALIZ) test-StDec/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-StDec/$*
test-Fac/%.out test-Fac/%.fac: $(NORMALIZ) test-Fac/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-Fac/$*
test-Inc/%.out test-Inc/%.inc: $(NORMALIZ) test-Inc/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-Inc/$*
test-gen/%.out test-gen/%.gen: $(NORMALIZ) test-gen/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -N --gen test-gen/$*
test-cst/%.out test-cst/%.cst: $(NORMALIZ) test-cst/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) -s --cst test-cst/$*
test-mrk/%.out test-mrk/%.mrk: $(NORMALIZ) test-mrk/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-mrk/$*
test-grb/%.out test-grb/%.grb: $(NORMALIZ) test-grb/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-grb/$*
test-ind/%.out test-ind/%.ind: $(NORMALIZ) test-ind/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-ind/$*
test-patch/%.out: $(NORMALIZ) test-patch/%.in
$(NICE) $(NORMALIZ) $(NORMPARA) test-patch/$*
clean:
-rm -f test-*/*.diff
-rm -f test-*/*.out_1
-rm -f test-*/*.ref_1
-rm -f test-*/*.out_test
distclean: clean
-rm -f test-*/*.out
.PRECIOUS: test-degenerate/%.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-dnn/%.out
.PRECIOUS: test-r1/%.out
.PRECIOUS: test-h/%.out
.PRECIOUS: test-/%.out
.PRECIOUS: test-hh/%.out
.PRECIOUS: test-pr/%.out
.PRECIOUS: test-Int/%.out
.PRECIOUS: test-dec/%.out
.PRECIOUS: test-dec/%.tri
.PRECIOUS: test-Special/%.out
.PRECIOUS: test-Aut/%.aut
.PRECIOUS: test-Aut/%.out
.PRECIOUS: test-nf-Aut/%.aut
.PRECIOUS: test-nf-Aut/%.out
.PRECIOUS: test-StDec/%.out
.PRECIOUS: test-StDec/%.dec
.PRECIOUS: test-Fac/%out
.PRECIOUS: test-Fac/%.fac
.PRECIOUS: test-Inc/%out
.PRECIOUS: test-Inc/%.inc
.PRECIOUS: test-gen/%.out
.PRECIOUS: test-gen/%.gen
.PRECIOUS: test-cst/%.out
.PRECIOUS: test-cst/%.gen
.PRECIOUS: test-LARGE/%.out
.PRECIOUS: test-Fac/%.out
.PRECIOUS: test-Inc/%.out
.PRECIOUS: test-mrk/%.out
.PRECIOUS: test-mrk/%.mrk
.PRECIOUS: test-grb/%.out
.PRECIOUS: test-grb/%.grb
.PRECIOUS: test-ind/%.ind
.PRECIOUS: test-ind/%.out
.PRECIOUS: test-clopt/whow.out
.PRECIOUS: test-nf/%.out test-nf-hh/%.out test-nf-hh/%.IntHull.out test-Qdegenerate/%.out
.PRECIOUS: test-patch/%.out
.PRECIOUS: test-fus/%.out
.PHONY: all testdefault tests testn test1 testN testw testp testh testd testd1 testdnn testH clean distclean testInt testSpecial testdeg testFac testpatch testfus
.PHONY: testnf testnfH testdegQ testAut testnfAut testStDec testInc testLARGE testgen testcst testclo testDec
|