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