-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (29 loc) · 828 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
40
41
42
43
44
all:
USR_FILES := $(shell git ls-files usr/bin usr/sbin)
TOOLS_FILES := $(shell git ls-files tools)
.PHONY: all
.PHONY: tpkgs
tpkgs:
mkdir -p build
cd build && cmake ../tpkgs
$(MAKE) -C build
.PHONY: install install-exec
install: install-exec
install-dirs:
mkdir -p $(sort $(foreach dir,${USR_FILES},${DESTDIR}/$(dir ${dir})))
ifneq "$(wildcard ${DESTDIR}/tools)" ""
mkdir -p $(sort $(foreach dir,${TOOLS_FILES},${DESTDIR}/$(dir ${dir})))
endif
install-exec: install-dirs tpkgs
$(foreach p,$(USR_FILES), ln -fs $$(pwd)/$p ${DESTDIR}/$p;)
ifneq "$(wildcard ${DESTDIR}/tools)" ""
$(foreach p,$(TOOLS_FILES), ln -fvs $$(pwd)/$p ${DESTDIR}/$p;)
endif
cp build/src/tpkgs /usr/bin
.PHONY: gather apply
gather:
./gather-package-data.sh
./gather-etc-data.sh
apply:
./apply-package-data.sh
./apply-etc-data.sh