-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 814 Bytes
/
Makefile
File metadata and controls
44 lines (35 loc) · 814 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# Makefile for unibuild top-level directory
#
default: build
BUILD_LOG=unibuild-log
UNIBUILD_REPO=unibuild-repo
ifdef START
UNIBUILD_OPTS += --start $(START)
endif
ifdef STOP
UNIBUILD_OPTS += --stop $(STOP)
endif
ifdef RELEASE
UNIBUILD_OPTS += --release
endif
# The shell command below does the equivalent of BASH's pipefail
# within the confines of POSIX.
# Source: https://unix.stackexchange.com/a/70675/15184
build:
rm -rf $(BUILD_LOG) $(UNIBUILD_REPO)
((( \
(unibuild build $(UNIBUILD_OPTS); echo $$? >&3) \
| tee $(BUILD_LOG) >&4) 3>&1) \
| (read XS; exit $$XS) \
) 4>&1
TO_CLEAN += $(BUILD_LOG)
uninstall:
unibuild make --reverse $@
fresh: uninstall build
clean:
unibuild make $(UNIBUILD_OPTS) clean
unibuild clean
$(MAKE) -C docs $@
rm -rf $(TO_CLEAN)
find . -name '*~' | xargs rm -f