File: Makefile

package info (click to toggle)
doc-base 0.11.2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 600 kB
  • sloc: perl: 1,582; xml: 1,114; makefile: 195; sh: 96
file content (57 lines) | stat: -rw-r--r-- 1,405 bytes parent folder | download | duplicates (2)
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
# vim:ts=2
# makefile for doc-base

ALL_TARGET    := build-local
AFTER_INSTALL := $(call check_install)
SUBDIRS       := doc data perl po
include       common.mk

x:=$(subst /, ,$(abspath ))
x1:=$(strip $x)

generated     := $(bdir)/man/man8/install-docs.8  \
                $(bdir)/install-docs.html       \
                $(bdir)/install-docs

$(ALL_TARGET): $(generated) | $(bdir)


check: $(bdir)/install-docs
	$(call msg,$@)
	perl -I$(CURDIR)/perl -Tcw install-docs.in
	perl -I$(CURDIR)/perl -Tcw $(bdir)/install-docs

.PHONY: check


$(bdir)/install-docs: install-docs.in $(CHANGELOGFILE) | $(bdir)
	$(call msg,$@)
	sed -e '/#LINE_REMOVED_BY_MAKE#/d'   \
	    -e 's/#VERSION#/$(VERSION)/' \
	    < $< > $@
	chmod 755 $@

$(bdir)/man/man8/install-docs.8: $(bdir)/install-docs 
	$(call msg,$@)
	mkdir -p $(dir $@)
	cp $< $@.pod
	$(call podtoman,$(bdir)/man)

$(bdir)/install-docs.html: $(bdir)/install-docs 
	$(call msg,$@)
	cd $(bdir) && \
	pod2html --title "install-docs reference" \
	  < $(notdir $<) > $(notdir $@)

define check_install
	echo checking_installation; \
	PERL5LIB=$(perldir)      perl -cw $(sbindir)/install-docs
endef

install-local: $(generated)
	$(call msg,$@)
	$(call install,$(sbindir),$(bdir)/install-docs,script)
	$(call install,$(libdir)/info,,)
	$(call install,$(mandir)/man8,$(bdir)/man/man8/install-docs.8,compress)
	$(call install,$(docdir),$(bdir)/install-docs.html)