File: Makefile.in

package info (click to toggle)
discover 2.1.2-10.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,756 kB
  • sloc: sh: 7,862; ansic: 7,280; xml: 1,809; makefile: 679
file content (108 lines) | stat: -rw-r--r-- 3,651 bytes parent folder | download | duplicates (8)
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
# $Progeny$

doc_files=		${srcdir}/guide.html \
			${srcdir}/guide.txt \
			${srcdir}/api-reference \
			${srcdir}/discover.1 \
			${srcdir}/discover-config.1 \
			${srcdir}/discover.conf.5 \
			${srcdir}/discover-modprobe.conf.5 \
			${srcdir}/discover-modprobe.8 \
			${srcdir}/discover-pkginstall.8

refentries=		discover-config.refentry \
			discover-modprobe.conf.refentry \
			discover-modprobe.refentry \
			discover-pkginstall.refentry \
			discover.conf.refentry \
			discover.refentry

sed_regexp = -e " s|/.*/discover.conf|${sysconfdir}/discover.conf|g " \
			-e " s|/.*/list.xml|@DISCOVER_DEFAULT_URL@|g " \
			-e " s|/.*/discover-modprobe.conf|${sysconfdir}/discover-modprobe.conf|g "

all: ${doc_files}

###############################################################################
# Clean

clean_FILES=		#none
distclean_FILES=	Makefile
maintainer_clean_FILES=	${doc_files} discover-config.refentry

clean:

distclean:
	rm -rf ${clean_FILES} ${distclean_FILES}

maintainer-clean:
	rm -rf ${clean_FILES} ${distclean_FILES} ${maintainer_clean_FILES}

###############################################################################
# Installation

install: ${doc_files}
	${INSTALL_DIR} ${DESTDIR}${datadir}/doc/discover
	${INSTALL_DIR} ${DESTDIR}${mandir}/man1
	${INSTALL_DIR} ${DESTDIR}${mandir}/man5
	${INSTALL_DIR} ${DESTDIR}${mandir}/man8
	@${MAKE} __sed_install FROM=${srcdir}/guide.html \
		TO=${DESTDIR}${datadir}/doc/discover/guide.html
	@${MAKE} __sed_install FROM=${srcdir}/guide.txt \
		TO=${DESTDIR}${datadir}/doc/discover/guide.txt

# XXX: If you have these, you're smarter than the
#      average bear
	cp -r ${srcdir}/api-reference/html \
		${DESTDIR}${datadir}/doc/discover/api-reference

	@${MAKE} __sed_install FROM=${srcdir}/discover.1 \
		TO=${DESTDIR}${mandir}/man1/discover.1
	@${MAKE} __sed_install FROM=${srcdir}/discover-config.1 \
		TO=${DESTDIR}${mandir}/man1/discover-config.1
	@${MAKE} __sed_install FROM=${srcdir}/discover.conf.5 \
		TO=${DESTDIR}${mandir}/man5/discover.conf.5
	@${MAKE} __sed_install FROM=${srcdir}/discover-modprobe.conf.5 \
		TO=${DESTDIR}${mandir}/man5/discover-modprobe.conf.5
	@${MAKE} __sed_install FROM=${srcdir}/discover-modprobe.8 \
		TO=${DESTDIR}${mandir}/man8/discover-modprobe.8
	@${MAKE} __sed_install FROM=${srcdir}/discover-pkginstall.8 \
		TO=${DESTDIR}${mandir}/man8/discover-pkginstall.8

uninstall:
	rm -f ${DESTDIR}${datadir}/doc/discover/guide.html
	rm -f ${DESTDIR}${datadir}/doc/discover/guide.txt
	rm -rf ${DESTDIR}${datadir}/doc/discover/api-reference
	rm -f ${DESTDIR}${mandir}/man1/discover-config.1
	rm -f ${DESTDIR}${mandir}/man8/discover-modprobe.8
	rm -f ${DESTDIR}${mandir}/man5/discover-modprobe.conf.5
	rm -f ${DESTDIR}${mandir}/man8/discover-pkginstall.8

###############################################################################
# Distribution

DISTFILES=		Doxyfile GNUmakefile Makefile.in \
			discover.refentry \
			bus-classes.xml \
			crash-snippet.xml \
			device-types.xml \
			guide.xml \
			range.fig \
			${doc_files} \
			${refentries}

distdir: ${DISTFILES}
	${top_srcdir}/buildtools/distdir ${distdir}/${_THISDIR_} ${DISTFILES}
	cp -r api-reference ${distdir}/${_THISDIR_}

# This rule exists because the documentation is generated as
# part of the distribution archive, in an environment where the
# directory layout may differ from that to be used on the
# installed system, and passed to the configure script.
#
# It's this, or force people to use all sorts of XML-based build
# tools installed and configured to just write.
__sed_install:
	sed ${sed_regexp} ${FROM} > ${FROM}.sed
	${INSTALL_DATA} ${FROM}.sed ${TO}
	rm ${FROM}.sed