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