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