-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile.common
54 lines (38 loc) · 1.33 KB
/
Makefile.common
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
# -*- Makefile -*-
# --------------------------------------------------------------------
.PHONY: all config build quick clean distclean __always__
.SUFFIXES:
TOP = $(dir $(lastword $(MAKEFILE_LIST)))
COQMAKE = $(MAKE) -f Makefile.coq
# --------------------------------------------------------------------
all: build
# --------------------------------------------------------------------
Makefile.coq: Makefile _CoqProject
coq_makefile -f _CoqProject -o Makefile.coq
# --------------------------------------------------------------------
config: sub-config this-config Makefile.coq
build: sub-build this-build
quick: sub-quick this-quick
clean: sub-clean this-clean
distclean: sub-distclean this-distclean
# --------------------------------------------------------------------
.PHONY: this-config this-build this-distclean this-clean
this-build:: Makefile.coq
+$(COQMAKE)
this-quick:: Makefile.coq
+$(COQMAKE) quick
this-distclean:: this-clean
rm -f Makefile.coq
this-clean::
@if [ -f Makefile.coq ]; then $(COQMAKE) clean; fi
# --------------------------------------------------------------------
ifdef SUBDIRS
sub-%: __always__
@set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $(@:sub-%=%); done
else
sub-%: __always__
@true
endif
# --------------------------------------------------------------------
%.vo: __always__
+$(COQMAKE) $@