File: Makefile

package info (click to toggle)
extlib 1.7.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 632 kB
  • sloc: ml: 6,980; makefile: 128; sh: 42; ansic: 31
file content (49 lines) | stat: -rw-r--r-- 951 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

VERSION:=$(shell git --git-dir=.git describe --always --long)
RELEASE:=1.7.7

ifndef VERSION
VERSION:=$(RELEASE)
endif

.NOTPARALLEL:
.SUFFIXES:
.PHONY: build clean test doc release install

build:
	$(MAKE) -C src build

install:
	$(MAKE) -C src VERSION=$(VERSION) install

doc:
	$(MAKE) -C src doc

test:
	$(MAKE) -C test all run
	$(MAKE) -C test opt run

clean:
	$(MAKE) -C src clean
	$(MAKE) -C test clean

NAME=extlib-$(RELEASE)

release:
	git tag -a -m $(RELEASE) $(RELEASE)
	git archive --prefix=$(NAME)/ $(RELEASE) | gzip > $(NAME).tar.gz
	gpg -a -b $(NAME).tar.gz

.PHONY: test_all

define gen_test =
test_all:: test_$(1)

.PHONY: test_$(1)
test_$(1):
	opam exec --switch=$(1) -- make clean build test > /dev/null
# expected to fail < 4.03.0
#	opam exec --switch=$(1) -- ocaml test/std.ml
endef

$(foreach version,3.12.1 4.00.1 4.01.0 4.02.3 4.03.0 4.04.2 4.05.0 4.06.0 4.06.1 4.07.1 4.08.0 4.09.0 4.10.0,$(eval $(call gen_test,$(version))))