1# $Id: makefile,v 1.340 2001/03/21 21:21:15 bsmith Exp balay $ 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 Fortran stub files 286allfortranstubs: 287 -@include/foldinclude/generateincludes 288 -@${RM} -f src/fortran/auto/*.c 289 -${OMAKE} ACTION=fortranstubs tree_basic 290 -@cd src/fortran/auto; ${OMAKE} fixfortran 291 chmod g+w src/fortran/auto/*.c 292 293allci: 294 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci alltree 295 296allco: 297 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co alltree 298 299# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28 300allrcslabel: 301 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel alltree 302# 303# The commands below are for generating ADIC versions of the code; 304# they are not currently used. 305# 306alladicignore: 307 -@${RM} ${LDIR}/adicignore 308 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 309 310alladic: 311 -@echo "Beginning to compile ADIC source code in all directories" 312 -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 313 -@echo "=========================================" 314 -@cd include ; \ 315 ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h 316 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 317 -@cd src/inline ; \ 318 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 319 -@cd src/blaslapack ; \ 320 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 321 322alladiclib: 323 -@echo "Beginning to compile ADIC libraries in all directories" 324 -@echo "Using compiler: ${CC} ${COPTFLAGS}" 325 -@echo "-----------------------------------------" 326 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 327 -@echo "-----------------------------------------" 328 -@echo "Using configuration flags:" 329 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 330 -@echo "-----------------------------------------" 331 -@echo "Using include paths: ${PETSC_INCLUDE}" 332 -@echo "-----------------------------------------" 333 -@echo "Using PETSc directory: ${PETSC_DIR}" 334 -@echo "Using PETSc arch: ${PETSC_ARCH}" 335 -@echo "=========================================" 336 -@${RM} -f ${LDIR}/*adic.a 337 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 338 -@cd src/blaslapack ; \ 339 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 340 -@cd src/adic/src ; \ 341 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 342 343# ------------------------------------------------------------------------------- 344# 345# Some macros to check if the fortran interface is up-to-date. 346# 347countfortranfunctions: 348 -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 349 cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 350 sed "s/_$$//" | sort > /tmp/countfortranfunctions 351 352countcfunctions: 353 -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \ 354 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 355 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 356 357difffortranfunctions: countfortranfunctions countcfunctions 358 -@echo -------------- Functions missing in the fortran interface --------------------- 359 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 360 -@echo ----------------- Functions missing in the C interface ------------------------ 361 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 362 -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 363 364checkbadfortranstubs: 365 -@echo "=========================================" 366 -@echo "Functions with MPI_Comm as an Argument" 367 -@echo "=========================================" 368 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 369 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 370 -@echo "=========================================" 371 -@echo "Functions with a String as an Argument" 372 -@echo "=========================================" 373 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 374 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 375 -@echo "=========================================" 376 -@echo "Functions with Pointers to PETSc Objects as Argument" 377 -@echo "=========================================" 378 -@cd ${PETSC_DIR}/src/fortran/auto; \ 379 _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 380 cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 381 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 382 for OBJ in $$_p_OBJ; do \ 383 grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 384 cut -d'(' -f1 | cut -d' ' -f1,3; \ 385 done 386# Builds noise routines (not yet publically available) 387# Note: libfast cannot run on .F files on certain machines, so we 388# use lib and check for errors here. 389noise: info chklib_dir 390 -@echo "Beginning to compile noise routines" 391 -@echo "=========================================" 392 -@cd src/snes/interface/noise; \ 393 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 394 grep -v clog trashz | grep -v "information sections" | \ 395 egrep -i '(Error|warning|Can)' >> /dev/null;\ 396 if [ "$$?" != 1 ]; then \ 397 cat trashz ; fi; ${RM} trashz 398 ${RANLIB} ${LDIR}/libpetscsnes.a 399 -@chmod g+w ${LDIR}/libpetscsnes.a 400 -@echo "Completed compiling noise routines" 401 -@echo "=========================================" 402 403# 404# Automatically generates PETSc exercises in html from the tutorial examples. 405# 406# The introduction for each section is obtained from docs/manualpages/bop.${MANSEC} is under RCS and may be edited 407# (used also in introductions to the manual pages) 408# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited 409# The list of exercises is from TUTORIALS in each directory's makefile 410# 411# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced. 412# The pagemaker rule is in the file bmake/common (at the bottom) 413# 414# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed 415# -@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 416# 417exercises: 418 -@echo "=========================================" 419 -@echo "Generating HTML tutorial exercises" 420 -@rm -f docs/pageform.txt 421 -@echo "title=\"PETSc Exercises\"" > docs/pageform.txt 422 -@echo "access_title=Exercise Sections" >> docs/pageform.txt 423 -@echo "access_format=short" >> docs/pageform.txt 424 -@echo "startpage=../exercises/introduction.htm" >> docs/pageform.txt 425 -@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt 426 -@echo "Generating HTML for individual directories" 427 -@echo "=========================================" 428 -@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree 429 -@echo "Completed HTML for individual directories" 430 -@echo "NONE title=\"<HR>\" " >> docs/pageform.txt; 431 -@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt 432 /home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises 433 -@echo "=========================================" 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450