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