File: GNUmakefile

package info (click to toggle)
lua-cqueues 20161214-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,672 kB
  • ctags: 3,228
  • sloc: ansic: 20,232; sh: 2,959; makefile: 24
file content (49 lines) | stat: -rw-r--r-- 896 bytes parent folder | download | duplicates (4)
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
# non-recursive prologue
sp := $(sp).x
dirstack_$(sp) := $(d)
d := $(abspath $(lastword $(MAKEFILE_LIST))/..)

ifeq ($(origin GUARD_$(d)), undefined)
GUARD_$(d) := 1

include $(d)/../GNUmakefile


.PHONY: $(d)/check check

$(d)/check:
	@for V in 5.1 5.2 5.3; do \
		printf "Building $${V}... "; \
		if (cd $(@D) && ./regress.sh -r"$${V}" build >/dev/null 2>&1); then \
			printf "OK\n"; \
		else \
			printf "FAIL\n"; \
		fi; \
	done
	@cd $(@D); P=0; F=0; for T in ./[123456789]*.lua; do \
		if "./$$T" -B; then P=$$(($$P + 1)); else F=$$(($$F + 1)); fi; \
	done; \
	printf "PASS=%d FAIL=%d\n" "$$P" "$$F"; \
	test $$F -eq 0;

check: $(d)/check


.PHONY: $(d)/clean $(d)/clean~

$(d)/clean:
	$(RM) -fr $(@D)/.local

$(d)/clean~: $(d)/clean
	$(RM) -f $(@D)/*~

clean: $(d)/clean

clean~: $(d)/clean~


endif # include guard

# non-recursive epilogue
d := $(dirstack_$(sp))
sp := $(basename $(sp))