ia64/xen-unstable

changeset 13701:ea3c75204555

Integrate the Xen-API doc into the build.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Sat Jan 27 18:26:41 2007 +0000 (2007-01-27)
parents 965cdfff68b0
children 5e1c7022d4ad
files docs/Docs.mk docs/Makefile docs/xen-api/Makefile
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/Docs.mk	Sat Jan 27 18:26:41 2007 +0000
     1.3 @@ -0,0 +1,12 @@
     1.4 +PS2PDF		:= ps2pdf
     1.5 +DVIPS		:= dvips
     1.6 +LATEX		:= latex
     1.7 +FIG2DEV		:= fig2dev
     1.8 +LATEX2HTML	:= latex2html
     1.9 +DOXYGEN		:= doxygen
    1.10 +POD2MAN		:= pod2man
    1.11 +DOT		:= dot
    1.12 +
    1.13 +pkgdocdir	:= /usr/share/doc/xen
    1.14 +mandir		:= /usr/share/man
    1.15 +
     2.1 --- a/docs/Makefile	Sat Jan 27 15:02:00 2007 +0000
     2.2 +++ b/docs/Makefile	Sat Jan 27 18:26:41 2007 +0000
     2.3 @@ -2,20 +2,10 @@
     2.4  
     2.5  XEN_ROOT=..
     2.6  include $(XEN_ROOT)/Config.mk
     2.7 +include $(XEN_ROOT)/docs/Docs.mk
     2.8  
     2.9  VERSION		= xen-unstable
    2.10  
    2.11 -PS2PDF		:= ps2pdf
    2.12 -DVIPS		:= dvips
    2.13 -LATEX		:= latex
    2.14 -FIG2DEV		:= fig2dev
    2.15 -LATEX2HTML	:= latex2html
    2.16 -DOXYGEN		:= doxygen
    2.17 -POD2MAN		:= pod2man
    2.18 -
    2.19 -pkgdocdir	:= /usr/share/doc/xen
    2.20 -mandir		:= /usr/share/man
    2.21 -
    2.22  DOC_MAN5SRC	:= $(wildcard man/*.pod.5)
    2.23  DOC_MAN1SRC	:= $(wildcard man/*.pod.1)
    2.24  DOC_MAN1	:= $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
    2.25 @@ -32,6 +22,9 @@ all: build
    2.26  
    2.27  .PHONY: build
    2.28  build: ps pdf html man-pages
    2.29 +	@if which $(DOT) 1>/dev/null 2>/dev/null ; then              \
    2.30 +	$(MAKE) -C xen-api build ; else                              \
    2.31 +        echo "Graphviz (dot) not installed; skipping xen-api." ; fi
    2.32  	rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
    2.33  
    2.34  .PHONY: dev-docs
    2.35 @@ -74,6 +67,7 @@ man5/%.5: man/%.pod.5 Makefile
    2.36  
    2.37  .PHONY: clean
    2.38  clean:
    2.39 +	$(MAKE) -C xen-api clean
    2.40  	rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~ 
    2.41  	rm -rf *.ilg *.log *.ind *.toc *.bak core
    2.42  	rm -rf $(GFX) ps pdf html
    2.43 @@ -88,6 +82,9 @@ distclean: clean
    2.44  install: all
    2.45  	rm -rf $(DESTDIR)$(pkgdocdir)
    2.46  	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
    2.47 +
    2.48 +	$(MAKE) -C xen-api install
    2.49 +
    2.50  	cp -dR ps $(DESTDIR)$(pkgdocdir)
    2.51  	cp -dR pdf $(DESTDIR)$(pkgdocdir)
    2.52  	$(INSTALL_DIR) $(DESTDIR)$(mandir)
     3.1 --- a/docs/xen-api/Makefile	Sat Jan 27 15:02:00 2007 +0000
     3.2 +++ b/docs/xen-api/Makefile	Sat Jan 27 18:26:41 2007 +0000
     3.3 @@ -1,22 +1,41 @@
     3.4 +#!/usr/bin/make -f
     3.5 +
     3.6 +XEN_ROOT=../..
     3.7 +include $(XEN_ROOT)/Config.mk
     3.8 +include $(XEN_ROOT)/docs/Docs.mk
     3.9 +
    3.10 +
    3.11  TEX := $(wildcard *.tex)
    3.12  EPS := $(wildcard *.eps)
    3.13  EPSDOT := $(patsubst %.dot,%.eps,$(wildcard *.dot))
    3.14  
    3.15  .PHONY: all
    3.16 -all: xenapi.pdf xenapi.ps
    3.17 +all: build
    3.18 +
    3.19 +.PHONY: build
    3.20 +build: xenapi.pdf xenapi.ps
    3.21 +
    3.22 +install:
    3.23 +	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)/ps
    3.24 +	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)/pdf
    3.25 +
    3.26 +	cp xenapi.ps $(DESTDIR)$(pkgdocdir)/ps
    3.27 +	cp xenapi.pdf $(DESTDIR)$(pkgdocdir)/pdf
    3.28 +
    3.29  
    3.30  xenapi.dvi: $(TEX) $(EPS) $(EPSDOT)
    3.31 -	latex xenapi.tex
    3.32 -	latex xenapi.tex
    3.33 +	$(LATEX) xenapi.tex
    3.34 +	$(LATEX) xenapi.tex
    3.35 +	rm -f *.aux *.log
    3.36  
    3.37  %.pdf: %.ps
    3.38 -	ps2pdf $< $@
    3.39 +	$(PS2PDF) $< $@
    3.40  
    3.41  %.ps: %.dvi
    3.42 -	dvips $< -o $@
    3.43 +	$(DVIPS) $< -o $@
    3.44  
    3.45  %.eps: %.dot
    3.46 -	dot -Tps $< >$@
    3.47 +	$(DOT) -Tps $< >$@
    3.48  
    3.49  .PHONY: clean
    3.50  clean: