1# $Id: makefile,v 1.178 1997/08/13 22:21:12 bsmith Exp bsmith $ 2# 3# This is the makefile for installing PETSc. See the file 4# Installation for directions on installing PETSc. 5# See also bmake/common for additional commands. 6# 7 8CFLAGS = 9SOURCEC = 10SOURCEF = 11DOCS = Changes Machines Readme maint/addlinks \ 12 maint/builddist FAQ Installation BugReporting\ 13 maint/buildlinks maint/wwwman maint/xclude maint/crontab\ 14 bmake/common bmake/*/base* maint/autoftp docs/www/sec/* \ 15 include/finclude/generateincludes bin/petscviewinfo.text \ 16 bin/petscoptsinfo.text 17OBJSC = 18OBJSF = 19LIBBASE = libpetscvec 20DIRS = src include docs 21 22include $(PETSC_DIR)/bmake/$(PETSC_ARCH)/base 23 24# Builds PETSc libraries for a given BOPT and architecture 25all: chkpetsc_dir 26 -$(RM) -f $(PDIR)/* 27 -@echo "Beginning to compile libraries in all directories" 28 -@echo On `date` on `hostname` 29 -@echo Machine characteristics `uname -a` 30 -@echo "Using compiler: $(CC) $(COPTFLAGS)" 31 -@echo "-----------------------------------------" 32 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 33 -@echo "-----------------------------------------" 34 -@echo "Using configuration flags: $(CONF)" 35 -@echo "-----------------------------------------" 36 -@echo "Using include paths: $(PETSC_INCLUDE)" 37 -@echo "-----------------------------------------" 38 -@echo "Using PETSc directory: $(PETSC_DIR)" 39 -@echo "Using PETSc arch: $(PETSC_ARCH)" 40 -@echo "=========================================" 41 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 42 ACTION=libfast tree 43 -@cd $(PETSC_DIR)/src/sys/src ; \ 44 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) rs6000_time 45 $(RANLIB) $(PDIR)/*.a 46 -@chmod g+w $(PDIR)/*.a 47 -@echo "Completed building libraries" 48 -@echo "=========================================" 49 50# Builds PETSc test examples for a given BOPT and architecture 51testexamples: chkopts 52 -@echo "Beginning to compile and run test examples" 53 -@echo On `date` on `hostname` 54 -@echo "Using compiler: $(CC) $(COPTFLAGS)" 55 -@echo "-----------------------------------------" 56 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 57 -@echo "-----------------------------------------" 58 -@echo "Using include paths: $(PETSC_INCLUDE)" 59 -@echo "-----------------------------------------" 60 -@echo "Using PETSc directory: $(PETSC_DIR)" 61 -@echo "Using PETSc arch: $(PETSC_ARCH)" 62 -@echo "------------------------------------------" 63 -@echo "Using linker: $(CLINKER)" 64 -@echo "Using libraries: $(PETSC_LIB)" 65 -@echo "------------------------------------------" 66 -@echo "Due to different numerical round-off on certain" 67 -@echo "machines some of the numbers may not match exactly." 68 -@echo "=========================================" 69 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 70 ACTION=testexamples_1 tree 71 -@echo "Completed compiling and running test examples" 72 -@echo "=========================================" 73 74# Builds PETSc test examples for a given BOPT and architecture 75testexamples_uni: chkopts 76 -@echo "Beginning to compile and run uniprocessor test examples" 77 -@echo On `date` on `hostname` 78 -@echo "Using compiler: $(CC) $(COPTFLAGS)" 79 -@echo "Using linker: $(CLINKER)" 80 -@echo "------------------------------------------" 81 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 82 -@echo "------------------------------------------" 83 -@echo "Using include paths: $(PETSC_INCLUDE)" 84 -@echo "------------------------------------------" 85 -@echo "Using PETSc directory: $(PETSC_DIR)" 86 -@echo "Using PETSc arch: $(PETSC_ARCH)" 87 -@echo "------------------------------------------" 88 -@echo "Using linker: $(CLINKER)" 89 -@echo "Using libraries: $(PETSC_LIB)" 90 -@echo "------------------------------------------" 91 -@echo "Due to different numerical round-off on certain" 92 -@echo "machines some of the numbers may not match exactly." 93 -@echo "=========================================" 94 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 95 ACTION=testexamples_4 tree 96 -@echo "Completed compiling and running uniprocessor test examples" 97 -@echo "=========================================" 98 99# 100# Builds PETSc Fortran interface libary 101# Note: libfast cannot run on .F files on certain machines, so we 102# use lib and check for errors here. 103fortran: chkpetsc_dir 104 -$(RM) -f $(PDIR)/libpetscfortran.* 105 -@echo "Beginning to compile Fortran interface library" 106 -@echo On `date` on `hostname` 107 -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 108 -@echo "Using C/C++ compiler: $(CC) $(COPTFLAGS)" 109 -@echo "------------------------------------------" 110 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 111 -@echo "------------------------------------------" 112 -@echo "Using configuration flags: $(CONF)" 113 -@echo "------------------------------------------" 114 -@echo "Using include paths: $(PETSC_INCLUDE)" 115 -@echo "------------------------------------------" 116 -@echo "Using PETSc directory: $(PETSC_DIR)" 117 -@echo "Using PETSc arch: $(PETSC_ARCH)" 118 -@echo "=========================================" 119 -@cd src/fortran/custom; \ 120 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 121 grep -v clog trashz | grep -v "information sections" | \ 122 egrep -i '(Error|warning|Can)' >> /dev/null;\ 123 if [ "$$?" != 1 ]; then \ 124 cat trashz ; fi; $(RM) trashz 125 -@cd src/fortran/auto; \ 126 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) libfast 127 $(RANLIB) $(PDIR)/libpetscfortran.a 128 -@chmod g+w $(PDIR)/*.a 129 -@echo "Completed compiling Fortran interface library" 130 -@echo "=========================================" 131 132# Builds PETSc test examples for a given BOPT and architecture 133testfortran: chkopts 134 -@echo "Beginning to compile and run Fortran test examples" 135 -@echo On `date` on `hostname` 136 -@echo "Using compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 137 -@echo "Using linker: $(FLINKER)" 138 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 139 -@echo "------------------------------------------" 140 -@echo "Using PETSc directory: $(PETSC_DIR)" 141 -@echo "Using PETSc arch: $(PETSC_ARCH)" 142 -@echo "------------------------------------------" 143 -@echo "Using linker: $(FLINKER)" 144 -@echo "Using libraries: $(PETSC_FORTRAN_LIB) $(PETSC_LIB)" 145 -@echo "=========================================" 146 -@echo "Due to different numerical round-off on certain" 147 -@echo "machines or the way Fortran formats numbers" 148 -@echo "some of the results may not match exactly." 149 -@echo "=========================================" 150 -@echo "On some machines you may get messages of the form" 151 -@echo "PetscScalarAddressToFortran:C and Fortran arrays are" 152 -@echo "not commonly aligned or are too far apart to be indexed" 153 -@echo "by an integer. Locations: C xxxc Fortran xxxf" 154 -@echo "Locations/sizeof(Scalar): C yyc Fortran yyf" 155 -@echo "This indicates that you may not be able to use the" 156 -@echo "PETSc routines VecGetArray() and MatGetArray() from Fortran" 157 -@echo "=========================================" 158 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 159 ACTION=testexamples_3 tree 160 -@echo "Completed compiling and running Fortran test examples" 161 -@echo "=========================================" 162 163# 164# Builds PETSc Fortran90 interface libary 165# Note: libfast cannot run on .F files on certain machines, so we 166# use lib and check for errors here. 167# Note: F90 interface currently only supported in NAG F90 compiler 168fortran90: chkpetsc_dir fortran 169 -@echo "Beginning to compile Fortran90 interface library" 170 -@echo On `date` on `hostname` 171 -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 172 -@echo "Using C/C++ compiler: $(CC) $(COPTFLAGS)" 173 -@echo "------------------------------------------" 174 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 175 -@echo "------------------------------------------" 176 -@echo "Using configuration flags: $(CONF)" 177 -@echo "------------------------------------------" 178 -@echo "Using include paths: $(PETSC_INCLUDE)" 179 -@echo "------------------------------------------" 180 -@echo "Using PETSc directory: $(PETSC_DIR)" 181 -@echo "Using PETSc arch: $(PETSC_ARCH)" 182 -@echo "=========================================" 183 -@cd src/fortran/f90; \ 184 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 185 grep -v clog trashz | grep -v "information sections" | \ 186 egrep -i '(Error|warning|Can)' >> /dev/null;\ 187 if [ "$$?" != 1 ]; then \ 188 cat trashz ; fi; $(RM) trashz 189 $(RANLIB) $(PDIR)/libpetscfortran.a 190 -@chmod g+w $(PDIR)/*.a 191 -@echo "Completed compiling Fortran90 interface library" 192 -@echo "=========================================" 193 194# Builds noise routines (not yet publically available) 195# Note: libfast cannot run on .F files on certain machines, so we 196# use lib and check for errors here. 197noise: chkpetsc_dir 198 -@echo "Beginning to compile noise routines" 199 -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 200 -@echo "Using C/C++ compiler: $(CC) $(COPTFLAGS)" 201 -@echo "------------------------------------------" 202 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 203 -@echo "------------------------------------------" 204 -@echo "Using configuration flags: $(CONF)" 205 -@echo "------------------------------------------" 206 -@echo "Using include paths: $(PETSC_INCLUDE)" 207 -@echo "------------------------------------------" 208 -@echo "Using PETSc directory: $(PETSC_DIR)" 209 -@echo "Using PETSc arch: $(PETSC_ARCH)" 210 -@echo "=========================================" 211 -@cd src/snes/interface/noise; \ 212 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 213 grep -v clog trashz | grep -v "information sections" | \ 214 egrep -i '(Error|warning|Can)' >> /dev/null;\ 215 if [ "$$?" != 1 ]; then \ 216 cat trashz ; fi; $(RM) trashz 217 $(RANLIB) $(PDIR)/libpetscsnes.a 218 -@chmod g+w $(PDIR)/libpetscsnes.a 219 -@echo "Completed compiling noise routines" 220 -@echo "=========================================" 221 222 223ranlib: 224 $(RANLIB) $(PDIR)/*.a 225 226# Deletes PETSc libraries 227deletelibs: 228 -$(RM) -f $(PDIR)/*.a $(PDIR)/complex/* $(PDIR)/c++/* 229 230# Deletes man pages (HTML version) 231deletewwwpages: 232 $(RM) -f $(PETSC_DIR)/docs/www/man*/* $(PETSC_DIR)/docs/www/www.cit \ 233 $(PETSC_DIR)/docs/www/man*.html 234 235# Deletes man pages (LaTeX version) 236deletelatexpages: 237 $(RM) -f $(PETSC_DIR)/docs/tex/rsum/*sum*.tex 238 239# To access the tags in emacs, type M-x visit-tags-table and specify 240# the file petsc/TAGS. Then, to move to where a PETSc function is 241# defined, enter M-. and the function name. To search for a string 242# and move to the first occurrence, use M-x tags-search and the string. 243# To locate later occurrences, use M-, 244 245TAGS_INCLUDE_FILES = include/*.h include/pinclude/*.h include/FINCLUDE/*.h 246TAGS_BMAKE_FILES = bmake/common bmake/*/base* 247TAGS_EXAMPLE_FILES = src/*/examples/*/*.[c,h,F,f] src/*/examples/*/*/*.[c,h,F,f] \ 248 src/benchmarks/*.c src/contrib/*/examples/*/*.[c,h,F,f] 249TAGS_DOC_FILES = docs/tex/manual/routin.tex docs/tex/manual/manual.tex \ 250 docs/tex/manual/manual_tex.tex docs/tex/manual/intro.tex \ 251 docs/tex/manual/part1.tex docs/tex/manual/part2.tex 252TAGS_SRC_FILES = src/*/*.[c,h] src/*/interface/*.[c,h] src/*/src/*.[c,h] \ 253 src/*/utils/*.[c,h] \ 254 src/*/impls/*.[c,h] src/*/impls/*/*.[c,h] src/*/impls/*/*/*.[c,h] \ 255 src/gvec/impls/*/*/*/*/*.[c,h] src/contrib/*/*.[c,h] \ 256 src/contrib/*/src/*.[c,h] src/fortran/custom/*.[c,h,F] 257TAGS_MAKEFILE_FILES = include/makefile include/*/makefile \ 258 makefile \ 259 src/makefile src/*/makefile src/*/src/makefile \ 260 src/*/interface/makefile \ 261 src/*/utils/makefile \ 262 src/*/impls/makefile src/*/impls/*/makefile src/*/impls/*/*/makefile \ 263 src/*/examples/makefile src/*/examples/*/makefile src/*/examples/*/*/makefile \ 264 src/gvec/impls/*/*/*/*/makefile src/gvec/impls/*/*/*/makefile \ 265 src/fortran/*/makefile \ 266 src/contrib/*/makefile src/contrib/*/src/makefile \ 267 src/contrib/*/examples/makefile src/contrib/*/examples/*/makefile \ 268 docs/makefile 269 270# Builds all etags files 271alletags: 272 -make etags_complete 273 -make etags 274 -make etags_noexamples 275 -make etags_makefiles 276 277# Builds the basic etags file. This should be employed by most users. 278etags: 279 $(RM) TAGS 280 etags -f TAGS $(TAGS_INCLUDE_FILES) 281 etags -a -f TAGS $(TAGS_SRC_FILES) 282 etags -a -f TAGS $(TAGS_EXAMPLE_FILES) 283 etags -a -f TAGS $(TAGS_MAKEFILE_FILES) 284 etags -a -f TAGS $(TAGS_BMAKE_FILES) 285 chmod g+w TAGS 286 287# Builds complete etags list; only for PETSc developers. 288etags_complete: 289 $(RM) TAGS_COMPLETE 290 etags -f TAGS_COMPLETE $(TAGS_SRC_FILES) 291 etags -a -f TAGS_COMPLETE $(TAGS_INCLUDE_FILES) 292 etags -a -f TAGS_COMPLETE $(TAGS_EXAMPLE_FILES) 293 etags -a -f TAGS_COMPLETE $(TAGS_MAKEFILE_FILES) 294 etags -a -f TAGS_COMPLETE $(TAGS_BMAKE_FILES) 295 etags -a -f TAGS_COMPLETE $(TAGS_DOC_FILES) 296 chmod g+w TAGS_COMPLETE 297 298# Builds the etags file that excludes the examples directories 299etags_noexamples: 300 $(RM) TAGS_NO_EXAMPLES 301 etags -f TAGS_NO_EXAMPLES $(TAGS_SRC_FILES) 302 etags -a -f TAGS_NO_EXAMPLES $(TAGS_INCLUDE_FILES) 303 etags -a -f TAGS_NO_EXAMPLES $(TAGS_MAKEFILE_FILES) 304 etags -a -f TAGS_NO_EXAMPLES $(TAGS_BMAKE_FILES) 305 etags -a -f TAGS_NO_EXAMPLES $(TAGS_DOC_FILES) 306 chmod g+w TAGS_NO_EXAMPLES 307 308# Builds the etags file for makefiles 309etags_makefiles: 310 $(RM) TAGS_MAKEFILES 311 etags -f TAGS_MAKEFILES $(TAGS_MAKEFILE_FILES) 312 etags -a -f TAGS_MAKEFILES $(TAGS_BMAKE_FILES) 313 chmod g+w TAGS_MAKEFILES 314 315# 316# ctags builds the tags file required for VI. 317# To use the tags file do the following: 318# 1. within vi invole the command - :set tags=/home/bsmith/petsc/tags 319# or add the command to your ~/.exrc file - set tags=/home/bsmith/petsc/tags 320# 2. now to go to a tag do - :tag TAGNAME for eg - :tag MatCreate 321# 322ctags: 323 $(RM) tags 324 ctags -w -f tags $(TAGS_INCLUDE_FILES) 325 ctags -w -a -f tags $(TAGS_SRC_FILES) 326 ctags -w -a -f tags $(TAGS_EXAMPLE_FILES) 327 ctags -w -a -f tags $(TAGS_MAKEFILE_FILES) 328 ctags -w -a -f tags $(TAGS_BMAKE_FILES) 329 chmod g+w tags 330 331# ------------------------------------------------------------------ 332# 333# All remaining actions are intended for PETSc developers only. 334# PETSc users should not generally need to use these commands. 335# 336 337# Builds all versions of the man pages 338allmanpages: allwwwpages alllatexpages 339allwwwpages: deletewwwpages 340 -make ACTION=wwwpages_buildcite tree 341 -cd src/fortran/custom; make wwwpages_buildcite 342 -cd src/fortran/custom; make wwwpages 343 -make ACTION=wwwpages tree 344 -maint/wwwman 345 -maint/examplesindex.tcl -www 346 -maint/htmlkeywords.tcl 347 -@chmod g+w docs/www/man*/* 348 349#This is similar to allwwwpages except -www -> -wwwhome 350#The wwwmanpages built this way can pe placed at PETSc Home Page 351allwwwhomepages: deletewwwpages 352 -make ACTION=wwwpages_buildcite tree 353 -cd src/fortran/custom; make wwwpages_buildcite 354 -cd src/fortran/custom; make wwwpages 355 -make ACTION=wwwpages tree 356 -maint/wwwman 357 -maint/examplesindex.tcl -wwwhome 358 -maint/htmlkeywords.tcl -wwwhome 359 -@chmod g+w docs/www/man*/* 360 361alllatexpages: deletelatexpages 362 -make ACTION=latexpages tree 363 -cd src/fortran/custom; make latexpages 364 -@chmod g+w docs/tex/rsum/* 365 366# Builds Fortran stub files 367allfortranstubs: 368 -@include/finclude/generateincludes 369 -@$(RM) -f src/fortran/auto/*.c 370 -make ACTION=fortranstubs tree 371 chmod g+w src/fortran/auto/*.c 372 373allci: 374 -@cd src/fortran/custom ; $(OMAKE) BOPT=$(BOPT) ci 375 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=ci tree 376 377allco: 378 -@cd src/fortran/custom ; $(OMAKE) BOPT=$(BOPT) co 379 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=co tree 380 381# 382# The commands below are for generating ADIC versions of the code; 383# they are not currently used. 384# 385CFLAGS = $(CPPFLAGS) $(CONF) 386alladicignore: 387 -@$(RM) $(PDIR)/adicignore 388 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adicignore tree 389 390alladic: 391 -@echo "Beginning to compile ADIC source code in all directories" 392 -@echo "Using ADIC compiler: $(ADIC_CC) $(CFLAGS)" 393 -@echo "=========================================" 394 -@cd include ; \ 395 $(ADIC_CC) -s -f 1 $(CFLAGS) petsc.h 396 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adic tree 397 -@cd src/inline ; \ 398 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adic 399 -@cd src/adic/blas ; \ 400 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adic 401 -@cd src/adic/lapack ; \ 402 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adic tree 403 404alladiclib: 405 -@echo "Beginning to compile ADIC libraries in all directories" 406 -@echo "Using compiler: $(CC) $(COPTFLAGS)" 407 -@echo "-----------------------------------------" 408 -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 409 -@echo "-----------------------------------------" 410 -@echo "Using configuration flags: $(CONF)" 411 -@echo "-----------------------------------------" 412 -@echo "Using include paths: $(PETSC_INCLUDE)" 413 -@echo "-----------------------------------------" 414 -@echo "Using PETSc directory: $(PETSC_DIR)" 415 -@echo "Using PETSc arch: $(PETSC_ARCH)" 416 -@echo "=========================================" 417 -@$(RM) -f $(PDIR)/*adic.a 418 -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adiclib tree 419 -@cd src/adic/blas ; \ 420 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adiclib 421 -@cd src/adic/lapack ; \ 422 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adiclib tree 423 -@cd src/adic/src ; \ 424 $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib 425 426# ------------------------------------------------------------------------------- 427# 428# Some macros to check if the fortran interface is up-to-date. 429# 430countfortranfunctions: 431 -@cd $(PETSC_DIR)/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 432 cut -d'(' -f1 | tr -s '' ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 433 sed "s/_$$//" | sort > /tmp/countfortranfunctions 434 435countcfunctions: 436 -@ grep extern $(PETSC_DIR)/include/*.h *.h | grep "(" | tr -s '' ' ' | \ 437 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '' '\012' | \ 438 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 439 440difffortranfunctions: countfortranfunctions countcfunctions 441 -@echo -------------- Functions missing in the fortran interface --------------------- 442 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 443 -@echo ----------------- Functions missing in the C interface ------------------------ 444 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 445 -@$(RM) /tmp/countcfunctions /tmp/countfortranfunctions 446 447checkbadfortranstubs: 448 -@echo "=========================================" 449 -@echo "Functions with MPI_Comm as an Argument" 450 -@echo "=========================================" 451 -@cd $(PETSC_DIR)/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 452 tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 453 -@echo "=========================================" 454 -@echo "Functions with a String as an Argument" 455 -@echo "=========================================" 456 -@cd $(PETSC_DIR)/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 457 tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 458 -@echo "=========================================" 459 -@echo "Functions with Pointers to PETSc Objects as Argument" 460 -@echo "=========================================" 461 -@cd $(PETSC_DIR)/src/fortran/auto; \ 462 _p_OBJ=`grep _p_ $(PETSC_DIR)/include/*.h | tr -s '' ' ' | \ 463 cut -d' ' -f 3 | tr -s '' '\012' | grep -v '{' | cut -d'*' -f1 | \ 464 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 465 for OBJ in $$_p_OBJ; do \ 466 grep "$$OBJ \*" *.c | tr -s '' ' ' | tr -s ':' ' ' | \ 467 cut -d'(' -f1 | cut -d' ' -f1,3; \ 468 done 469