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
14 SUFFIXES = .lin .lyx .pdf .ps .sgml .html .txt .tex .fig .eps .dvi
16 DOCS = lustre.pdf lustre-HOWTO.txt
17 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 gssapi.eps lovextents.eps cpsd.eps setup-accept.eps authenticate.eps login.eps
18 LYXFILES= lustre.lin evolution.lyx llocks.lyx mgmt.lyx uncertain.lyx\
19 fs.lyx lustre-HOWTO.lin namespace.lyx\
20 glossary.lyx lustre-debugging.lyx network.lyx\
21 intro.lyx obdspec.lyx recovery.lyx
23 MAINTAINERCLEANFILES = $(IMAGES) $(DOCS) $(VERSIONED)
24 CLEANFILES = *.aux *.tex doc.old/*.aux doc.old/*.tex *.pdf *.eps
25 VERSIONED = lustre-HOWTO.lyx lustre.lyx doc.old/lustre-HOWTO.lyx doc.old/lustre.lyx
26 GENERATED = $(VERSIONED) lustre-full.tex lustre-chbar.tex
28 EXTRA_DIST = chbar.sh postbar $(DOCS) $(IMAGES) $(LYXFILES) lustre.bib
32 # update date and version in document
33 date := $(shell date +%x)
34 tag := $(shell echo '$$Name: $$' | sed -e 's/^\$$Na''me: *\$$$$/HEAD/; s/^\$$Na''me: \(.*\) \$$$$/\1/')
35 addversion = sed -e 's|@T''AG@|$(tag)|g; s|@VER''SION@|$(VERSION)|g; s|@DA''TE@|$(date)|g'
37 # Regenerate when the $(VERSION) or $Name: $ changes.
38 .INTERMEDIATE: $(GENERATED)
39 $(VERSIONED) : %.lyx: %.lin Makefile
43 @echo $(LYX2PDF) $< && $(LYX2PDF) $< || printf "\n*** Warning: not creating PDF docs; install lyx to rectify this\n"
46 @echo $(LYX2PS) $< && $(LYX2PS) $< || printf "\n*** Warning: not creating PostScript docs; install lyx to rectify this\n"
49 @echo $(LYX2TEX) $< && $(LYX2TEX) $< || printf "\n*** Warning: not creating LaTeX docs; install lyx to rectify this\n"
52 @echo $(LYX2TXT) $< && $(LYX2TXT) $< || printf "\n*** Warning: not creating text docs; install lyx to rectify this\n"
55 @echo $(LYX2HTML) $< && $(LYX2HTML) $< || printf "\n*** Warning: not creating HTML docs; install lyx to rectify this\n"
67 lustre.tex lustre.pdf lustre.txt lustre.html: $(IMAGES) lustre-HOWTO.lyx
69 -fig2dev -L eps $< > $@
72 cp lustre.pdf /usr/src/www/content/lustre/docs/lustre.pdf
73 ( cd /usr/src/www ; make lustre ; make synclustre )
76 # Build a changebar document from the files in doc.old and this directory.
77 chbar: lustre-chbar.pdf
79 lustre-chbar.tex: chbar.sh postbar doc.old/lustre-full.tex lustre-full.tex
80 $(SHELL) $(srcdir)/chbar.sh doc.old/lustre-full.tex lustre-full.tex | $(srcdir)/postbar > $@
82 lustre-full.tex: lustre.tex
83 $(TEXEXPAND) -texinputs=. -texinputs=$(srcdir) -output=$@ $<
85 doc.old/lustre.tex: doc.old/lustre-HOWTO.lyx
86 doc.old/lustre-full.tex: doc.old/lustre.tex
87 cd doc.old && $(TEXEXPAND) -texinputs=. -output=lustre-full.tex lustre.tex
89 # Check out the old directory if it doesn't exist.
90 doc.old/lustre.lin doc.old/lustre-HOWTO.lin:
91 @if test "X$(OLD)" = X; then \
92 echo "You must populate doc.old or specify a CVS tag like OLD=v0_5_1"; \
97 cvs checkout -r $(OLD) -d doc.old lustre/doc
100 rm -rf $(distdir)/figs/CVS
102 include $(top_srcdir)/Rules