1# $Id: makefile,v 1.335 2001/02/26 04:46:36 bsmith Exp bsmith $ 2# 3# This is the makefile for installing PETSc. See the file 4# docs/installation.html for directions on installing PETSc. 5# See also bmake/common for additional commands. 6# 7ALL: all 8 9DIRS = src include docs 10 11include ${PETSC_DIR}/bmake/${PETSC_ARCH}/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 : info info_h chklib_dir deletelibs build shared 18# 19# Prints information about the system and version of PETSc being compiled 20# 21info: 22 -@echo "==========================================" 23 -@echo " " 24 -@echo "See docs/troubleshooting.html and docs/bugreporting.html" 25 -@echo "for help with installation problems. Please send EVERYTHING" 26 -@echo "printed out below when reporting problems" 27 -@echo " " 28 -@echo "To subscribe to the PETSc users mailing list, send mail to " 29 -@echo "majordomo@mcs.anl.gov with the message: " 30 -@echo "subscribe petsc-users" 31 -@echo " " 32 -@echo "==========================================" 33 -@echo On `date` on `hostname` 34 -@echo Machine characteristics: `uname -a` 35 -@echo "-----------------------------------------" 36 -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS}" 37 -@if [ -n "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 38 echo "C Compiler version:" ; ${C_CCV} ; fi 39 -@if [ -n "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 40 echo "C++ Compiler version:" ; ${CXX_CCV} ; fi 41 -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" 42 -@if [ -n "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 43 echo "Fortran Compiler version:" ; ${C_FCV} ; fi 44 -@echo "-----------------------------------------" 45 -@grep PETSC_VERSION_NUMBER ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//" 46 -@echo "-----------------------------------------" 47 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 48 -@echo "-----------------------------------------" 49 -@echo "Using configuration flags:" 50 -@grep "define " ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscconf.h 51 -@echo "-----------------------------------------" 52 -@echo "Using include paths: ${PETSC_INCLUDE}" 53 -@echo "-----------------------------------------" 54 -@echo "Using PETSc directory: ${PETSC_DIR}" 55 -@echo "Using PETSc arch: ${PETSC_ARCH}" 56 -@echo "------------------------------------------" 57 -@echo "Using C linker: ${CLINKER}" 58 -@echo "Using Fortran linker: ${FLINKER}" 59 -@echo "Using libraries: ${PETSC_LIB}" 60 -@echo "==========================================" 61# 62# 63MINFO = ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscmachineinfo.h 64info_h: 65 -@$(RM) -f MINFO ${MINFO} 66 -@echo "static char *petscmachineinfo = \" " >> MINFO 67 -@echo "Libraries compiled on `date` on `hostname` " >> MINFO 68 -@echo Machine characteristics: `uname -a` "" >> MINFO 69 -@echo "Using PETSc directory: ${PETSC_DIR}" >> MINFO 70 -@echo "Using PETSc arch: ${PETSC_ARCH}" >> MINFO 71 -@echo "-----------------------------------------" >> MINFO 72 -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS} " >> MINFO 73 -@if [ "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 74 echo "C Compiler version:" >> MINFO ; ${C_CCV} >> MINFO 2>&1; fi 75 -@if [ "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 76 echo "C++ Compiler version:" >> MINFO; ${CXX_CCV} >> MINFO 2>&1 ; fi 77 -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" >> MINFO 78 -@if [ "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 79 echo "Fortran Compiler version:" >> MINFO ; ${C_FCV} >> MINFO 2>&1 ; fi 80 -@echo "-----------------------------------------" >> MINFO 81 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" >> MINFO 82 -@echo "-----------------------------------------" >> MINFO 83 -@echo "Using configuration flags:" >> MINFO 84 -@echo "-----------------------------------------" >> MINFO 85 -@echo "Using include paths: ${PETSC_INCLUDE}" >> MINFO 86 -@echo "------------------------------------------" >> MINFO 87 -@echo "Using C linker: ${CLINKER}" >> MINFO 88 -@echo "Using Fortran linker: ${FLINKER}" >> MINFO 89 -@cat MINFO | ${SED} -e 's/$$/ \\n\\/' > ${MINFO} 90 -@echo "Using libraries: ${PETSC_LIB} \"; " >> ${MINFO} 91 -@chmod g+w ${MINFO} 92 -@$(RM) MINFO 93# 94# Builds the PETSc libraries 95# This target also builds fortran77 and f90 interface 96# files and compiles .F files 97# 98build: 99 -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 100 -@echo "=========================================" 101 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=libfast tree 102 ${RANLIB} ${LDIR}/*.a 103 -@chmod g+w ${LDIR}/*.a 104 -@echo "Completed building libraries" 105 -@echo "=========================================" 106# 107# 108# 109petscblas: info chklib_dir 110 -${RM} -f ${LDIR}/libpetscblas.* 111 -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 112 -@echo "=========================================" 113 -@cd src/blaslapack/c; \ 114 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=libfast tree 115 ${RANLIB} ${LDIR}/libpetscblas.a 116 -@chmod g+w ${LDIR}/*.a 117 -@echo "Completed compiling C version of BLAS and LAPACK" 118 -@echo "=========================================" 119# 120# Builds PETSc test examples for a given BOPT and architecture 121# 122testexamples: info chkopts 123 -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 124 -@echo "Due to different numerical round-off on certain" 125 -@echo "machines some of the numbers may not match exactly." 126 -@echo "=========================================" 127 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_1 tree 128 -@echo "Completed compiling and running test examples" 129 -@echo "=========================================" 130testfortran: info chkopts 131 -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 132 -@echo "=========================================" 133 -@echo "Due to different numerical round-off on certain" 134 -@echo "machines or the way Fortran formats numbers" 135 -@echo "some of the results may not match exactly." 136 -@echo "=========================================" 137 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_3 tree 138 -@echo "Completed compiling and running Fortran test examples" 139 -@echo "=========================================" 140testexamples_uni: info chkopts 141 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 142 -@echo "Due to different numerical round-off on certain" 143 -@echo "machines some of the numbers may not match exactly." 144 -@echo "=========================================" 145 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_4 tree 146 -@echo "Completed compiling and running uniprocessor test examples" 147 -@echo "=========================================" 148testfortran_uni: info chkopts 149 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 150 -@echo "Due to different numerical round-off on certain" 151 -@echo "machines some of the numbers may not match exactly." 152 -@echo "=========================================" 153 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_9 tree 154 -@echo "Completed compiling and running uniprocessor fortran test examples" 155 -@echo "=========================================" 156 157# Ranlib on the libraries 158ranlib: 159 ${RANLIB} ${LDIR}/*.a 160 161# Deletes PETSc libraries 162deletelibs: chkopts_basic 163 -${RM} -f ${LDIR}/* 164 165 166# ------------------------------------------------------------------ 167# 168# All remaining actions are intended for PETSc developers only. 169# PETSc users should not generally need to use these commands. 170# 171 172# To access the tags in EMACS, type M-x visit-tags-table and specify 173# the file petsc/TAGS. 174# 1) To move to where a PETSc function is defined, enter M-. and the 175# function name. 176# 2) To search for a string and move to the first occurrence, 177# use M-x tags-search and the string. 178# To locate later occurrences, use M-, 179# Builds all etags files 180alletags: 181 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags 182 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete 183 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples 184 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples 185 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles 186# Builds the basic etags file. This should be employed by most users. 187etags: 188 -${RM} ${TAGSDIR}/TAGS 189 -touch ${TAGSDIR}/TAGS 190 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree 191 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcej alltree 192 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree 193 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree 194 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree 195 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree 196 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree 197 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree 198 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree 199 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles 200 -chmod g+w TAGS 201# Builds complete etags list; only for PETSc developers. 202etags_complete: 203 -${RM} ${TAGSDIR}/TAGS_COMPLETE 204 -touch ${TAGSDIR}/TAGS_COMPLETE 205 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree 206 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcej alltree 207 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree 208 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree 209 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree 210 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree 211 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree 212 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree 213 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree 214 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles 215 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree 216 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree 217 -chmod g+w TAGS_COMPLETE 218# Builds the etags file that excludes the examples directories 219etags_noexamples: 220 -${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES 221 -touch ${TAGSDIR}/TAGS_NO_EXAMPLES 222 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree 223 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcej alltree 224 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree 225 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree 226 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree 227 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles 228 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree 229 -chmod g+w TAGS_NO_EXAMPLES 230# Builds the etags file for makefiles 231etags_makefiles: 232 -${RM} ${TAGSDIR}/TAGS_MAKEFILES 233 -touch ${TAGSDIR}/TAGS_MAKEFILES 234 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree 235 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles 236 -chmod g+w TAGS_MAKEFILES 237# Builds the etags file for examples 238etags_examples: 239 -${RM} ${TAGSDIR}/TAGS_EXAMPLES 240 -touch ${TAGSDIR}/TAGS_EXAMPLES 241 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree 242 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree 243 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree 244 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 245 -chmod g+w TAGS_EXAMPLES 246etags_fexamples: 247 -${RM} ${TAGSDIR}/TAGS_FEXAMPLES 248 -touch ${TAGSDIR}/TAGS_FEXAMPLES 249 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree 250 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 251 -chmod g+w TAGS_FEXAMPLES 252# 253# These are here for the target allci and allco, and etags 254# 255 256BMAKEFILES = bmake/common* bmake/*/base bmake/*/base_variables bmake/*/base.site \ 257 bmake/*/petscconf.h bmake/*/petscfix.h bmake/win32/makefile.dos bmake/config/*.in \ 258 bmake/*/buildtest 259DOCS = bmake/readme bmake/petscconf.defs 260SCRIPTS = maint/addlinks maint/builddist maint/buildlinks maint/wwwman \ 261 maint/xclude maint/crontab \ 262 maint/autoftp include/foldinclude/generateincludes 263 264updatewebdocs: 265 -chmod -R ug+w /mcs/tmp/petsc-tmp 266 -chgrp -R petsc /mcs/tmp/petsc-tmp 267 -/bin/rm -rf /mcs/tmp/petscdocs 268 -/bin/cp -r /mcs/tmp/petsc-tmp/docs /mcs/tmp/petscdocs 269 -maint/update-docs.py /mcs/tmp/petscdocs 270 -find /mcs/tmp/petscdocs -type d -name "*" -exec chmod g+w {} \; 271 -/bin/cp -r /mcs/tmp/petscdocs/* ${PETSC_DIR}/docs 272 -/bin/rm -rf /mcs/tmp/petscdocs 273 274# Builds all the documentation - should be done every night 275alldoc: allmanualpages 276 cd docs/tex/manual; ${OMAKE} manual.dvi manual.ps manual.html splitmanual.html 277 278# Deletes man pages (HTML version) 279deletemanualpages: 280 ${RM} -f ${PETSC_DIR}/docs/manualpages/*/*.html \ 281 ${PETSC_DIR}/docs/manualpages/manualpages.cit 282 283# Builds all versions of the man pages 284allmanualpages: deletemanualpages 285 -${OMAKE} ACTION=manualpages_buildcite tree_basic 286 -${OMAKE} ACTION=manualpages tree_basic 287 -maint/wwwindex.py ${PETSC_DIR} 288 -${OMAKE} ACTION=manexamples tree 289 -${OMAKE} manconcepts 290 -${OMAKE} ACTION=exampleconcepts tree 291 -maint/helpindex.py 292 -@chmod g+w docs/manualpages/*/*.html 293 294# Builds Fortran stub files 295allfortranstubs: 296 -@include/foldinclude/generateincludes 297 -@${RM} -f src/fortran/auto/*.c 298 -${OMAKE} ACTION=fortranstubs tree_basic 299 -@cd src/fortran/auto; ${OMAKE} fixfortran 300 chmod g+w src/fortran/auto/*.c 301 302allci: 303 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci alltree 304 305allco: 306 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co alltree 307 308# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28 309allrcslabel: 310 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel alltree 311# 312# The commands below are for generating ADIC versions of the code; 313# they are not currently used. 314# 315alladicignore: 316 -@${RM} ${LDIR}/adicignore 317 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 318 319alladic: 320 -@echo "Beginning to compile ADIC source code in all directories" 321 -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 322 -@echo "=========================================" 323 -@cd include ; \ 324 ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h 325 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 326 -@cd src/inline ; \ 327 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 328 -@cd src/blaslapack ; \ 329 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 330 331alladiclib: 332 -@echo "Beginning to compile ADIC libraries in all directories" 333 -@echo "Using compiler: ${CC} ${COPTFLAGS}" 334 -@echo "-----------------------------------------" 335 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 336 -@echo "-----------------------------------------" 337 -@echo "Using configuration flags:" 338 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 339 -@echo "-----------------------------------------" 340 -@echo "Using include paths: ${PETSC_INCLUDE}" 341 -@echo "-----------------------------------------" 342 -@echo "Using PETSc directory: ${PETSC_DIR}" 343 -@echo "Using PETSc arch: ${PETSC_ARCH}" 344 -@echo "=========================================" 345 -@${RM} -f ${LDIR}/*adic.a 346 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 347 -@cd src/blaslapack ; \ 348 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 349 -@cd src/adic/src ; \ 350 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 351 352# ------------------------------------------------------------------------------- 353# 354# Some macros to check if the fortran interface is up-to-date. 355# 356countfortranfunctions: 357 -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 358 cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 359 sed "s/_$$//" | sort > /tmp/countfortranfunctions 360 361countcfunctions: 362 -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \ 363 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 364 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 365 366difffortranfunctions: countfortranfunctions countcfunctions 367 -@echo -------------- Functions missing in the fortran interface --------------------- 368 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 369 -@echo ----------------- Functions missing in the C interface ------------------------ 370 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 371 -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 372 373checkbadfortranstubs: 374 -@echo "=========================================" 375 -@echo "Functions with MPI_Comm as an Argument" 376 -@echo "=========================================" 377 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 378 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 379 -@echo "=========================================" 380 -@echo "Functions with a String as an Argument" 381 -@echo "=========================================" 382 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 383 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 384 -@echo "=========================================" 385 -@echo "Functions with Pointers to PETSc Objects as Argument" 386 -@echo "=========================================" 387 -@cd ${PETSC_DIR}/src/fortran/auto; \ 388 _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 389 cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 390 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 391 for OBJ in $$_p_OBJ; do \ 392 grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 393 cut -d'(' -f1 | cut -d' ' -f1,3; \ 394 done 395# Builds noise routines (not yet publically available) 396# Note: libfast cannot run on .F files on certain machines, so we 397# use lib and check for errors here. 398noise: info chklib_dir 399 -@echo "Beginning to compile noise routines" 400 -@echo "=========================================" 401 -@cd src/snes/interface/noise; \ 402 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 403 grep -v clog trashz | grep -v "information sections" | \ 404 egrep -i '(Error|warning|Can)' >> /dev/null;\ 405 if [ "$$?" != 1 ]; then \ 406 cat trashz ; fi; ${RM} trashz 407 ${RANLIB} ${LDIR}/libpetscsnes.a 408 -@chmod g+w ${LDIR}/libpetscsnes.a 409 -@echo "Completed compiling noise routines" 410 -@echo "=========================================" 411 412# 413# Automatically generates PETSc exercises in html from the tutorial examples. 414# 415# The introduction for each section is obtained from docs/manualpages/bop.${MANSEC} is under RCS and may be edited 416# (used also in introductions to the manual pages) 417# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited 418# The list of exercises is from TUTORIALS in each directory's makefile 419# 420# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced. 421# The pagemaker rule is in the file bmake/common (at the bottom) 422# 423# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed 424# -@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 425# 426exercises: 427 -@echo "=========================================" 428 -@echo "Generating HTML tutorial exercises" 429 -@rm -f docs/pageform.txt 430 -@echo "title=\"PETSc Exercises\"" > docs/pageform.txt 431 -@echo "access_title=Exercise Sections" >> docs/pageform.txt 432 -@echo "access_format=short" >> docs/pageform.txt 433 -@echo "startpage=../exercises/introduction.htm" >> docs/pageform.txt 434 -@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt 435 -@echo "Generating HTML for individual directories" 436 -@echo "=========================================" 437 -@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree 438 -@echo "Completed HTML for individual directories" 439 -@echo "NONE title=\"<HR>\" " >> docs/pageform.txt; 440 -@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt 441 /home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises 442 -@echo "=========================================" 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459