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