Whamcloud - gitweb
Another shot at CVS tag substitution.
[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 LYX2TXT = lyx --export text
7 LYX2HTML = lyx --export html
8 SUFFIXES = .lin .lyx .pdf .sgml .html .txt .fig .eps
9
10 DOCS = lustre.pdf lustre-HOWTO.txt
11 IMAGES =  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
12 LYXFILES= lustre.lin evolution.lyx  llocks.lyx mgmt.lyx uncertain.lyx\
13         fs.lyx         lustre-HOWTO.lin      namespace.lyx\
14         glossary.lyx   lustre-debugging.lyx  network.lyx\
15         intro.lyx      obdspec.lyx recovery.lyx
16
17 MAINTAINERCLEANFILES =  $(IMAGES) $(DOCS) $(GENERATED)
18 GENERATED = lustre-HOWTO.lyx lustre.lyx
19
20 EXTRA_DIST = $(DOCS) $(IMAGES) $(LYXFILES) TAG master.bib
21
22 all: $(DOCS)
23
24 # update date and version in document
25 date := $(shell date +%x)
26 tag := $(shell echo '$$Name:  $$' | sed 's/^\$$Na''me: \(.*\)\$$$$/\1/; s/^\$$Name\$$$$/HEAD/')
27 addversion = sed -e 's|@T''AG@|$(tag)|g; s|@VER''SION@|$(VERSION)|g; s|@DA''TE@|$(date)|g'
28
29 # Regenerate when the $(VERSION) or $Name:  $ changes.
30 .INTERMEDIATE: $(GENERATED)
31 $(GENERATED) : %.lyx: %.lin Makefile
32         $(addversion) $< > $@
33
34 .lyx.pdf:
35         @$(LYX2PDF) $< || printf "\n*** Warning: not creating PDF docs; install lyx to rectify this\n"
36
37 .lyx.txt:
38         @$(LYX2TXT) $< || printf "\n*** Warning: not creating text docs; install lyx to rectify this\n"
39
40 .lyx.html:
41         @$(LYX2HTML) $< || printf "\n*** Warning: not creating HTML docs; install lyx to rectify this\n"
42
43 lustre.pdf: $(IMAGES)
44 .fig.eps:
45         -fig2dev -L eps $< > $@
46
47 syncweb: lustre.pdf
48         cp lustre.pdf /usr/src/www/content/lustre/docs/lustre.pdf
49         ( cd /usr/src/www ; make lustre ; make synclustre )
50
51 dist-hook:
52         rm -rf $(distdir)/figs/CVS
53
54 include $(top_srcdir)/Rules