xref: /petsc/makefile (revision 52e90ed5550c654aba16ffca65516d47ac46289e)
1#
2# This is the makefile for compiling PETSc. See
3# http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html for directions on installing PETSc.
4# See also bmake/common for additional commands.
5#
6ALL: all
7LOCDIR	 = ./
8DIRS	 = src include
9CFLAGS	 =
10FFLAGS	 =
11
12include ${PETSC_DIR}/bmake/common/base
13include ${PETSC_DIR}/bmake/common/test
14
15#
16# Basic targets to build PETSc libraries.
17# all: builds the c, fortran, and f90 libraries
18all:
19	@${OMAKE}  PETSC_ARCH=${PETSC_ARCH}  chkpetsc_dir
20	-@${OMAKE} all_build 2>&1 | tee make_log_${PETSC_ARCH}
21	-@egrep -i "( error | error:)" make_log_${PETSC_ARCH} > /dev/null; if [ "$$?" = "0" ]; then \
22           echo "********************************************************************"; \
23           echo "  Error during compile, check make_log_${PETSC_ARCH}"; \
24           echo "  Send it and configure.log to petsc-maint@mcs.anl.gov";\
25           echo "********************************************************************"; \
26           exit 1; fi
27
28all_build: chk_petsc_dir chklib_dir info info_h deletelibs  build shared
29#
30# Prints information about the system and version of PETSc being compiled
31#
32info:
33	-@echo "=========================================="
34	-@echo " "
35	-@echo "See docs/faq.html and docs/bugreporting.html"
36	-@echo "for help with installation problems. Please send EVERYTHING"
37	-@echo "printed out below when reporting problems"
38	-@echo " "
39	-@echo "To subscribe to the PETSc users mailing list, send mail to "
40	-@echo "majordomo@mcs.anl.gov with the message: "
41	-@echo "subscribe petsc-announce"
42	-@echo " "
43	-@echo "=========================================="
44	-@echo On `date` on `hostname`
45	-@echo Machine characteristics: `uname -a`
46	-@echo "-----------------------------------------"
47	-@echo "Using PETSc directory: ${PETSC_DIR}"
48	-@echo "Using PETSc arch: ${PETSC_ARCH}"
49	-@echo "-----------------------------------------"
50	-@grep "define PETSC_VERSION" ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//"
51	-@echo "-----------------------------------------"
52	-@echo "Using configuration flags:"
53	-@grep "\#define " ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscconf.h
54	-@echo "-----------------------------------------"
55	-@echo "Using include paths: ${PETSC_INCLUDE}"
56	-@echo "------------------------------------------"
57	-@echo "Using C/C++ compiler: ${CC} ${CC_FLAGS} ${COPTFLAGS} ${CFLAGS}"
58	-@echo "C/C++ Compiler version: " `${CCV}`
59	-@if [ "${FC}" != "" ]; then \
60	   echo "Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}";\
61	   echo "Fortran Compiler version: " `${FCV}`;\
62         fi
63	-@echo "-----------------------------------------"
64	-@echo "Using C/C++ linker: ${CC_LINKER}"
65	-@if [ "${FC}" != "" ]; then \
66	   echo "Using Fortran linker: ${FC_LINKER}";\
67         fi
68	-@echo "-----------------------------------------"
69	-@echo "Using libraries: ${PETSC_LIB}"
70	-@echo "------------------------------------------"
71	-@echo "Using mpirun: ${MPIRUN}"
72	-@echo "=========================================="
73#
74#
75MINFO = ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscmachineinfo.h
76info_h:
77	-@$(RM) -f ${MINFO} MINFO
78	-@echo  "static const char *petscmachineinfo = \"\__n__\"" >> MINFO
79	-@echo  "\"-----------------------------------------\__n__\"" >> MINFO
80	-@echo  "\"Libraries compiled on `date` on `hostname` \__n__\"" >> MINFO
81	-@echo  "\"Machine characteristics: `uname -a` \__n__\"" >> MINFO
82	-@echo  "\"Using PETSc directory: ${PETSC_DIR}\__n__\"" >> MINFO
83	-@echo  "\"Using PETSc arch: ${PETSC_ARCH}\__n__\"" >> MINFO
84	-@echo  "\"-----------------------------------------\"; " >> MINFO
85	-@echo  "static const char *petsccompilerinfo = \"\__n__\"" >> MINFO
86	-@echo  "\"Using C compiler: ${CC} ${CC_FLAGS} ${COPTFLAGS} ${CFLAGS}\__n__\"" >> MINFO
87	-@echo  "\"Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}\__n__\"" >> MINFO
88	-@echo  "\"-----------------------------------------\"; " >> MINFO
89	-@echo  "static const char *petsccompilerflagsinfo = \"\__n__\"" >> MINFO
90	-@echo  "\"Using include paths: ${PETSC_INCLUDE}\__n__\"" >> MINFO
91	-@echo  "\"------------------------------------------\"; " >> MINFO
92	-@echo  "static const char *petsclinkerinfo = \"\__n__\"" >> MINFO
93	-@echo  "\"Using C linker: ${CLINKER}\__n__\"" >> MINFO
94	-@echo  "\"Using Fortran linker: ${FLINKER}\__n__\"" >> MINFO
95	-@echo  "\"Using libraries: ${PETSC_LIB} \__n__\"" >> MINFO
96	-@echo  "\"------------------------------------------\"; " >> MINFO
97	-@cat MINFO | ${SED} -e 's/\\ /\\\\ /g' | {SED} -e 's/__n__/n/g' > ${MINFO}
98	-@ if [ -f /usr/bin/cygcheck.exe ]; then /usr/bin/dos2unix ${MINFO} 2> /dev/null; fi
99	-@$(RM) -f MINFO
100
101#
102# Builds the PETSc libraries
103# This target also builds fortran77 and f90 interface
104# files and compiles .F files
105#
106build:
107	-@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES"
108	-@echo "========================================="
109	-@${OMAKE}  PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=libfast tree
110	-@${RANLIB} ${PETSC_LIB_DIR}/*.${AR_LIB_SUFFIX}
111	-@echo "Completed building libraries"
112	-@echo "========================================="
113#
114# Builds the Python wrappers
115python:
116	-@if [ -d "${PETSC_DIR}/src/python/PETSc" ]; then \
117	  echo "COMPILING PYTHON WRAPPERS"; \
118	  echo "========================================="; \
119	  PYTHONPATH=${PYTHONPATH}:${PETSC_DIR}/python/BuildSystem ./make.py --with-petsc-arch=${PETSC_ARCH}; \
120	  echo "Completed building Python wrappers"; \
121	  echo "========================================="; \
122	fi
123#
124# Builds PETSc test examples for a given architecture
125#
126test:
127	-@echo "Running test examples to verify correct installation"
128	@cd src/snes/examples/tutorials; ${OMAKE} PETSC_ARCH=${PETSC_ARCH}  PETSC_DIR=${PETSC_DIR} testex19
129	@if [ "${FC}" != "" ]; then cd src/snes/examples/tutorials; ${OMAKE} PETSC_ARCH=${PETSC_ARCH}  PETSC_DIR=${PETSC_DIR} testex5f; fi;
130	-@echo "Completed test examples"
131
132testexamples: info
133	-@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES"
134	-@echo "Due to different numerical round-off on certain"
135	-@echo "machines some of the numbers may not match exactly."
136	-@echo "========================================="
137	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH}  PETSC_DIR=${PETSC_DIR} ACTION=testexamples_C  tree
138	-@echo "Completed compiling and running test examples"
139	-@echo "========================================="
140testfortran: info
141	-@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES"
142	-@echo "========================================="
143	-@echo "Due to different numerical round-off on certain"
144	-@echo "machines or the way Fortran formats numbers"
145	-@echo "some of the results may not match exactly."
146	-@echo "========================================="
147	-@if [ "${FC}" != "" ]; then \
148            ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_Fortran tree; \
149            echo "Completed compiling and running Fortran test examples"; \
150          else \
151            echo "Error: No FORTRAN compiler available"; \
152          fi
153	-@echo "========================================="
154testexamples_uni: info
155	-@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES"
156	-@echo "Due to different numerical round-off on certain"
157	-@echo "machines some of the numbers may not match exactly."
158	-@echo "========================================="
159	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_C_X11_MPIUni  tree
160	-@echo "Completed compiling and running uniprocessor test examples"
161	-@echo "========================================="
162testfortran_uni: info
163	-@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES"
164	-@echo "Due to different numerical round-off on certain"
165	-@echo "machines some of the numbers may not match exactly."
166	-@echo "========================================="
167	-@if [ "${FC}" != "" ]; then \
168            ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_Fortran_MPIUni  tree; \
169            echo "Completed compiling and running uniprocessor fortran test examples"; \
170          else \
171            echo "Error: No FORTRAN compiler available"; \
172          fi
173	-@
174	-@echo "========================================="
175
176# Ranlib on the libraries
177ranlib:
178	${RANLIB} ${PETSC_LIB_DIR}/*.${AR_LIB_SUFFIX}
179
180# Deletes PETSc libraries
181deletelibs:
182	-${RM} -f ${PETSC_LIB_DIR}/lib*.*
183
184# Cleans up build
185allclean: deletelibs
186	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=clean tree
187
188
189#
190# Check if PETSC_DIR variable specified is valid
191#
192chk_petsc_dir:
193	@if [ ! -f ${PETSC_DIR}/include/petscversion.h ]; then \
194	  echo "Incorrect PETSC_DIR specified: ${PETSC_DIR}!"; \
195	  echo "You need to use / to separate directories, not \\!"; \
196	  echo "Aborting build"; \
197	  false; fi
198#
199#
200install:
201	-@if [ "${INSTALL_DIR}" = "${PETSC_DIR}" ]; then \
202	  echo "Install directory is current directory; nothing needs to be done";\
203        else \
204	  echo Installing PETSc at ${INSTALL_DIR};\
205          if [ ! -d `dirname ${INSTALL_DIR}` ]; then \
206	    ${MKDIR} `dirname ${INSTALL_DIR}` ; \
207          fi;\
208          if [ ! -d ${INSTALL_DIR} ]; then \
209	    ${MKDIR} ${INSTALL_DIR} ; \
210          fi;\
211          cp -fr include ${INSTALL_DIR};\
212          if [ ! -d ${INSTALL_DIR}/bmake ]; then \
213	    ${MKDIR} ${INSTALL_DIR}/bmake ; \
214          fi;\
215          cp -f bmake/adic* bmake/petscconf ${INSTALL_DIR}/bmake ; \
216          cp -fr bmake/common ${INSTALL_DIR}/bmake;\
217          cp -fr bmake/${PETSC_ARCH} ${INSTALL_DIR}/bmake;\
218          cp -fr bin ${INSTALL_DIR};\
219          if [ ! -d ${INSTALL_DIR}/lib ]; then \
220	    ${MKDIR} ${INSTALL_DIR}/lib ; \
221          fi;\
222          if [ -d lib/${PETSC_ARCH} ]; then \
223            cp -fr lib/${PETSC_ARCH} ${INSTALL_DIR}/lib;\
224            ${RANLIB} ${INSTALL_DIR}/lib/${PETSC_ARCH}/*.a ;\
225            ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${INSTALL_DIR} shared; \
226          fi;\
227          echo "sh/bash: PETSC_DIR="${INSTALL_DIR}"; export PETSC_DIR";\
228          echo "csh/tcsh: setenv PETSC_DIR "${INSTALL_DIR} ;\
229          echo "Then do make test to verify correct install";\
230        fi;
231
232install_src:
233	-@if [ "${INSTALL_DIR}" = "${PETSC_DIR}" ]; then \
234	  echo "You did not set a directory to install to";\
235        else \
236	  echo Installing PETSc source at ${INSTALL_DIR};\
237          if [ ! -d `dirname ${INSTALL_DIR}` ]; then \
238	    ${MKDIR} `dirname ${INSTALL_DIR}` ; \
239          fi;\
240          if [ ! -d ${INSTALL_DIR} ]; then \
241	    ${MKDIR} ${INSTALL_DIR} ; \
242          fi;\
243          cp -fr src ${INSTALL_DIR};\
244        fi;
245
246install_docs:
247	-@if [ "${INSTALL_DIR}" = "${PETSC_DIR}" ]; then \
248	  echo "You did not set a directory to install to";\
249        else \
250	  echo Installing PETSc documentation at ${INSTALL_DIR};\
251          if [ ! -d `dirname ${INSTALL_DIR}` ]; then \
252	    ${MKDIR} `dirname ${INSTALL_DIR}` ; \
253          fi;\
254          if [ ! -d ${INSTALL_DIR} ]; then \
255	    ${MKDIR} ${INSTALL_DIR} ; \
256          fi;\
257          cp -fr docs ${INSTALL_DIR};\
258          ${RM} -fr docs/tex;\
259        fi;
260# ------------------------------------------------------------------
261#
262# All remaining actions are intended for PETSc developers only.
263# PETSc users should not generally need to use these commands.
264#
265
266# To access the tags in EMACS, type M-x visit-tags-table and specify
267# the file petsc/TAGS.
268# 1) To move to where a PETSc function is defined, enter M-. and the
269#     function name.
270# 2) To search for a string and move to the first occurrence,
271#     use M-x tags-search and the string.
272#     To locate later occurrences, use M-,
273# Builds all etags files
274alletags:
275	-@maint/generateetags.py
276	-@find python -type f -name "*.py" |grep -v SCCS | xargs etags -o TAGS_PYTHON
277
278allfortranstubs:
279	-@maint/generatefortranstubs.py ${BFORT}
280#
281# These are here for the target allci and allco, and etags
282#
283
284BMAKEFILES = bmake/common/base bmake/common/test bmake/adic.init bmake/adicmf.init
285DOCS	   = bmake/readme
286SCRIPTS    = maint/builddist  maint/wwwman maint/xclude maint/bugReport.py maint/buildconfigtest maint/builddistlite \
287             maint/buildtest maint/checkBuilds.py maint/copylognightly maint/copylognightly.tao maint/countfiles maint/findbadfiles \
288             maint/fixinclude maint/getexlist maint/getpdflabels.py maint/helpindex.py maint/hosts.local maint/hosts.solaris  \
289             maint/lex.py  maint/mapnameslatex.py maint/startnightly maint/startnightly.tao maint/submitPatch.py \
290             maint/update-docs.py  maint/wwwindex.py maint/xcludebackup maint/xcludecblas maint/zap maint/zapall \
291             python/PETSc/Configure.py python/PETSc/Options.py \
292             python/PETSc/packages/*.py python/PETSc/utilities/*.py
293
294chk_loc:
295	@if [ ${LOC}foo = foo ] ; then \
296	  echo "*********************** ERROR ************************" ; \
297	  echo " Please specify LOC variable for eg: make allmanualpages LOC=/sandbox/petsc"; \
298	  echo "******************************************************";  false; fi
299	@${MKDIR} ${LOC}/docs/manualpages
300
301# Builds all the documentation - should be done every night
302alldoc: alldoc1 alldoc2
303
304# Build everything that goes into 'doc' dir except html sources
305alldoc1: chk_loc deletemanualpages chk_concepts_dir
306	-${OMAKE} ACTION=manualpages_buildcite tree_basic LOC=${LOC}
307	-@sed -e s%man+../%man+manualpages/% ${LOC}/docs/manualpages/manualpages.cit > ${LOC}/docs/manualpages/htmlmap
308	-@cat ${PETSC_DIR}/src/docs/mpi.www.index >> ${LOC}/docs/manualpages/htmlmap
309	cd src/docs/tex/manual; ${OMAKE} manual.pdf LOC=${LOC}
310	-${OMAKE} ACTION=manualpages tree_basic LOC=${LOC}
311	-maint/wwwindex.py ${PETSC_DIR} ${LOC}
312	-${OMAKE} ACTION=manexamples tree_basic LOC=${LOC}
313	-${OMAKE} manconcepts LOC=${LOC}
314	-${OMAKE} ACTION=getexlist tree_basic LOC=${LOC}
315	-${OMAKE} ACTION=exampleconcepts tree_basic LOC=${LOC}
316	-maint/helpindex.py ${PETSC_DIR} ${LOC}
317	-grep -h Polymorphic include/*.h | grep -v '#define ' | sed "s?PetscPolymorphic[a-zA-Z]*(??g" | cut -f1 -d"{" > tmppoly
318	-maint/processpoly.py ${PETSC_DIR} ${LOC}
319	-${RM} tmppoly
320
321# Builds .html versions of the source
322# html overwrites some stuff created by update-docs - hence this is done later.
323alldoc2: chk_loc
324	-${OMAKE} ACTION=html PETSC_DIR=${PETSC_DIR} alltree LOC=${LOC}
325	-maint/update-docs.py ${PETSC_DIR} ${LOC}
326
327alldocclean: deletemanualpages allcleanhtml
328
329# Deletes man pages (HTML version)
330deletemanualpages: chk_loc
331	-@if [ -d ${LOC} -a -d ${LOC}/docs/manualpages ]; then \
332          find ${LOC}/docs/manualpages -type f -name "*.html" -exec ${RM} {} \; ;\
333          ${RM} ${LOC}/docs/exampleconcepts ;\
334          ${RM} ${LOC}/docs/manconcepts ;\
335          ${RM} ${LOC}/docs/manualpages/manualpages.cit ;\
336          maint/update-docs.py ${PETSC_DIR} ${LOC} clean;\
337        fi
338
339allcleanhtml:
340	-${RM} include/adic/*.h.html
341	-${OMAKE} ACTION=cleanhtml PETSC_DIR=${PETSC_DIR} alltree
342
343chk_concepts_dir: chk_loc
344	@if [ ! -d "${LOC}/docs/manualpages/concepts" ]; then \
345	  echo Making directory ${LOC}/docs/manualpages/concepts for library; ${MKDIR} ${LOC}/docs/manualpages/concepts; fi
346#
347#  makes .lines files for all source code
348#
349allgcov:
350	-@${RM} -rf /tmp/gcov
351	-@mkdir /tmp/gcov
352	-${OMAKE} ACTION=gcov PETSC_DIR=${PETSC_DIR} tree
353
354# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28
355allrcslabel:
356	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel  alltree
357#
358#   The commands below are for generating ADIC versions of the code;
359# they are not currently used.
360#
361alladicignore:
362	-@${RM} ${INSTALL_LIB_DIR}/adicignore
363	-@${OMAKE}  PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore  tree
364
365alladic:
366	-@echo "Beginning to compile ADIC source code in all directories"
367	-@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}"
368	-@echo "========================================="
369	-@cd include ; \
370           ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h
371	-@${OMAKE}  PETSC_ARCH=${PETSC_ARCH} ACTION=adic  tree
372	-@cd src/inline ; \
373            ${OMAKE} PETSC_ARCH=${PETSC_ARCH} adic
374
375alladiclib:
376	-@echo "Beginning to compile ADIC libraries in all directories"
377	-@echo "Using compiler: ${CC} ${COPTFLAGS}"
378	-@echo "-----------------------------------------"
379	-@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}"
380	-@echo "-----------------------------------------"
381	-@echo "Using configuration flags:"
382	-@grep "define " bmake/${INLUDE_ARCH}/petscconf.h
383	-@echo "-----------------------------------------"
384	-@echo "Using include paths: ${PETSC_INCLUDE}"
385	-@echo "-----------------------------------------"
386	-@echo "Using PETSc directory: ${PETSC_DIR}"
387	-@echo "Using PETSc arch: ${PETSC_ARCH}"
388	-@echo "========================================="
389	-@${RM} -f  ${INSTALL_LIB_DIR}/*adic.${AR_LIB_SUFFIX}
390	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib  tree
391	-@cd src/adic/src ; \
392            ${OMAKE} PETSC_ARCH=${PETSC_ARCH} lib
393
394# -------------------------------------------------------------------------------
395#
396# Some macros to check if the fortran interface is up-to-date.
397#
398countfortranfunctions:
399	-@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \
400	cut -d'(' -f1 | tr -s  ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \
401	sed "s/_$$//" | sort > /tmp/countfortranfunctions
402
403countcfunctions:
404	-@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \
405	cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' |  \
406	tr 'A-Z' 'a-z' |  sort > /tmp/countcfunctions
407
408difffortranfunctions: countfortranfunctions countcfunctions
409	-@echo -------------- Functions missing in the fortran interface ---------------------
410	-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2
411	-@echo ----------------- Functions missing in the C interface ------------------------
412	-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2
413	-@${RM}  /tmp/countcfunctions /tmp/countfortranfunctions
414
415checkbadfortranstubs:
416	-@echo "========================================="
417	-@echo "Functions with MPI_Comm as an Argument"
418	-@echo "========================================="
419	-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \
420	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
421	-@echo "========================================="
422	-@echo "Functions with a String as an Argument"
423	-@echo "========================================="
424	-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \
425	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
426	-@echo "========================================="
427	-@echo "Functions with Pointers to PETSc Objects as Argument"
428	-@echo "========================================="
429	-@cd ${PETSC_DIR}/src/fortran/auto; \
430	_p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \
431	cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \
432	sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \
433	for OBJ in $$_p_OBJ; do \
434	grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \
435	cut -d'(' -f1 | cut -d' ' -f1,3; \
436	done
437#
438# Automatically generates PETSc exercises in html from the tutorial examples.
439#
440# The introduction for each section is obtained from docs/manualpages/header_${MANSEC} is under RCS and may be edited
441#  (used also in introductions to the manual pages)
442# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited
443# The list of exercises is from TUTORIALS in each directory's makefile
444#
445# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced.
446# The pagemaker rule is in the file bmake/common (at the bottom)
447#
448# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed
449#	-@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker
450#
451exercises:
452	-@echo "========================================="
453	-@echo "Generating HTML tutorial exercises"
454	-@${RM} docs/pageform.txt
455	-@echo "title=\"PETSc Exercises\""                >  docs/pageform.txt
456	-@echo "access_title=Exercise Sections"              >>  docs/pageform.txt
457	-@echo "access_format=short"                        >> docs/pageform.txt
458	-@echo "startpage=../exercises/introduction.htm"  >> docs/pageform.txt
459	-@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt
460	-@echo "Generating HTML for individual directories"
461	-@echo "========================================="
462	-@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree
463	-@echo "Completed HTML for individual directories"
464	-@echo "NONE title=\"<HR>\" " >> docs/pageform.txt;
465	-@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt
466	/home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises
467	-@echo "========================================="
468
469# Make a tarball of all the Python code
470#   This is currently used to release to the Teragrid
471petscPython.tgz:
472	@tar cvzf $@ --exclude SCCS --exclude BitKeeper --dereference python/
473	-@scp $@ tg-login2.uc.teragrid.org:./
474
475.PHONY: info info_h all all_build build testexamples testfortran testexamples_uni testfortran_uni ranlib deletelibs allclean update chk_petsc_dir \
476        alletags etags etags_complete etags_noexamples etags_makefiles etags_examples etags_fexamples alldoc allmanualpages \
477        allhtml allcleanhtml  allci allco allrcslabel alladicignore alladic alladiclib countfortranfunctions \
478        start_configure configure_petsc configure_clean python
479
480