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