File: Makefile.in

package info (click to toggle)
scmxx 0.9.0-2.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,964 kB
  • ctags: 1,111
  • sloc: ansic: 11,892; sh: 2,784; xml: 2,690; makefile: 253
file content (82 lines) | stat: -rw-r--r-- 2,939 bytes parent folder | download | duplicates (5)
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
SHELL=@SHELL@
prefix=@prefix@
mandir=$(DESTDIR)@mandir@
INSTALL=@INSTALL@
PACKAGE_NAME=@PACKAGE_NAME@
MANCAT=1
MAN=$(PACKAGE_NAME).$(MANCAT)
MAN_LANGS=$(patsubst $(PACKAGE_NAME).%.xml,%,$(wildcard $(PACKAGE_NAME).??.xml))
MAN_I18N=$(patsubst %,$(PACKAGE_NAME).%.$(MANCAT),$(MAN_LANGS))

#Use db2x_* directly, because docbook2x-0.8.5 is broken
DB2X_XSLTPROC=@DB2X_XSLTPROC@
DB2X_MANXML=@DB2X_MANXML@
XSLTPROC=@XSLTPROC@
#those are only used for xsltproc
XSL_MAN=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
XSL_MAN_UTF8=docbook-man-utf8.xsl
XSL_HTML=http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl

.PHONY: all
all: man-doc html-doc

.PHONY: man-doc
man-doc: $(MAN_I18N)

# If doxbook2x programs are not present, try the N. Walsh stylesheets.
# The xsltproc --output option is broken/ignored (probably forced by the XSL file)
# output always goes to $(MAN) as specified by the XML file

%.ru.$(MANCAT): %.ru.xml
	@-( test "$(DB2X_XSLTPROC)" && test "$(DB2X_MANXML)" && \
	    echo "docbook2x: $< -> $@" && \
	    $(DB2X_XSLTPROC) -s man $< | $(DB2X_MANXML) --encoding=UTF-8 --to-stdout >$@ ) || \
	  ( ( rm $(MAN) 2>/dev/null || true ) && \
	    test ! "$(DB2X_XSLTPROC)" && test ! "$(DB2X_MANXML)" && test "$(XSLTPROC)" && \
	    echo "xsltproc: $< -> $@" && \
	    $(XSLTPROC) $(XSL_MAN_UTF8) $< && test -f $(MAN) && mv $(MAN) $@ )

%.$(MANCAT): %.xml
	@-( test "$(DB2X_XSLTPROC)" && test "$(DB2X_MANXML)" && \
	    echo "docbook2x: $< -> $@" && \
	    $(DB2X_XSLTPROC) -s man $< | $(DB2X_MANXML) --to-stdout >$@ ) || \
	  ( ( rm $(MAN) 2>/dev/null || true ) && \
	    test ! "$(DB2X_XSLTPROC)" && test ! "$(DB2X_MANXML)" && test "$(XSLTPROC)" && \
	    echo "xsltproc: $< -> $@" && \
	    $(XSLTPROC) $(XSL_MAN) $< && test -f $(MAN) && mv $(MAN) $@ )

.PHONY: html-doc
html-doc: $(patsubst %,$(PACKAGE_NAME).%.html,$(MAN_LANGS))

%.html: %.xml
#default output for HTML is to stdout
	@-test "$(XSLTPROC)" && \
	  echo "xsltproc: $< -> $@" && \
	  $(XSLTPROC) $(XSL_HTML) $< >$@

.PHONY: clean
clean:
	@echo "To remove the troff and html files, run the distclean make target."

.PHONY: distclean
distclean:
	rm -f $(patsubst %,$(PACKAGE_NAME).%.1,$(MAN_LANGS));
	rm -f $(patsubst %,$(PACKAGE_NAME).%.html,$(MAN_LANGS));

.PHONY: install-$(PACKAGE_NAME).en.$(MANCAT)
install-$(PACKAGE_NAME).en.$(MANCAT): $(PACKAGE_NAME).en.$(MANCAT)
	$(INSTALL) -d $(mandir)/man$(MANCAT); \
	$(INSTALL) -m 644 $(PACKAGE_NAME).en.$(MANCAT) $(mandir)/man$(MANCAT)/$(MAN); \

.PHONY: install-$(PACKAGE_NAME).%.$(MANCAT)
install-$(PACKAGE_NAME).%.$(MANCAT): $(PACKAGE_NAME).%.$(MANCAT)
	$(INSTALL) -d $(mandir)/$*/man$(MANCAT); \
	$(INSTALL) -m 644 $(PACKAGE_NAME).$*.$(MANCAT) $(mandir)/$*/man$(MANCAT)/$(MAN); \

.PHONY: install
install: $(patsubst %,install-$(PACKAGE_NAME).%.$(MANCAT),$(MAN_LANGS))

.PHONY: uninstall
uninstall:
	-rm -f $(mandir)/man$(MANCAT)/$(MAN)
	-rm -f $(mandir)/*/man$(MANCAT)/$(MAN);