This repository was archived by the owner on Oct 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (50 loc) · 1.19 KB
/
Makefile
File metadata and controls
63 lines (50 loc) · 1.19 KB
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
57
58
59
60
61
62
63
.POSIX:
MACHINE != uname -m
MACHINE !=\
if test -d "$(MACHINE)"; then \
printf '%s\n' "$(MACHINE)"; \
else \
printf '%s\n' "generic"; \
fi
CONFIGFILE = config.mk
include $(CONFIGFILE)
BIN = true false
all: $(BIN)
true: true.o
false: false.o
.SUFFIXES:
.SUFFIXES: .o
include $(MACHINE)/build.mk
check: $(BIN:=-check)
true-check: true
./true
./true
./true
./true
./true
./true
./true
./true
./true
./true
false-check: false
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
set +e; ./false; test $$? = 1 || exit 1
install: $(BIN)
mkdir -p -- "$(DESTDIR)/$(PREFIX)/bin"
cp -- $(BIN) "$(DESTDIR)/$(PREFIX)/bin"
cd -- "$(DESTDIR)/$(PREFIX)/bin" && chmod -- 755 "$(BIN)"
uninstall:
-cd -- "$(DESTDIR)/$(PREFIX)/bin" && rm -f -- $(BIN)
-rmdir -- "$(DESTDIR)/$(PREFIX)/bin"
clean:
-rm -f -- *.o *.su $(BIN)
.PHONY: all check true-check false-check install uninstall clean