File: Makefile

package info (click to toggle)
nml 0.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,980 kB
  • ctags: 1,752
  • sloc: python: 14,277; sh: 217; makefile: 38
file content (26 lines) | stat: -rw-r--r-- 765 bytes parent folder | download
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
.PHONY: clean all
.DEFAULT:

_V ?= @
_E ?= @echo
_SE ?= echo

TEST_FILES = $(basename $(shell ls *.nml))
NMLC ?= ../nmlc
# Note: Manually overriding NML_FLAGS may break the regression test
NML_FLAGS ?= -s -c

.PHONY: $(TEST_FILES) clean

all: $(TEST_FILES)

$(TEST_FILES):
	$(_V) echo "Running test $@"
	$(_V) mkdir -p output nml_output output2
	$(_V) $(NMLC) $(NML_FLAGS) --nfo output/$@.nfo --grf output/$@.grf $@.nml --nml nml_output/$@.nml && \
$(NMLC) $(NML_FLAGS) -n --nfo output2/$@.nfo --grf output2/$@.grf nml_output/$@.nml
	$(_V) diff -u expected/$@.nfo output/$@.nfo && diff -u expected/$@.grf output/$@.grf && \
diff -u expected/$@.nfo output2/$@.nfo && diff -u expected/$@.grf output2/$@.grf

clean:
	$(_V) rm -rf output nml_output output2 parsetab.py