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