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