~m-dev/+junk/iputils-maverick

« back to all changes in this revision

Viewing changes to doc/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Noah Meyerhans
  • Date: 2002-04-21 02:07:55 UTC
  • Revision ID: james.westby@ubuntu.com-20020421020755-ttbj5lnh9l137vct
Tags: upstream-20020124
ImportĀ upstreamĀ versionĀ 20020124

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
DOCDIR=/usr/doc/iputils
 
2
HTMLFILES=$(subst .sgml,.html,$(shell echo *.sgml))
 
3
MANFILES=$(subst .sgml,.8,$(shell echo *.sgml))
 
4
 
 
5
all: html
 
6
 
 
7
html: $(HTMLFILES) iputils.html index.html
 
8
 
 
9
man: $(MANFILES)
 
10
 
 
11
# This Makefile is wrong. I still did not find a way to organize
 
12
# dependencies right. We have several sources, several output
 
13
# files and all the output is produced by a single run of docbook.
 
14
# It does not look a rocket science, but I honestly still did not
 
15
# guess right combination. 
 
16
 
 
17
# docbook scripts are incredibly dirty in the sense that they leak
 
18
# lots of some strange temporary junk directories and files.
 
19
# So, scope it to a temporary dir and clean all after each run.
 
20
 
 
21
$(HTMLFILES) index.html: index.db
 
22
        @-rm -rf tmp.db2html
 
23
        @mkdir tmp.db2html
 
24
        @set -e; cd tmp.db2html; docbook2html ../$< ; mv *.html ..
 
25
        @-rm -rf tmp.db2html
 
26
 
 
27
iputils.html: iputils.db
 
28
        @-rm -rf tmp.db2html
 
29
        @mkdir tmp.db2html
 
30
        @set -e; cd tmp.db2html; docbook2html -u -o html ../$< ; mv html/$@ ..
 
31
        @-rm -rf tmp.db2html
 
32
 
 
33
# docbook2man produces utterly ugly output and I didi not find
 
34
# any way to customize this but hacking backend perl script a little.
 
35
# Well, hence...
 
36
 
 
37
$(MANFILES): index.db
 
38
        @-mkdir tmp.db2man
 
39
        @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
 
40
        @-rm -rf tmp.db2man
 
41
 
 
42
clean:
 
43
        rm -rf $(MANFILES) $(HTMLFILES) index.html iputils.html tmp.db2html tmp.db2man
 
44
 
 
45
snapshot:
 
46
        @date "+%y%m%d" > snapshot.db
 
47
 
 
48
install: html
 
49
        mkdir -p $(DESTDIR)$(DOCDIR)
 
50
        install -m 0644 $(HTMLFILES) iputils.html index.html $(DESTDIR)$(DOCDIR)