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