forked from jasmin-lang/jasmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (46 loc) · 1.44 KB
/
Makefile
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
#! -*- Makefile -*-
# --------------------------------------------------------------------
SED ?= sed
DISTDIR := jasmin
PREFIX ?= /usr/local
# we compute the absolute path, otherwise it does not make sense when
# given to the sub-Makefiles
PREFIX := $(abspath $(PREFIX))
export PREFIX
# --------------------------------------------------------------------
.PHONY: all build check clean install uninstall dist distcheck
all: build
build:
$(MAKE) -C proofs all
$(MAKE) -C compiler CIL
$(MAKE) -C compiler all
check:
$(MAKE) -C eclib check
clean:
$(MAKE) -C proofs clean
$(MAKE) -C compiler clean
install:
$(MAKE) -C compiler install
$(MAKE) -C eclib install
$(MAKE) -C proofs install
uninstall:
$(MAKE) -C compiler uninstall
$(MAKE) -C eclib uninstall
$(MAKE) -C proofs uninstall
dist:
$(RM) -r $(DISTDIR) $(DISTDIR).tar.gz
./scripts/distribution $(DISTDIR) MANIFEST
tar -czf $(DISTDIR).tar.gz --owner=0 --group=0 $(DISTDIR) && $(RM) -r $(DISTDIR)
distcheck: dist
tar -xof $(DISTDIR).tar.gz
set -x; \
$(MAKE) -C $(DISTDIR) \
&& $(MAKE) -C $(DISTDIR) dist \
&& mkdir $(DISTDIR)/dist1 $(DISTDIR)/dist2 \
&& ( cd $(DISTDIR)/dist1 && tar -xof ../$(DISTDIR).tar.gz ) \
&& ( cd $(DISTDIR)/dist2 && tar -xof ../../$(DISTDIR).tar.gz ) \
&& diff -rq $(DISTDIR)/dist1 $(DISTDIR)/dist2 \
|| exit 1
$(RM) $(DISTDIR)
@echo "$(DISTDIR) is ready for distribution" | \
$(SED) -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'