WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] 02: doc-make-vars.patch

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] 02: doc-make-vars.patch
From: Adam Heath <doogie@xxxxxxxxxxxxx>
Date: Fri, 21 Jan 2005 11:40:03 -0600 (CST)
Delivery-date: Fri, 21 Jan 2005 17:43:01 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
===
Name: doc-make-vars.patch
Description: Use vars for complex programs
 It's generally standard to call complex programs indirectly thru make
 variables.  This allows them to be replaced easily with alternative
 versions, without editting each makefile.
 .
 Additionally, this patch makes use of $(pkgdocdir) in docs/Makefile.
DiffStat:
 docs/Makefile |   53 +++++++++++++++++++++++++++++++++++------------------
 1 files changed, 35 insertions(+), 18 deletions(-)

===
Description: Use vars for complex programs
 It's generally standard to call complex programs indirectly thru make
 variables.  This allows them to be replaced easily with alternative
 versions, without editting each makefile.
 .
 Additionally, this patch makes use of $(pkgdocdir) in docs/Makefile.

--- xen-2.0.3.orig/docs/Makefile
+++ xen-2.0.3/docs/Makefile
@@ -1,8 +1,21 @@
+#!/usr/bin/make -f

-DOC_TEX  := $(wildcard src/*.tex)
-DOC_PS   := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
-DOC_PDF  := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
-DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
+
+PS2PDF         := ps2pdf
+DVIPS          := dvips
+LATEX          := latex
+FIG2DEV                := fig2dev
+TGIF           := tgif
+LATEX2HTML     := latex2html
+
+package                = xen
+docdir         = /usr/share/doc
+pkgdocdir      = $(docdir)/$(package)
+
+DOC_TEX                := $(wildcard src/*.tex)
+DOC_PS         := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
+DOC_PDF                := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
+DOC_HTML       := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))

 GFX  = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
 GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
@@ -22,30 +38,34 @@
        rm -rf $(GFX) ps pdf html

 install: all
-       rm -rf $(prefix)/usr/share/doc/xen
-       mkdir -p $(prefix)/usr/share/doc/xen
-       cp -dR ps $(prefix)/usr/share/doc/xen
-       cp -dR pdf $(prefix)/usr/share/doc/xen
-       cp -dR html $(prefix)/usr/share/doc/xen
+       rm -rf $(prefix)$(pkgdocdir)
+       mkdir -p $(prefix)$(pkgdocdir)
+       cp -dR ps $(prefix)$(pkgdocdir)
+       cp -dR pdf $(prefix)$(pkgdocdir)
+       cp -dR html $(prefix)$(pkgdocdir)

 pdf/%.pdf: ps/%.ps
-       mkdir -p pdf ; ps2pdf $< $@
+       mkdir -p $(@D)
+       $(PS2PDF) $< $@.new
+       mv $@.new $@

 ps/%.ps: %.dvi
-       mkdir -p ps ; dvips -Ppdf -G0 -o $@ $<
+       mkdir -p $(@D)
+       $(DVIPS) -Ppdf -G0 -o $@.new $<
+       mv $@.new $@

 %.dvi: src/%.tex $(GFX)
-       latex $< >/dev/null
-       if [ -e $*.toc ] ; then latex $< >/dev/null ; fi
+       $(LATEX) $< >/dev/null
+       if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi

 %.eps: %.fig
-       fig2dev -L eps $< $@
+       $(FIG2DEV) -L eps $< $@

 %.eps: %.obj
-       tgif -print -color -eps $<
+       $(TGIF) -print -color -eps $<

 html/%/index.html: src/%.tex
-       mkdir -p html/$*
-       latex2html -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
-       -numbered_footnotes -local_icons -noinfo -math -dir html/$* \
+       mkdir -p $(@D)
+       $(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation 
\
+       -numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
        $< 1>/dev/null 2>/dev/null

===



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] 02: doc-make-vars.patch, Adam Heath <=