Manual Patch: Automate Builds
Jeffrey
oldham at codesourcery.com
Fri Feb 1 02:03:50 UTC 2002
2002-Jan-31 Jeffrey D. Oldham <oldham at codesourcery.com>
These changes help automate construction of the POOMA manual.
* Makefile: Update 'figure', 'program', and 'clean' targets to
support recursive builds.
* makefile: Remove this file in favor of 'Makefile'.
* pooma.xml: Change the locations of annotated source files.
* programs/Doof2d/Makefile: Modify to use patch using remote
source files.
* programs/Sequential/Makefile: Likewise.
Applied to mainline.
Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/Makefile,v
retrieving revision 1.4
diff -c -p -r1.4 Makefile
*** Makefile 2002/01/31 21:20:26 1.4
--- Makefile 2002/02/01 01:53:36
*************** XMLSOURCES= $(MANUALNAME).xml introducti
*** 18,32 ****
concepts.xml arrays.xml data-parallel.xml glossary.xml \
bibliography.xml
! ## HERE How do I include dependences on programs?
!
all: $(MANUALNAME).ps $(MANUALNAME).pdf $(MANUALNAME).html
! $(MANUALNAME).dvi $(MANUALNAME).pdf $(MANUALNAME).html: $(XMLSOURCES) figures
! figures:
$(MAKE) -C figures
genindex.sgm:
perl collateindex.pl $(INDEXOPTIONS) -N -o $@
--- 18,38 ----
concepts.xml arrays.xml data-parallel.xml glossary.xml \
bibliography.xml
! # Create all versions of the manual.
all: $(MANUALNAME).ps $(MANUALNAME).pdf $(MANUALNAME).html
! $(MANUALNAME).dvi $(MANUALNAME).pdf $(MANUALNAME).html: $(XMLSOURCES) figure \
! program
! # Create the figures for the manual.
! figure:
$(MAKE) -C figures
+ # Create the annotated programs for the manual.
+ program:
+ $(MAKE) -C programs/Doof2d
+ $(MAKE) -C programs/Sequential
+
genindex.sgm:
perl collateindex.pl $(INDEXOPTIONS) -N -o $@
*************** $(MANUALNAME).pdf: $(XMLSOURCES) geninde
*** 55,58 ****
--- 61,67 ----
pdfjadetex $(MANUALNAME).tex
clean:
+ $(MAKE) -C programs/Doof2d clean
+ $(MAKE) -C programs/Sequential clean
+ $(MAKE) -C figures clean
rm -f *.dvi *.aux *.log *.toc *.bak *.blg *.bbl *.glo *.idx *.lof *.lot *.htm *.html *.mpx mpxerr.tex HTML.index $(MANUALNAME).tex genindex.sgm pooma-html.manifest
Index: makefile
===================================================================
RCS file: makefile
diff -N makefile
*** /tmp/cvsARpksG Thu Jan 31 18:53:43 2002
--- /dev/null Fri Mar 23 21:37:44 2001
***************
*** 1,71 ****
- ### Oldham, Jeffrey D.
- ### 1997 Dec 26
- ### misc
- ###
- ### LaTeX -> PostScript/PDF/WWW
- ### XML -> TeX/DVI/PS/PDF
-
- # Definitions for PostScript and WWW Creation
- TEX= latex
- WWWHOMEDIR= /u/oldham/www
- LATEX2HTML= latex2html
- BASICLATEX2HTMLOPTIONS= -info "" -no_footnode -no_math -html_version 3.2,math
- #LATEX2HTMLOPTIONS= -local_icons -split +1 $(BASICLATEX2HTMLOPTIONS)
- LATEX2HTMLOPTIONS= -no_navigation -split 0 $(BASICLATEX2HTMLOPTIONS)
- MPOST= mpost
-
- # Definitions for Jade.
- JADEDIR= /usr/lib/sgml/stylesheets/docbook
- PRINTDOCBOOKDSL= print/docbook.dsl
- HTMLDOCBOOKDSL= html/docbook.dsl
- XML= dtds/decls/xml.dcl
- INDEXOPTIONS= -t 'Index' -i 'index' -g -p
-
- CXXFLAGS= -g -Wall -pedantic -W -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wcast-align -Wconversion -Wnested-externs -Wundef -Winline -static
-
- all: manual.ps
-
- manual.dvi: manual.xml introduction.xml tutorial.xml concepts.xml glossary.xml
-
- %.all: %.ps %.pdf %.html
- chmod 644 $*.ps $*.pdf
- mv $*.ps $*.pdf $*
-
- %.dvi: %.ltx
- $(TEX) $<
- # bibtex $*
- # $(TEX) $<
- $(TEX) $<
-
- %.ps: %.dvi
- dvips -t letter $< -o
-
- %.pdf.ltx: %.ltx
- sed -e 's/^%\\usepackage{times}/\\usepackage{times}/' $< > $@
-
- %.pdf: %.pdf.ps
- ps2pdf $< $@
-
- # This rule assumes index creation.
- %.dvi: %.xml genindex.sgm
- jade -D$(JADEDIR) -t sgml -d $(HTMLDOCBOOKDSL) -V html-index $(XML) $<
- perl collateindex.pl $(INDEXOPTIONS) -o genindex.sgm HTML.index
- jade -D$(JADEDIR) -t tex -d $(PRINTDOCBOOKDSL) $(XML) $< && jadetex $*.tex && jadetex $*.tex && jadetex $*.tex
-
- genindex.sgm:
- perl collateindex.pl $(INDEXOPTIONS) -N -o $@
-
- %.html: %.xml
- jade -D$(JADEDIR) -t sgml -d $(HTMLDOCBOOKDSL) $(XML) $<
-
- %.pdf: %.xml
- jade -D$(JADEDIR) -t tex -d $(PRINTDOCBOOKDSL) $(XML) $< && pdfjadetex $*.tex && pdfjadetex $*.tex
-
- mproof-%.ps: %.mp
- declare -x TEX=latex && $(MPOST) $< && tex mproof.tex $*.[0-9]* && dvips mproof.dvi -o $@
-
- %.txt: %.ltx
- detex $< > $@
-
- clean:
- rm -f *.dvi *.aux *.log *.toc *.bak *.blg *.bbl *.glo *.idx *.lof *.lot *.htm *.mpx mpxerr.tex HTML.index manual.tex
--- 0 ----
Index: pooma.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/pooma.xml,v
retrieving revision 1.1
diff -c -p -r1.1 pooma.xml
*** pooma.xml 2002/01/31 21:20:27 1.1
--- pooma.xml 2002/02/01 01:53:41
***************
*** 235,269 ****
<!-- External File Entities -->
<!-- Doof2d Programs -->
! <!ENTITY doof2d-c-element SYSTEM "./programs/examples/Doof2d/Doof2d-C-element-annotated.cpp">
<!-- hand-coded Doof2d implementation -->
! <!ENTITY doof2d-array-element SYSTEM "./programs/examples/Doof2d/Doof2d-Array-element-annotated.cpp">
<!-- Array element-wise Doof2d implementation -->
! <!ENTITY doof2d-array-parallel SYSTEM "./programs/examples/Doof2d/Doof2d-Array-parallel-annotated.cpp">
<!-- Array data-parallel Doof2d implementation -->
! <!ENTITY doof2d-array-stencil SYSTEM "./programs/examples/Doof2d/Doof2d-Array-stencil-annotated.cpp">
<!-- Array stencil Doof2d implementation -->
! <!ENTITY doof2d-array-distributed SYSTEM "./programs/examples/Doof2d/Doof2d-Array-distributed-annotated.cpp">
<!-- distributed Array stencil Doof2d implementation -->
! <!ENTITY doof2d-field-parallel SYSTEM "./programs/examples/Doof2d/Doof2d-Field-parallel-annotated.cpp">
<!-- Field data-parallel Doof2d implementation -->
! <!ENTITY doof2d-field-distributed SYSTEM "./programs/examples/Doof2d/Doof2d-Field-distributed-annotated.cpp">
<!-- Field data-parallel distributed Doof2d implementation -->
<!-- Sequential Programs -->
! <!ENTITY array-copy SYSTEM "./programs/examples/Sequential/array-copy-annotated.cpp">
<!-- Illustrate Array reference semantics. -->
! <!ENTITY array-size SYSTEM "./programs/examples/Sequential/array-size-annotated.cpp">
<!-- Illustrate Array member functions. -->
! <!ENTITY dynamicarray-example SYSTEM "./programs/examples/Sequential/dynamicarray-annotated.cpp">
<!-- Illustrate using DynamicArray class. -->
! <!ENTITY initialize-finalize SYSTEM "./programs/examples/Sequential/initialize-finalize-annotated.cpp">
<!-- Illustrate initialize() and finalize(). -->
<!-- Template Programs -->
! <!ENTITY pairs-untemplated SYSTEM "./programs/examples/Templates/pairs-untemplated-annotated.cpp">
<!-- Illustrate defining classes with pairs of values of the same type. -->
! <!ENTITY pairs-templated SYSTEM "./programs/examples/Templates/pairs-templated-annotated.cpp">
<!-- Illustrate defining a template class with pairs of values of the same type. -->
]>
--- 235,269 ----
<!-- External File Entities -->
<!-- Doof2d Programs -->
! <!ENTITY doof2d-c-element SYSTEM "./programs/Doof2d/Doof2d-C-element-annotated.cpp">
<!-- hand-coded Doof2d implementation -->
! <!ENTITY doof2d-array-element SYSTEM "./programs/Doof2d/Doof2d-Array-element-annotated.cpp">
<!-- Array element-wise Doof2d implementation -->
! <!ENTITY doof2d-array-parallel SYSTEM "./programs/Doof2d/Doof2d-Array-parallel-annotated.cpp">
<!-- Array data-parallel Doof2d implementation -->
! <!ENTITY doof2d-array-stencil SYSTEM "./programs/Doof2d/Doof2d-Array-stencil-annotated.cpp">
<!-- Array stencil Doof2d implementation -->
! <!ENTITY doof2d-array-distributed SYSTEM "./programs/Doof2d/Doof2d-Array-distributed-annotated.cpp">
<!-- distributed Array stencil Doof2d implementation -->
! <!ENTITY doof2d-field-parallel SYSTEM "./programs/Doof2d/Doof2d-Field-parallel-annotated.cpp">
<!-- Field data-parallel Doof2d implementation -->
! <!ENTITY doof2d-field-distributed SYSTEM "./programs/Doof2d/Doof2d-Field-distributed-annotated.cpp">
<!-- Field data-parallel distributed Doof2d implementation -->
<!-- Sequential Programs -->
! <!ENTITY array-copy SYSTEM "./programs/Sequential/array-copy-annotated.cpp">
<!-- Illustrate Array reference semantics. -->
! <!ENTITY array-size SYSTEM "./programs/Sequential/array-size-annotated.cpp">
<!-- Illustrate Array member functions. -->
! <!ENTITY dynamicarray-example SYSTEM "./programs/Sequential/dynamicarray-annotated.cpp">
<!-- Illustrate using DynamicArray class. -->
! <!ENTITY initialize-finalize SYSTEM "./programs/Sequential/initialize-finalize-annotated.cpp">
<!-- Illustrate initialize() and finalize(). -->
<!-- Template Programs -->
! <!ENTITY pairs-untemplated SYSTEM "./programs/Sequential/pairs-untemplated-annotated.cpp">
<!-- Illustrate defining classes with pairs of values of the same type. -->
! <!ENTITY pairs-templated SYSTEM "./programs/Sequential/pairs-templated-annotated.cpp">
<!-- Illustrate defining a template class with pairs of values of the same type. -->
]>
Index: programs/Doof2d/Makefile
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/programs/Doof2d/Makefile,v
retrieving revision 1.1
diff -c -p -r1.1 Makefile
*** programs/Doof2d/Makefile 2002/01/31 22:17:30 1.1
--- programs/Doof2d/Makefile 2002/02/01 01:53:43
***************
*** 7,16 ****
## These rules combine executable code, which can be compiled and run,
## with DocBook annotations used in the manual to explain the code.
! all: Doof2d-C-element-annotated.cpp Doof2d-Array-element-annotated.cpp \
Doof2d-Array-parallel-annotated.cpp Doof2d-Array-stencil-annotated.cpp \
Doof2d-Array-distributed-annotated.cpp \
Doof2d-Field-parallel-annotated.cpp Doof2d-Field-distributed-annotated.cpp
! %-annotated.cpp: %-annotated.patch %.cpp
! patch -o $@ < $<
--- 7,24 ----
## These rules combine executable code, which can be compiled and run,
## with DocBook annotations used in the manual to explain the code.
! TARGETS= Doof2d-C-element-annotated.cpp Doof2d-Array-element-annotated.cpp \
Doof2d-Array-parallel-annotated.cpp Doof2d-Array-stencil-annotated.cpp \
Doof2d-Array-distributed-annotated.cpp \
Doof2d-Field-parallel-annotated.cpp Doof2d-Field-distributed-annotated.cpp
! all: $(TARGETS)
!
! # directory containing the executable code
! EXECUTABLEDIRECTORY= ../../../../examples/Manual/Doof2d/
!
! %-annotated.cpp: %-annotated.patch $(EXECUTABLEDIRECTORY)/%.cpp
! patch -o $@ $(EXECUTABLEDIRECTORY)/$*.cpp $<
!
! clean:
! rm -f $(TARGETS)
Index: programs/Sequential/Makefile
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/programs/Sequential/Makefile,v
retrieving revision 1.1
diff -c -p -r1.1 Makefile
*** programs/Sequential/Makefile 2002/01/31 22:20:43 1.1
--- programs/Sequential/Makefile 2002/02/01 01:53:43
***************
*** 7,15 ****
## These rules combine executable code, which can be compiled and run,
## with DocBook annotations used in the manual to explain the code.
! all: array-copy-annotated.cpp dynamicarray-annotated.cpp \
initialize-finalize-annotated.cpp \
pairs-templated-annotated.cpp pairs-untemplated-annotated.cpp
! %-annotated.cpp: %-annotated.patch %.cpp
! patch -o $@ < $<
--- 7,24 ----
## These rules combine executable code, which can be compiled and run,
## with DocBook annotations used in the manual to explain the code.
! TARGETS= array-copy-annotated.cpp array-size-annotated.cpp \
! dynamicarray-annotated.cpp \
initialize-finalize-annotated.cpp \
pairs-templated-annotated.cpp pairs-untemplated-annotated.cpp
! all: $(TARGETS)
!
! # directory containing the executable code
! EXECUTABLEDIRECTORY= ../../../../examples/Manual/Sequential/
!
! %-annotated.cpp: %-annotated.patch $(EXECUTABLEDIRECTORY)/%.cpp
! patch -o $@ $(EXECUTABLEDIRECTORY)/$*.cpp $<
!
! clean:
! rm -f $(TARGETS)
More information about the pooma-dev
mailing list