-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (32 loc) · 1.06 KB
/
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
# Targets:
#
# test run tests in tmp/
# install installs on the local system (or in $(DESTDIR))
# clean remove all the files created by 'test'
#
# You can also run targets inside tmp/ such as 'tmp/etc/nsswitch.conf',
# this makefile will invoke the cfgf command in the appropriate way.
default: test
# The installation can be tuned by adjusting the declarations below.
# You have to tune cfgf.conf as well if you make any change here.
DESTDIR =
LOCAL = /local
destdir_share = $(DESTDIR)/usr$(LOCAL)/share/cfgf
destdir_sbin = $(DESTDIR)/usr$(LOCAL)/sbin
destdir_etc = $(DESTDIR)/etc/cfgf
destdir_var = $(DESTDIR)/var$(LOCAL)/lib/cfgf
# This is overridden on the make command line when building as a Debian package.
cfgf_conf = cfgf.conf
tmp:
mkdir -p $@
tmp/%: tmp non-stamp
CFGF_CONFIG=./cfgf.conf.tmp ./cfgf $*
test: tmp/test
install:
install -d $(destdir_share) $(destdir_sbin) $(destdir_etc) $(destdir_var)
cp -r share/* $(destdir_share)/
install -m755 cfgf $(destdir_sbin)/
install -m644 $(cfgf_conf) $(destdir_etc)/cfgf.conf
clean:
$(RM) -r tmp
non-stamp: