blob: db49dd263ff9376e547cd100beaea6fc17054337 (
plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
include ../Makefile.conf
BIN_SCRIPTS = dpkg-name dpkg-source dpkg-genchanges \
dpkg-gencontrol dpkg-shlibdeps dpkg-buildpackage \
dpkg-parsechangelog dpkg-distaddfile 822-date \
dpkg-scanpackages dpkg-scansources dpkg-architecture
SBIN_SCRIPTS = update-rc.d update-alternatives install-info \
dpkg-divert cleanup-info
MAN1PAGES = dpkg-name.1 dpkg-source.1 822-date.1 dpkg-architecture.1
MAN8PAGES = update-rc.d.8 update-alternatives.8 install-info.8 \
cleanup-info.8 dpkg-scanpackages.8 dpkg-scansources.8 \
dpkg-divert.8
CHANGELOG_PARSERS = cl-debian
SCRIPTLIBS = controllib.pl
LISPFILES = debian-changelog-mode.el
GEN_MAN8PAGES = dpkg-scansources.8
MAN_SOURCE_ALIASES = dpkg-gencontrol.1 dpkg-genchanges.1 dpkg-buildpackage.1 \
dpkg-distaddfile.1 dpkg-parsechangelog.1 dpkg-shlibdeps.1
GENFILES = $(CHANGELOG_PARSERS) $(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(GEN_MAN8PAGES)
.PHONY: all
all:: $(GENFILES)
.PHONY: install
install:: all install-program install-doc
.PHONY: clean
clean::
$(RM) $(GENFILES)
.PHONY: distclean
cvslean:: clean
$(RM) Makefile
.PHONY: install-program
install-program:
$(mkinstalldirs) $(DESTDIR)/$(bindir)
set -e ; for i in $(BIN_SCRIPTS) ; do \
if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
$(INSTALL_SCRIPT) $$d$$i $(DESTDIR)/$(bindir) ; \
done
$(mkinstalldirs) $(DESTDIR)/$(sbindir)
set -e ; for i in $(SBIN_SCRIPTS) ; do \
if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
$(INSTALL_SCRIPT) $$d$$i $(DESTDIR)/$(sbindir) ; \
done
$(mkinstalldirs) $(DESTDIR)/$(alternativesdir)
$(INSTALL_DATA) $(srcdir)/README.alternatives \
$(DESTDIR)/$(alternativesdir)/README
$(mkinstalldirs) $(DESTDIR)/$(parsechangelogdir)
set -e ; for i in $(CHANGELOG_PARSERS) ; do \
if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
rn=`echo $$i | sed -e 's/^cl-//'` ; \
$(INSTALL_SCRIPT) $$d$$i $(DESTDIR)/$(parsechangelogdir)/$$rn ; \
done
$(mkinstalldirs) $(DESTDIR)/$(dpkglibdir)
set -e ; for i in $(SCRIPTLIBS) ; do \
if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
$(INSTALL_DATA) $$d$$i $(DESTDIR)/$(dpkglibdir) ; \
done
$(mkinstalldirs) $(DESTDIR)/$(elispdir)
set -e ; for i in $(LISPFILES) ; do \
if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
$(INSTALL_DATA) $$d$$i $(DESTDIR)/$(elispdir) ; \
done
.PHONY: install-doc
install-doc:
$(mkinstalldirs) $(DESTDIR)/$(man1dir)
set -e ; for i in $(MAN1PAGES) ; do \
if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
$(INSTALL_DATA) $$d$$i $(DESTDIR)/$(man1dir) ; \
done
set -e ; for i in $(MAN_SOURCE_ALIASES) ; do \
echo ".so man1/dpkg-source.1" > $(DESTDIR)$(man1dir)/$$i ; \
chmod 644 $(DESTDIR)$(man1dir)/$$i ; \
done
$(mkinstalldirs) $(DESTDIR)/$(man8dir)
set -e ; for i in $(MAN8PAGES) $(GEN_MAN8PAGES) ; do \
if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
$(INSTALL_DATA) $$d$$i $(DESTDIR)/$(man8dir) ; \
done
%.8: %.pl
pod2man --section=8 $^ > $@
%: %.pl
$(SED) -e "s:^#![:space:]*/usr/bin/perl:#! $(PERL):; \
s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(dpkglibdir)\":; \
s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(VERSION)\":" \
< $< > $@
%: %.sh
$(SED) -e "s:version=\"[^\"]*\":version=\"$(VERSION)\":" \
< $< > $@
|