Whamcloud - gitweb
More documentation:
[fs/lustre-release.git] / lustre / doc / Makefile.am
1 # Copyright (C) 2001, 2002 Cluster File Systems, Inc.
2 #
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
5 LYX2PDF = lyx --export pdf
6 LYX2PS = lyx --export ps
7 LYX2TEX = lyx --export latex
8 LYX2TXT = lyx --export text
9 LYX2HTML = lyx --export html
10 SUFFIXES = .lin .lyx .pdf .ps .sgml .html .txt .tex .fig .eps
11
12 DOCS = lustre.pdf lustre-HOWTO.txt
13 IMAGES =  sys_open.eps sys_write.eps sys_mount.eps cache1.eps cache2.eps intermezzocache.eps intermezzofilesys.eps meta.eps metadata1.eps networklayer.eps bigpicture.eps intermezzo.eps mds.eps portals.eps client.eps layering.eps metadata.eps sb.eps cow.eps lockacq.eps obdfs.eps snapsetup.eps dirbodyapi.eps loraid.eps ost.eps updates.eps hotmigrate.eps lustreclusters.eps osthw.eps portals-lib.eps lockqueues.eps lockexample1.eps lockexample2.eps lockexample3.eps lockexample4.eps lockseverity.eps
14 LYXFILES= lustre.lin evolution.lyx  llocks.lyx mgmt.lyx uncertain.lyx\
15         fs.lyx         lustre-HOWTO.lin      namespace.lyx\
16         glossary.lyx   lustre-debugging.lyx  network.lyx\
17         intro.lyx      obdspec.lyx recovery.lyx
18
19 MAINTAINERCLEANFILES =  $(IMAGES) $(DOCS) $(GENERATED)
20 GENERATED = lustre-HOWTO.lyx lustre.lyx
21
22 EXTRA_DIST = lyxchbar.sh chbar.sh $(DOCS) $(IMAGES) $(LYXFILES) lustre.bib
23
24 all: $(DOCS)
25
26 # update date and version in document
27 date := $(shell date +%x)
28 tag := $(shell echo '$$Name:  $$' | sed -e 's/^\$$Na''me: *\$$$$/HEAD/; s/^\$$Na''me: \(.*\) \$$$$/\1/')
29 addversion = sed -e 's|@T''AG@|$(tag)|g; s|@VER''SION@|$(VERSION)|g; s|@DA''TE@|$(date)|g'
30
31 # Regenerate when the $(VERSION) or $Name:  $ changes.
32 .INTERMEDIATE: $(GENERATED)
33 $(GENERATED) : %.lyx: %.lin Makefile
34         $(addversion) $< > $@
35
36 .lyx.pdf:
37         @$(LYX2PDF) $< || printf "\n*** Warning: not creating PDF docs; install lyx to rectify this\n"
38
39 .lyx.ps:
40         @$(LYX2PS) $< || printf "\n*** Warning: not creating PostScript docs; install lyx to rectify this\n"
41
42 .lyx.tex:
43         @$(LYX2TEX) $< || printf "\n*** Warning: not creating LaTeX docs; install lyx to rectify this\n"
44
45 .lyx.txt:
46         @$(LYX2TXT) $< || printf "\n*** Warning: not creating text docs; install lyx to rectify this\n"
47
48 .lyx.html:
49         @$(LYX2HTML) $< || printf "\n*** Warning: not creating HTML docs; install lyx to rectify this\n"
50
51 lustre.pdf lustre.txt lustre.html: $(IMAGES) lustre-HOWTO.lyx
52 .fig.eps:
53         -fig2dev -L eps $< > $@
54
55 syncweb: lustre.pdf
56         cp lustre.pdf /usr/src/www/content/lustre/docs/lustre.pdf
57         ( cd /usr/src/www ; make lustre ; make synclustre )
58 .PHONY: syncweb chbar
59
60 # Build a changebar document from the files in doc.old and this directory.
61 chbar: lustre-chbar.pdf
62 lustre-chbar.pdf: lyxchbar.sh chbar.sh lustre.bib
63 lustre-chbar.pdf: $(addprefix doc.old/,$(LYXFILES)) $(LYXFILES)
64         rm -rf doc.chbar
65         mkdir doc.chbar
66         for f in $(LYXFILES); do \
67           $(SHELL) $(srcdir)/lyxchbar.sh doc.old/$$f $$f > doc.chbar/$$f; \
68         done
69         (cd doc.chbar && ln -s ../lustre.bib lustre.bib)
70         (cd doc.chbar && make -f ../Makefile top_srcdir=../.. top_builddir=../.. srcdir=.. VPATH=.. lustre.pdf)
71         cp -p doc.chbar/lustre.pdf lustre-chbar.pdf
72         #rm -rf doc.chbar
73
74 dist-hook:
75         rm -rf $(distdir)/figs/CVS
76
77 include $(top_srcdir)/Rules