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 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# ------------------------------------------------------------------ 203# 204# All remaining actions are intended for PETSc developers only. 205# PETSc users should not generally need to use these commands. 206# 207# See the users manual for how the tags files may be used from Emacs and Vi/Vim 208# 209alletags: 210 -@bin/maint/generateetags.py 211 -@find config -type f -name "*.py" |grep -v SCCS | xargs etags -o TAGS_PYTHON 212 213allfortranstubs: 214 -@${RM} -rf include/finclude/ftn-auto/*-tmpdir 215 -@bin/maint/generatefortranstubs.py ${BFORT} 216 -@bin/maint/generatefortranstubs.py -merge 217 -@${RM} -rf include/finclude/ftn-auto/*-tmpdir 218deletefortranstubs: 219 -@find . -type d -name ftn-auto | xargs rm -rf 220# 221# These are here for the target allci and allco, and etags 222# 223 224BMAKEFILES = conf/variables conf/rules conf/test bmake/adic.init bmake/adicmf.init 225SCRIPTS = bin/maint/builddist bin/maint/wwwman bin/maint/xclude bin/maint/bugReport.py bin/maint/buildconfigtest bin/maint/builddistlite \ 226 bin/maint/buildtest bin/maint/checkBuilds.py bin/maint/copylognightly bin/maint/copylognightly.tao bin/maint/countfiles bin/maint/findbadfiles \ 227 bin/maint/fixinclude bin/maint/getexlist bin/maint/getpdflabels.py bin/maint/helpindex.py bin/maint/hosts.local bin/maint/hosts.solaris \ 228 bin/maint/lex.py bin/maint/mapnameslatex.py bin/maint/startnightly bin/maint/startnightly.tao bin/maint/submitPatch.py \ 229 bin/maint/update-docs.py bin/maint/wwwindex.py bin/maint/xcludebackup bin/maint/xcludecblas bin/maint/zap bin/maint/zapall \ 230 config/PETSc/Configure.py config/PETSc/Options.py \ 231 config/PETSc/packages/*.py config/PETSc/utilities/*.py 232 233 234# Builds all the documentation - should be done every night 235alldoc: alldoc1 alldoc2 236 237# Build everything that goes into 'doc' dir except html sources 238alldoc1: chk_loc deletemanualpages chk_concepts_dir 239 -${OMAKE} ACTION=manualpages_buildcite tree_basic LOC=${LOC} 240 -@sed -e s%man+../%man+manualpages/% ${LOC}/docs/manualpages/manualpages.cit > ${LOC}/docs/manualpages/htmlmap 241 -@cat ${PETSC_DIR}/src/docs/mpi.www.index >> ${LOC}/docs/manualpages/htmlmap 242 -cd src/docs/tex/manual; ${OMAKE} manual.pdf LOC=${LOC} 243 -${OMAKE} ACTION=manualpages tree_basic LOC=${LOC} 244 -bin/maint/wwwindex.py ${PETSC_DIR} ${LOC} 245 -${OMAKE} ACTION=manexamples tree_basic LOC=${LOC} 246 -${OMAKE} manconcepts LOC=${LOC} 247 -${OMAKE} ACTION=getexlist tree_basic LOC=${LOC} 248 -${OMAKE} ACTION=exampleconcepts tree_basic LOC=${LOC} 249 -bin/maint/helpindex.py ${PETSC_DIR} ${LOC} 250 -grep -h Polymorphic include/*.h | grep -v '#define ' | sed "s?PetscPolymorphic[a-zA-Z]*(??g" | cut -f1 -d"{" > tmppoly 251 -bin/maint/processpoly.py ${PETSC_DIR} ${LOC} 252 -${RM} tmppoly 253 254# Builds .html versions of the source 255# html overwrites some stuff created by update-docs - hence this is done later. 256alldoc2: chk_loc 257 -${OMAKE} ACTION=html PETSC_DIR=${PETSC_DIR} alltree LOC=${LOC} 258 -bin/maint/update-docs.py ${PETSC_DIR} ${LOC} 259 260alldocclean: deletemanualpages allcleanhtml 261 262# Deletes man pages (HTML version) 263deletemanualpages: chk_loc 264 -@if [ -d ${LOC} -a -d ${LOC}/docs/manualpages ]; then \ 265 find ${LOC}/docs/manualpages -type f -name "*.html" -exec ${RM} {} \; ;\ 266 ${RM} ${LOC}/docs/exampleconcepts ;\ 267 ${RM} ${LOC}/docs/manconcepts ;\ 268 ${RM} ${LOC}/docs/manualpages/manualpages.cit ;\ 269 bin/maint/update-docs.py ${PETSC_DIR} ${LOC} clean;\ 270 fi 271 272allcleanhtml: 273 -${RM} include/adic/*.h.html 274 -${OMAKE} ACTION=cleanhtml PETSC_DIR=${PETSC_DIR} alltree 275 276chk_concepts_dir: chk_loc 277 @if [ ! -d "${LOC}/docs/manualpages/concepts" ]; then \ 278 echo Making directory ${LOC}/docs/manualpages/concepts for library; ${MKDIR} ${LOC}/docs/manualpages/concepts; fi 279 280########################################################### 281# targets to build distribution and update docs 282########################################################### 283 284# Creates ${HOME}/petsc.tar.gz [and petsc-lite.tar.gz] 285dist: 286 ${PETSC_DIR}/bin/maint/builddist ${PETSC_DIR} 287 288# This target works only if you can do 'ssh petsc@login.mcs.anl.gov' 289# also copy the file over to ftp site. 290web-snapshot: 291 @if [ ! -f "${HOME}/petsc-dev.tar.gz" ]; then \ 292 echo "~/petsc-dev.tar.gz missing! cannot update petsc-dev snapshot on mcs-web-site"; \ 293 else \ 294 echo "updating petsc-dev snapshot on mcs-web-site"; \ 295 tmpdir=`mktemp -d -t petsc-doc.XXXXXXXX`; \ 296 cd $${tmpdir}; tar -xzf ${HOME}/petsc-dev.tar.gz; \ 297 /usr/bin/rsync -e ssh -az --delete $${tmpdir}/petsc-dev/ \ 298 petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/petsc-as/snapshots/petsc-dev ;\ 299 /bin/cp -f /home/petsc/petsc-dev.tar.gz /mcs/ftp/pub/petsc/petsc-dev.tar.gz;\ 300 ${RM} -rf $${tmpdir} ;\ 301 fi 302 303# build the tarfile - and then update petsc-dev snapshot on mcs-web-site 304update-web-snapshot: dist web-snapshot 305 306# This target updates website main pages 307update-web: 308 @cd ${PETSC_DIR}/src/docs; make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} bib2html; \ 309 /usr/bin/rsync -az -C --exclude=BitKeeper --exclude=documentation/installation.html \ 310 ${PETSC_DIR}/src/docs/website/ petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/petsc-as 311 @cd ${PETSC_DIR}/src/docs/tex/manual; make developers.pdf PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} LOC=${PETSC_DIR}; \ 312 /usr/bin/rsync -az developers.pdf petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/petsc-as/developers/ 313 314# 315# builds a single list of files for each PETSc library so they may all be built in parallel 316# without a recursive set of make calls 317createfastbuild: 318 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 319 320########################################################### 321# 322# See script for details 323# 324gcov: 325 -@${PETSC_DIR}/bin/maint/gcov.py -run_gcov 326 327mergegcov: 328 -@${PETSC_DIR}/bin/maint/gcov.py -merge_gcov ${LOC} *.tar.gz 329 330# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28 331allrcslabel: 332 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel alltree 333# 334# The commands below are for generating ADIC versions of the code; 335# they are not currently used. 336# 337alladicignore: 338 -@${RM} ${INSTALL_LIB_DIR}/adicignore 339 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 340 341alladic: 342 -@echo "Beginning to compile ADIC source code in all directories" 343 -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 344 -@echo "=========================================" 345 -@cd include ; \ 346 ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petscsys.h 347 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 348 349alladiclib: 350 -@echo "Beginning to compile ADIC libraries in all directories" 351 -@echo "Using compiler: ${PCC} ${COPTFLAGS}" 352 -@echo "-----------------------------------------" 353 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 354 -@echo "-----------------------------------------" 355 -@echo "Using configuration flags:" 356 -@grep "define " ${PETSC_ARCH}/include/petscconf.h 357 -@echo "-----------------------------------------" 358 -@echo "Using include paths: ${CC_PETSC_INCLUDE}" 359 -@echo "-----------------------------------------" 360 -@echo "Using PETSc directory: ${PETSC_DIR}" 361 -@echo "Using PETSc arch: ${PETSC_ARCH}" 362 -@echo "=========================================" 363 -@${RM} -f ${INSTALL_LIB_DIR}/*adic.${AR_LIB_SUFFIX} 364 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 365 -@cd src/adic/src ; \ 366 ${OMAKE} PETSC_ARCH=${PETSC_ARCH} lib 367 368# ------------------------------------------------------------------------------- 369# 370# Some macros to check if the fortran interface is up-to-date. 371# 372countfortranfunctions: 373 -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 374 cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 375 sed "s/_$$//" | sort > /tmp/countfortranfunctions 376 377countcfunctions: 378 -@grep extern ${PETSC_DIR}/include/*.h | grep "(" | tr -s ' ' | \ 379 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 380 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 381 382difffortranfunctions: countfortranfunctions countcfunctions 383 -@echo -------------- Functions missing in the fortran interface --------------------- 384 -@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 385 -@echo ----------------- Functions missing in the C interface ------------------------ 386 -@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 387 -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 388 389checkbadfortranstubs: 390 -@echo "=========================================" 391 -@echo "Functions with MPI_Comm as an Argument" 392 -@echo "=========================================" 393 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 394 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 395 -@echo "=========================================" 396 -@echo "Functions with a String as an Argument" 397 -@echo "=========================================" 398 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 399 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 400 -@echo "=========================================" 401 -@echo "Functions with Pointers to PETSc Objects as Argument" 402 -@echo "=========================================" 403 -@cd ${PETSC_DIR}/src/fortran/auto; \ 404 _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 405 cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 406 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 407 for OBJ in $$_p_OBJ; do \ 408 grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 409 cut -d'(' -f1 | cut -d' ' -f1,3; \ 410 done 411# 412# Automatically generates PETSc exercises in html from the tutorial examples. 413# 414# The introduction for each section is obtained from docs/manualpages/header_${MANSEC} is under RCS and may be edited 415# (used also in introductions to the manual pages) 416# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited 417# The list of exercises is from TUTORIALS in each directory's makefile 418# 419# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced. 420# The pagemaker rule is in the file conf (at the bottom) 421# 422# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed 423# -@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 424# 425exercises: 426 -@echo "=========================================" 427 -@echo "Generating HTML tutorial exercises" 428 -@${RM} docs/pageform.txt 429 -@echo "title=\"PETSc Exercises\"" > docs/pageform.txt 430 -@echo "access_title=Exercise Sections" >> docs/pageform.txt 431 -@echo "access_format=short" >> docs/pageform.txt 432 -@echo "startpage=../exercises/introduction.htm" >> docs/pageform.txt 433 -@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt 434 -@echo "Generating HTML for individual directories" 435 -@echo "=========================================" 436 -@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree 437 -@echo "Completed HTML for individual directories" 438 -@echo "NONE title=\"<HR>\" " >> docs/pageform.txt; 439 -@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt 440 /home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises 441 -@echo "=========================================" 442 443.PHONY: info info_h all all_build build testexamples testfortran testexamples_uni testfortran_uni ranlib deletelibs allclean update chk_petsc_dir \ 444 alletags etags etags_complete etags_noexamples etags_makefiles etags_examples etags_fexamples alldoc allmanualpages \ 445 allhtml allcleanhtml allci allco allrcslabel alladicignore alladic alladiclib countfortranfunctions \ 446 start_configure configure_petsc configure_clean 447 448getsigs: 449 -@if [ ! -d src/sigs ]; then mkdir -p sigs; fi 450 -@echo ${CC_PETSC_INCLUDE} > sigs/cc_petsc_include 451 -@echo "#include \"petscvec.h\"" > sigs/vec.sigs.h 452 -@grep -h "enum " include/petscsys.h include/petscvec.h >> sigs/vec.sigs.h 453 -@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 454 -@echo "#include \"petscmat.h\"" > sigs/mat.sigs.h 455 -@grep "enum " include/petscmat.h | grep } >> sigs/mat.sigs.h 456 -@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 457 -@echo "#include \"petscpc.h\"" > sigs/pc.sigs.h 458 -@grep "enum " include/petscpc.h | grep } >> sigs/pc.sigs.h 459 -@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 460 -@echo "#include \"petscksp.h\"" > sigs/ksp.sigs.h 461 -@grep "enum " include/petscksp.h | grep } >> sigs/ksp.sigs.h 462 -@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 463 -@echo "#include \"petscsnes.h\"" > sigs/snes.sigs.h 464 -@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 465 466 467 468 469 470 471 472 473 474 475 476petscao : petscmat petscao.f90.h 477petscdm : petscksp petscdm.f90.h 478petscdraw : petsc petscdraw.f90.h 479petscis : petsc petscis.f90.h 480petscksp : petscpc petscksp.f90.h 481petsclog : petsc petsclog.f90.h 482petscmat : petscvec petscmat.f90.h 483petscmg : petscksp petscmg.f90.h 484petscpc : petscmat petscpc.f90.h 485petscsnes : petscksp petscsnes.f90.h 486petscsys : petsc petscsys.f90.h 487petscts : petscsnes petscts.f90.h 488petsc : petsc.f90.h 489petscvec : petscis petscvec.f90.h 490petscviewer : petsc petscviewer.f90.h 491petscmesh : petsc petscmesh.f90.h 492modules : petscao petscdm petscdraw petscis petscksp petsclog petscmat petscmg petscpc petscsnes petscsys petscts petsc petscvec petscviewer petscmesh 493