Whamcloud - gitweb
- fix / problem
[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 = .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= master.lyx evolution.lyx  llocks.lyx mgmt.lyx uncertain.lyx\
13         fs.lyx         lustre-HOWTO.lyx      namespace.lyx\
14         glossary.lyx   lustre-debugging.lyx  network.lyx\
15         intro.lyx      obdspec.lyx recovery.lyx
16
17 MAINTAINERCLEANFILES =  $(IMAGES) $(DOCS) lustre-HOWTO.lyx
18 CLEANFILES = *.lyxT
19
20 EXTRA_DIST = $(DOCS) $(IMAGES) $(LYXFILES) DOCVERSION master.bib
21
22 all: $(DOCS)
23
24 # update date and version in document
25 tag := $(shell cat $(srcdir)/CVS/Tag 2>/dev/null || echo HEAD)
26 addstamp = sed "s|^Date:.*|Date: `date +%x`|g; s|^Version:.*|Version: $(tag)|g"
27
28 DOCVERSION:
29         echo $(tag) > DOCVERSION
30
31 .lyx.pdf:
32         rm -f $<T
33         $(addstamp) $< > $<T
34         @$(LYX2PDF) $< || printf "\n*** Warning: not creating PDF docs; install lyx to rectify this\n"
35         rm -f $<T
36
37 .lyx.txt:
38         rm -f $<T
39         $(addstamp) $< > $<T
40         @$(LYX2TXT) $< || printf "\n*** Warning: not creating text docs; install lyx to rectify this\n"
41         rm -f $<T
42
43 .lyx.html:
44         rm -f $<T
45         $(addstamp) $< > $<T
46         @$(LYX2HTML) $< || printf "\n*** Warning: not creating HTML docs; install lyx to rectify this\n"
47         rm -f $<T
48
49 .fig.eps:
50         -fig2dev -L eps $< > $@
51
52 lustre.lyx: master.lyx $(IMAGES) DOCVERSION
53         (ver="`cat DOCVERSION`" ;\
54         echo "version for $< is $$ver";\
55         sed "s/VERSION/version $$ver/" < $< > lustre.lyx.tmp ;\
56         thedate=`date +%x` ; sed "s:DATE:$$thedate , :" < lustre.lyx.tmp > lustre.lyx ;\
57         )
58
59 syncweb: lustre.pdf
60         cp lustre.pdf /usr/src/www/content/lustre/docs/lustre.pdf
61         ( cd /usr/src/www ; make lustre ; make synclustre )
62
63 dist-hook:
64         rm -rf $(distdir)/figs/CVS
65
66 include $(top_srcdir)/Rules