1 # Copyright (C) 2001, 2002 Cluster File Systems, Inc.
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
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
19 MAINTAINERCLEANFILES = $(IMAGES) $(DOCS) $(GENERATED)
20 GENERATED = lustre-HOWTO.lyx lustre.lyx
22 EXTRA_DIST = lyxchbar.sh chbar.sh $(DOCS) $(IMAGES) $(LYXFILES) lustre.bib
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'
31 # Regenerate when the $(VERSION) or $Name: $ changes.
32 .INTERMEDIATE: $(GENERATED)
33 $(GENERATED) : %.lyx: %.lin Makefile
37 @$(LYX2PDF) $< || printf "\n*** Warning: not creating PDF docs; install lyx to rectify this\n"
40 @$(LYX2PS) $< || printf "\n*** Warning: not creating PostScript docs; install lyx to rectify this\n"
43 @$(LYX2TEX) $< || printf "\n*** Warning: not creating LaTeX docs; install lyx to rectify this\n"
46 @$(LYX2TXT) $< || printf "\n*** Warning: not creating text docs; install lyx to rectify this\n"
49 @$(LYX2HTML) $< || printf "\n*** Warning: not creating HTML docs; install lyx to rectify this\n"
51 lustre.pdf lustre.txt lustre.html: $(IMAGES) lustre-HOWTO.lyx
53 -fig2dev -L eps $< > $@
56 cp lustre.pdf /usr/src/www/content/lustre/docs/lustre.pdf
57 ( cd /usr/src/www ; make lustre ; make synclustre )
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)
66 for f in $(LYXFILES); do \
67 $(SHELL) $(srcdir)/lyxchbar.sh doc.old/$$f $$f > doc.chbar/$$f; \
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
75 rm -rf $(distdir)/figs/CVS
77 include $(top_srcdir)/Rules