forked from npryce/adr-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 638 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 638 Bytes
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
TESTS:=$(wildcard tests/*.sh)
SRC:=$(wildcard src/*)
check: $(TESTS:tests/%.sh=build/tests/%.diff)
@echo SUCCESS
build/tests/%.diff: build/tests/%.output tests/%.expected
@diff --side-by-side $^ > $@ || ! cat $@
build/tests/%.output: tests/%.sh tests/%.expected $(SRC)
@echo TEST: $*
@rm -rf $(dir $@)/$*
@mkdir -p $(dir $@)/$*
@(cd $(dir $@)/$* && \
PATH=/bin:/usr/bin:$(abspath src):$(abspath tests) \
ADR_DATE=1992-01-12 \
VISUAL= \
EDITOR= \
PS4='+ ' \
/bin/sh -v $(abspath $<) > $(abspath $@) 2>&1) || ! cat $@
clean:
rm -rf build/
.PHONY: all clean
.PRECIOUS: build/tests/%.output
.DELETE_ON_ERROR: