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