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: |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# ------------------------------------------------------------------ 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 alldoc3 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 -cd src/docs/tex/manual; ${OMAKE} developers.pdf LOC=${LOC} 244 -${OMAKE} ACTION=manualpages tree_basic LOC=${LOC} 245 -bin/maint/wwwindex.py ${PETSC_DIR} ${LOC} 246 -${OMAKE} ACTION=manexamples tree_basic LOC=${LOC} 247 -${OMAKE} manconcepts LOC=${LOC} 248 -${OMAKE} ACTION=getexlist tree_basic LOC=${LOC} 249 -${OMAKE} ACTION=exampleconcepts tree_basic LOC=${LOC} 250 -bin/maint/helpindex.py ${PETSC_DIR} ${LOC} 251 -grep -h Polymorphic include/*.h | grep -v '#define ' | sed "s?PetscPolymorphic[a-zA-Z]*(??g" | cut -f1 -d"{" > tmppoly 252 -bin/maint/processpoly.py ${PETSC_DIR} ${LOC} 253 -${RM} tmppoly 254 255# Builds .html versions of the source 256# html overwrites some stuff created by update-docs - hence this is done later. 257alldoc2: chk_loc 258 -${OMAKE} ACTION=html PETSC_DIR=${PETSC_DIR} alltree LOC=${LOC} 259 -bin/maint/update-docs.py ${PETSC_DIR} ${LOC} 260# 261# Builds HTML versions of Matlab scripts 262alldoc3: chk_loc 263 if [ "${MATLAB_COMMAND}" != "" ]; then\ 264 export MATLABPATH=${MATLABPATH}:${PETSC_DIR}/bin/matlab; \ 265 cd ${PETSC_DIR}/bin/matlab; ${MATLAB_COMMAND} -nodisplay -nodesktop -r "generatehtml;exit" ; \ 266 cd classes; ${MATLAB_COMMAND} -nodisplay -nodesktop -r "generatehtml;exit" ; \ 267 cd examples/tutorials; ${MATLAB_COMMAND} -nodisplay -nodesktop -r "generatehtml;exit" ; \ 268 fi 269 270alldocclean: deletemanualpages allcleanhtml 271 272# Deletes man pages (HTML version) 273deletemanualpages: chk_loc 274 -@if [ -d ${LOC} -a -d ${LOC}/docs/manualpages ]; then \ 275 find ${LOC}/docs/manualpages -type f -name "*.html" -exec ${RM} {} \; ;\ 276 ${RM} ${LOC}/docs/exampleconcepts ;\ 277 ${RM} ${LOC}/docs/manconcepts ;\ 278 ${RM} ${LOC}/docs/manualpages/manualpages.cit ;\ 279 bin/maint/update-docs.py ${PETSC_DIR} ${LOC} clean;\ 280 fi 281 282allcleanhtml: 283 -${RM} include/adic/*.h.html 284 -${OMAKE} ACTION=cleanhtml PETSC_DIR=${PETSC_DIR} alltree 285 286chk_concepts_dir: chk_loc 287 @if [ ! -d "${LOC}/docs/manualpages/concepts" ]; then \ 288 echo Making directory ${LOC}/docs/manualpages/concepts for library; ${MKDIR} ${LOC}/docs/manualpages/concepts; fi 289 290########################################################### 291# targets to build distribution and update docs 292########################################################### 293 294# Creates ${HOME}/petsc.tar.gz [and petsc-lite.tar.gz] 295dist: 296 ${PETSC_DIR}/bin/maint/builddist ${PETSC_DIR} 297 298# This target works only if you can do 'ssh petsc@login.mcs.anl.gov' 299# also copy the file over to ftp site. 300web-snapshot: 301 @if [ ! -f "${HOME}/petsc-dev.tar.gz" ]; then \ 302 echo "~/petsc-dev.tar.gz missing! cannot update petsc-dev snapshot on mcs-web-site"; \ 303 else \ 304 echo "updating petsc-dev snapshot on mcs-web-site"; \ 305 tmpdir=`mktemp -d -t petsc-doc.XXXXXXXX`; \ 306 cd $${tmpdir}; tar -xzf ${HOME}/petsc-dev.tar.gz; \ 307 /usr/bin/rsync -e ssh -az --delete $${tmpdir}/petsc-dev/ \ 308 petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/petsc-as/snapshots/petsc-dev ;\ 309 /bin/cp -f /home/petsc/petsc-dev.tar.gz /mcs/ftp/pub/petsc/petsc-dev.tar.gz;\ 310 ${RM} -rf $${tmpdir} ;\ 311 fi 312 313# build the tarfile - and then update petsc-dev snapshot on mcs-web-site 314update-web-snapshot: dist web-snapshot 315 316# This target updates website main pages 317update-web: 318 @cd ${PETSC_DIR}/src/docs; make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} bib2html; \ 319 /usr/bin/rsync -az -C --exclude=BitKeeper --exclude=documentation/installation.html \ 320 ${PETSC_DIR}/src/docs/website/ petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/petsc-as 321 @cd ${PETSC_DIR}/docs; /usr/bin/rsync -az developers.pdf petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/petsc-as/developers/ 322 323# 324# builds a single list of files for each PETSc library so they may all be built in parallel 325# without a recursive set of make calls 326createfastbuild: 327 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 328 329########################################################### 330# 331# See script for details 332# 333gcov: 334 -@${PETSC_DIR}/bin/maint/gcov.py -run_gcov 335 336mergegcov: 337 -@${PETSC_DIR}/bin/maint/gcov.py -merge_gcov ${LOC} *.tar.gz 338 339# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28 340allrcslabel: 341 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel alltree 342# 343# The commands below are for generating ADIC versions of the code; 344# they are not currently used. 345# 346alladicignore: 347 -@${RM} ${INSTALL_LIB_DIR}/adicignore 348 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 349 350alladic: 351 -@echo "Beginning to compile ADIC source code in all directories" 352 -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 353 -@echo "=========================================" 354 -@cd include ; \ 355 ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petscsys.h 356 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 357 358alladiclib: 359 -@echo "Beginning to compile ADIC libraries in all directories" 360 -@echo "Using compiler: ${PCC} ${COPTFLAGS}" 361 -@echo "-----------------------------------------" 362 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 363 -@echo "-----------------------------------------" 364 -@echo "Using configuration flags:" 365 -@grep "define " ${PETSC_ARCH}/include/petscconf.h 366 -@echo "-----------------------------------------" 367 -@echo "Using include paths: ${CC_PETSC_INCLUDE}" 368 -@echo "-----------------------------------------" 369 -@echo "Using PETSc directory: ${PETSC_DIR}" 370 -@echo "Using PETSc arch: ${PETSC_ARCH}" 371 -@echo "=========================================" 372 -@${RM} -f ${INSTALL_LIB_DIR}/*adic.${AR_LIB_SUFFIX} 373 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 374 -@cd src/adic/src ; \ 375 ${OMAKE} PETSC_ARCH=${PETSC_ARCH} lib 376 377# ------------------------------------------------------------------------------- 378# 379# Some macros to check if the fortran interface is up-to-date. 380# 381countfortranfunctions: 382 -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 383 cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 384 sed "s/_$$//" | sort > /tmp/countfortranfunctions 385 386countcfunctions: 387 -@grep extern ${PETSC_DIR}/include/*.h | grep "(" | tr -s ' ' | \ 388 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 389 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 390 391difffortranfunctions: countfortranfunctions countcfunctions 392 -@echo -------------- Functions missing in the fortran interface --------------------- 393 -@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 394 -@echo ----------------- Functions missing in the C interface ------------------------ 395 -@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 396 -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 397 398checkbadfortranstubs: 399 -@echo "=========================================" 400 -@echo "Functions with MPI_Comm as an Argument" 401 -@echo "=========================================" 402 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 403 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 404 -@echo "=========================================" 405 -@echo "Functions with a String as an Argument" 406 -@echo "=========================================" 407 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 408 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 409 -@echo "=========================================" 410 -@echo "Functions with Pointers to PETSc Objects as Argument" 411 -@echo "=========================================" 412 -@cd ${PETSC_DIR}/src/fortran/auto; \ 413 _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 414 cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 415 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 416 for OBJ in $$_p_OBJ; do \ 417 grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 418 cut -d'(' -f1 | cut -d' ' -f1,3; \ 419 done 420# 421# Automatically generates PETSc exercises in html from the tutorial examples. 422# 423# The introduction for each section is obtained from docs/manualpages/header_${MANSEC} is under RCS and may be edited 424# (used also in introductions to the manual pages) 425# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited 426# The list of exercises is from TUTORIALS in each directory's makefile 427# 428# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced. 429# The pagemaker rule is in the file conf (at the bottom) 430# 431# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed 432# -@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 433# 434exercises: 435 -@echo "=========================================" 436 -@echo "Generating HTML tutorial exercises" 437 -@${RM} docs/pageform.txt 438 -@echo "title=\"PETSc Exercises\"" > docs/pageform.txt 439 -@echo "access_title=Exercise Sections" >> docs/pageform.txt 440 -@echo "access_format=short" >> docs/pageform.txt 441 -@echo "startpage=../exercises/introduction.htm" >> docs/pageform.txt 442 -@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt 443 -@echo "Generating HTML for individual directories" 444 -@echo "=========================================" 445 -@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree 446 -@echo "Completed HTML for individual directories" 447 -@echo "NONE title=\"<HR>\" " >> docs/pageform.txt; 448 -@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt 449 /home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises 450 -@echo "=========================================" 451 452.PHONY: info info_h all all_build build testexamples testfortran testexamples_uni testfortran_uni ranlib deletelibs allclean update chk_petsc_dir \ 453 alletags etags etags_complete etags_noexamples etags_makefiles etags_examples etags_fexamples alldoc allmanualpages \ 454 allhtml allcleanhtml allci allco allrcslabel alladicignore alladic alladiclib countfortranfunctions \ 455 start_configure configure_petsc configure_clean 456 457petscao : petscmat petscao.f90.h 458petscdm : petscksp petscdm.f90.h 459petscdraw : petsc petscdraw.f90.h 460petscis : petsc petscis.f90.h 461petscksp : petscpc petscksp.f90.h 462petsclog : petsc petsclog.f90.h 463petscmat : petscvec petscmat.f90.h 464petscmg : petscksp petscmg.f90.h 465petscpc : petscmat petscpc.f90.h 466petscsnes : petscksp petscsnes.f90.h 467petscsys : petsc petscsys.f90.h 468petscts : petscsnes petscts.f90.h 469petsc : petsc.f90.h 470petscvec : petscis petscvec.f90.h 471petscviewer : petsc petscviewer.f90.h 472petscmesh : petsc petscmesh.f90.h 473modules : petscao petscdm petscdraw petscis petscksp petsclog petscmat petscmg petscpc petscsnes petscsys petscts petsc petscvec petscviewer petscmesh 474