-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
77 lines (71 loc) · 2.81 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
############################ -*- Mode: Makefile -*- ###########################
## Makefile<ucf> ---
## Author : Manoj Srivastava ( [email protected] )
## Created On : Tue Nov 18 22:00:27 2003
## Created On Node : glaurung.green-gryphon.com
## Last Modified By : Manoj Srivastava
## Last Modified On : Sun Apr 16 16:32:23 2006
## Last Machine Used: glaurung.internal.golden-gryphon.com
## Update Count : 6
## Status : Unknown, Use with caution!
## HISTORY :
## Description :
##
###############################################################################
prefix = $(DESTDIR)
package = ucf
ETCDIR = $(prefix)/etc
BINDIR = $(prefix)/usr/bin
USHAREDIR = $(prefix)/usr/share/$(package)
DEBLIBDIR = $(prefix)/var/lib/$(package)
DEBDOCDIR = $(prefix)/usr/share/doc/$(package)
MANDIR = $(prefix)/usr/share/man/
MAN1DIR = $(MANDIR)/man1
MAN5DIR = $(MANDIR)/man5
# install commands
install_file := /usr/bin/install -p -o root -g root -m 644
install_program := /usr/bin/install -p -o root -g root -m 755
make_directory := /usr/bin/install -p -d -o root -g root -m 755
all build: check
check:
sh -n ucf
sh -n ucfr
perl -wc ucfq
sh -n debian/ucf.preinst
sh -n debian/ucf.postinst
sh -n debian/ucf.postrm
install:
$(make_directory) $(BINDIR)
$(make_directory) $(ETCDIR)
$(make_directory) $(MAN1DIR)
$(make_directory) $(MAN5DIR)
$(make_directory) $(DEBLIBDIR)
$(make_directory) $(USHAREDIR)
$(make_directory) $(DEBDOCDIR)/examples
$(install_program) ucf $(BINDIR)
$(install_file) ucf.1 $(MAN1DIR)
gzip -9fq $(MAN1DIR)/ucf.1
$(install_program) ucfr $(BINDIR)
$(install_file) ucfr.1 $(MAN1DIR)
gzip -9fq $(MAN1DIR)/ucfr.1
$(install_program) ucfq $(BINDIR)
$(install_file) ucfq.1 $(MAN1DIR)
gzip -9fq $(MAN1DIR)/ucfq.1
$(install_program) lcf $(BINDIR)
$(install_file) lcf.1 $(MAN1DIR)
gzip -9fq $(MAN1DIR)/lcf.1
$(install_file) ucf.conf.5 $(MAN5DIR)
gzip -9fq $(MAN5DIR)/ucf.conf.5
$(install_file) ucf.conf $(ETCDIR)
$(install_program) ucf_helper_functions.sh $(USHAREDIR)
$(install_file) debian/changelog $(DEBDOCDIR)/changelog
gzip -9frq $(DEBDOCDIR)
# make sure the copyright file is not compressed
$(install_file) debian/copyright $(DEBDOCDIR)/copyright
$(install_file) examples/postinst $(DEBDOCDIR)/examples/
$(install_file) examples/postrm $(DEBDOCDIR)/examples/
cp -a examples/ucf_helper_functions $(DEBDOCDIR)/examples/
chown -R root:root $(DEBDOCDIR)/examples/ucf_helper_functions
chmod -R ugo+r $(DEBDOCDIR)/examples/ucf_helper_functions
clean distclean:
@echo nothing to do for clean