-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
39 lines (30 loc) · 702 Bytes
/
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
#
# Makefile for unibuild top-level directory
#
default: build
BUILD_LOG=unibuild-log
ifdef START
UNIBUILD_OPTS += --start $(START)
endif
ifdef STOP
UNIBUILD_OPTS += --stop $(STOP)
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 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
rm -rf $(TO_CLEAN)
find . -name '*~' | xargs rm -f