From af8b893e3a89e3cd3755a74cc14ebabe802a3585 Mon Sep 17 00:00:00 2001 From: gord-fig Date: Thu, 25 Jul 2002 20:20:23 +0000 Subject: [PATCH] Transform *.lin into *.lyx, updating @VERSION@, @TAG@, and @DATE@. Make generated .lyx files intermediates, so that they don't confuse people. Regenerate documentation if $(VERSION), or CVS/Tag changes. --- lustre/doc/Makefile.am | 48 +++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/lustre/doc/Makefile.am b/lustre/doc/Makefile.am index 4929c13..a97249e 100644 --- a/lustre/doc/Makefile.am +++ b/lustre/doc/Makefile.am @@ -5,57 +5,47 @@ LYX2PDF = lyx --export pdf LYX2TXT = lyx --export text LYX2HTML = lyx --export html -SUFFIXES = .lyx .pdf .sgml .html .txt .fig .eps +SUFFIXES = .lin .lyx .pdf .sgml .html .txt .fig .eps DOCS = lustre.pdf lustre-HOWTO.txt 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 -LYXFILES= master.lyx evolution.lyx llocks.lyx mgmt.lyx uncertain.lyx\ - fs.lyx lustre-HOWTO.lyx namespace.lyx\ +LYXFILES= lustre.lin evolution.lyx llocks.lyx mgmt.lyx uncertain.lyx\ + fs.lyx lustre-HOWTO.lin namespace.lyx\ glossary.lyx lustre-debugging.lyx network.lyx\ intro.lyx obdspec.lyx recovery.lyx -MAINTAINERCLEANFILES = $(IMAGES) $(DOCS) lustre-HOWTO.lyx -CLEANFILES = *.lyxT +MAINTAINERCLEANFILES = $(IMAGES) $(DOCS) $(GENERATED) +GENERATED = lustre-HOWTO.lyx lustre.lyx -EXTRA_DIST = $(DOCS) $(IMAGES) $(LYXFILES) DOCVERSION master.bib +EXTRA_DIST = $(DOCS) $(IMAGES) $(LYXFILES) master.bib all: $(DOCS) # update date and version in document -tag := $(shell cat $(srcdir)/CVS/Tag 2>/dev/null || echo HEAD) -addversion = sed -e 's|@T''AG@|$(tag)|g; s|@VER''SION@|$(VERSION)|g' +tag := $(shell cat $(srcdir)/CVS/Tag) +date := $(shell date +%x) +addversion = sed -e 's|@T''AG@|$(tag)|g; s|@VER''SION@|$(VERSION)|g; s|@DA''TE@|$(date)|g' -DOCVERSION: - echo $(tag) > DOCVERSION +# Regenerate when the $(VERSION) or CVS/Tag changes. +CVS/Tag: + echo HEAD > CVS/Tag +.INTERMEDIATE: $(GENERATED) +$(GENERATED) : %.lyx: %.lin Makefile CVS/Tag + $(addversion) $< > $@ .lyx.pdf: - rm -f $ $ $ $ $@ -lustre.lyx: master.lyx $(IMAGES) DOCVERSION - (ver="`cat DOCVERSION`" ;\ - echo "version for $< is $$ver";\ - sed "s/VERSION/version $$ver/" < $< > lustre.lyx.tmp ;\ - thedate=`date +%x` ; sed "s:DATE:$$thedate , :" < lustre.lyx.tmp > lustre.lyx ;\ - ) - syncweb: lustre.pdf cp lustre.pdf /usr/src/www/content/lustre/docs/lustre.pdf ( cd /usr/src/www ; make lustre ; make synclustre ) -- 1.8.3.1