xref: /petsc/makefile (revision f1af5d2ffeae1f5fc391a89939f4818e47770ae3)
1# $Id: makefile,v 1.291 1999/09/04 19:20:20 bsmith 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
12
13#
14# Basic targets to build PETSc libraries.
15# all     : builds the c, fortran, and f90 libraries
16all       : info chkpetsc_dir deletelibs build_c build_fortran shared
17#
18# Prints information about the system and version of PETSc being compiled
19#
20info:
21	-@echo "=========================================="
22	-@echo " "
23	-@echo "See docs/troubleshooting.html and docs/bugreporting.html"
24	-@echo "for help with installation problems. Please send EVERYTHING"
25	-@echo "printed out below when reporting problems"
26	-@echo " "
27	-@echo "To subscribe to the PETSc users mailing list, send mail to "
28	-@echo "majordomo@mcs.anl.gov with the message: "
29	-@echo "subscribe petsc-users"
30	-@echo " "
31	-@echo "=========================================="
32	-@echo On `date` on `hostname`
33	-@echo Machine characteristics: `uname -a`
34	-@echo "-----------------------------------------"
35	-@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS}"
36	-@if [ -n "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \
37	  echo "C Compiler version:" ; ${C_CCV} ; fi
38	-@if [ -n "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \
39	  echo "C++ Compiler version:" ; ${CXX_CCV} ; fi
40	-@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}"
41	-@if [ -n "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \
42	  echo "Fortran Compiler version:" ; ${C_FCV} ; fi
43	-@echo "-----------------------------------------"
44	-@grep PETSC_VERSION_NUMBER include/petsc.h | sed "s/........//"
45	-@echo "-----------------------------------------"
46	-@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}"
47	-@echo "-----------------------------------------"
48	-@echo "Using configuration flags:"
49	-@grep "define " bmake/${PETSC_ARCH}/petscconf.h
50	-@echo "-----------------------------------------"
51	-@echo "Using include paths: ${PETSC_INCLUDE}"
52	-@echo "-----------------------------------------"
53	-@echo "Using PETSc directory: ${PETSC_DIR}"
54	-@echo "Using PETSc arch: ${PETSC_ARCH}"
55	-@echo "------------------------------------------"
56	-@echo "Using C linker: ${CLINKER}"
57	-@echo "Using Fortran linker: ${FLINKER}"
58	-@echo "Using libraries: ${PETSC_LIB}"
59	-@echo "=========================================="
60
61#
62# Builds the PETSc libraries
63# This target also builds fortran77 and f90 interface
64# files. (except compiling *.F files)
65#
66build_c:
67	-@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES"
68	-@echo "========================================="
69	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree
70	-@cd ${PETSC_DIR}/src/sys/src/time ; \
71	${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} rs6000_asmtime
72	${RANLIB} ${PDIR}/*.a
73	-@chmod g+w  ${PDIR}/*.a
74	-@echo "Completed building libraries"
75	-@echo "========================================="
76
77#
78# Builds PETSc Fortran source
79# Note:	 libfast cannot run on .F files on certain machines, so we
80# use libf to compile the fortran source files.
81#
82build_fortran:
83	-@echo "BEGINNING TO COMPILE FORTRAN SOURCE"
84	-@echo "========================================="
85	-@cd src/fortran/custom; \
86	  ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean
87	-@cd src/fortran/kernels; \
88	  ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean
89	${RANLIB} ${PDIR}/libpetscfortran.a
90	${RANLIB} ${PDIR}/libpetsc.a
91	-@chmod g+w  ${PDIR}/*.a
92	-@echo "Completed compiling Fortran source"
93	-@echo "========================================="
94
95petscblas: info chkpetsc_dir
96	-${RM} -f ${PDIR}/libpetscblas.*
97	-@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK"
98	-@echo "========================================="
99	-@cd src/blaslapack; \
100	  ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree
101	${RANLIB} ${PDIR}/libpetscblas.a
102	-@chmod g+w  ${PDIR}/*.a
103	-@echo "Completed compiling C version of BLAS and LAPACK"
104	-@echo "========================================="
105
106
107# Builds PETSc test examples for a given BOPT and architecture
108testexamples: info chkopts
109	-@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES"
110	-@echo "Due to different numerical round-off on certain"
111	-@echo "machines some of the numbers may not match exactly."
112	-@echo "========================================="
113	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \
114	   ACTION=testexamples_1  tree
115	-@echo "Completed compiling and running test examples"
116	-@echo "========================================="
117
118# Builds PETSc test examples for a given BOPT and architecture
119testfortran: info chkopts
120	-@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES"
121	-@echo "========================================="
122	-@echo "Due to different numerical round-off on certain"
123	-@echo "machines or the way Fortran formats numbers"
124	-@echo "some of the results may not match exactly."
125	-@echo "========================================="
126	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \
127	   ACTION=testexamples_3  tree
128	-@echo "Completed compiling and running Fortran test examples"
129	-@echo "========================================="
130
131# Builds PETSc test examples for a given BOPT and architecture
132testexamples_uni: info chkopts
133	-@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES"
134	-@echo "Due to different numerical round-off on certain"
135	-@echo "machines some of the numbers may not match exactly."
136	-@echo "========================================="
137	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \
138	   ACTION=testexamples_4  tree
139	-@echo "Completed compiling and running uniprocessor test examples"
140	-@echo "========================================="
141testfortran_uni: info chkopts
142	-@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN 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} \
147	   ACTION=testexamples_9  tree
148	-@echo "Completed compiling and running uniprocessor fortran test examples"
149	-@echo "========================================="
150matlabcodes:
151	-@echo "BEGINNING TO COMPILE MATLAB INTERFACE"
152	-@cd src/sys/src/viewer/impls/socket/matlab; ${OMAKE} BOPT=g matlabcodes  PETSC_ARCH=${PETSC_ARCH}
153
154# Ranlib on the libraries
155ranlib:
156	${RANLIB} ${PDIR}/*.a
157
158# Deletes PETSc libraries
159deletelibs: chkopts_basic
160	-${RM} -f ${PDIR}/*
161
162
163# ------------------------------------------------------------------
164#
165# All remaining actions are intended for PETSc developers only.
166# PETSc users should not generally need to use these commands.
167#
168
169# To access the tags in EMACS, type M-x visit-tags-table and specify
170# the file petsc/TAGS.
171# 1) To move to where a PETSc function is defined, enter M-. and the
172#     function name.
173# 2) To search for a string and move to the first occurrence,
174#     use M-x tags-search and the string.
175#     To locate later occurrences, use M-,
176# Builds all etags files
177alletags:
178	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags
179	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete
180	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples
181	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples
182	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles
183# Builds the basic etags file.	This should be employed by most users.
184etags:
185	-${RM} ${TAGSDIR}/TAGS
186	-touch ${TAGSDIR}/TAGS
187	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree
188	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree
189	-cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree
190	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree
191	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree
192	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree
193	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree
194	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree
195	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles
196	-chmod g+w TAGS
197# Builds complete etags list; only for PETSc developers.
198etags_complete:
199	-${RM} ${TAGSDIR}/TAGS_COMPLETE
200	-touch ${TAGSDIR}/TAGS_COMPLETE
201	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree
202	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree
203	-cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree
204	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree
205	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree
206	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree
207	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree
208	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree
209	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles
210	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree
211	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree
212	-chmod g+w TAGS_COMPLETE
213# Builds the etags file that excludes the examples directories
214etags_noexamples:
215	-${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES
216	-touch ${TAGSDIR}/TAGS_NO_EXAMPLES
217	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree
218	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree
219	-cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree
220	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree
221	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles
222	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree
223	-chmod g+w TAGS_NO_EXAMPLES
224# Builds the etags file for makefiles
225etags_makefiles:
226	-${RM} ${TAGSDIR}/TAGS_MAKEFILES
227	-touch ${TAGSDIR}/TAGS_MAKEFILES
228	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree
229	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles
230	-chmod g+w TAGS_MAKEFILES
231# Builds the etags file for examples
232etags_examples:
233	-${RM} ${TAGSDIR}/TAGS_EXAMPLES
234	-touch ${TAGSDIR}/TAGS_EXAMPLES
235	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree
236	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree
237	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree
238	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree
239	-chmod g+w TAGS_EXAMPLES
240etags_fexamples:
241	-${RM} ${TAGSDIR}/TAGS_FEXAMPLES
242	-touch ${TAGSDIR}/TAGS_FEXAMPLES
243	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree
244	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree
245	-chmod g+w TAGS_FEXAMPLES
246#
247# These are here for the target allci and allco, and etags
248#
249
250BMAKEFILES = bmake/common* bmake/*/base bmake/*/base_variables bmake/*/base.site \
251	     bmake/*/petscconf.h bmake/win32/makefile.dos bin/config/base*.in
252DOCS	   = bmake/readme bmake/petscconf.defs
253SCRIPTS    = maint/addlinks maint/builddist maint/buildlinks maint/wwwman \
254	     maint/xclude maint/crontab  \
255	     maint/autoftp include/foldinclude/generateincludes
256
257# Builds all the documentation - should be done every night
258alldoc: allmanpages
259	cd docs/tex/manual; ${OMAKE} manual.dvi manual.ps manual.html splitmanual.html
260
261# Deletes man pages (HTML version)
262deletemanualpages:
263	${RM} -f ${PETSC_DIR}/docs/manualpages/*/*.html \
264                 ${PETSC_DIR}/docs/manualpages/manualpages.cit
265
266# Deletes man pages (LaTeX version)
267deletelatexpages:
268	${RM} -f ${PETSC_DIR}/docs/tex/rsum/*sum*.tex
269
270# Builds all versions of the man pages
271allmanpages: allmanualpages alllatexpages
272allmanualpages: deletemanualpages
273	-${OMAKE} ACTION=manualpages_buildcite tree
274	-${OMAKE} ACTION=manualpages tree
275	-maint/wwwindex.py ${PETSC_DIR}
276	-maint/examplesindex.tcl
277	-maint/htmlkeywords.tcl
278	-@chmod g+w docs/manualpages/*/*.html
279
280alllatexpages: deletelatexpages
281	-${OMAKE} ACTION=latexpages tree
282	-@chmod g+w docs/tex/rsum/*
283
284# Builds Fortran stub files
285allfortranstubs:
286	-@include/foldinclude/generateincludes
287	-@${RM} -f src/fortran/auto/*.c
288	-${OMAKE} ACTION=fortranstubs tree
289	-@cd src/fortran/auto; ${OMAKE} -f makefile fixfortran
290	chmod g+w src/fortran/auto/*.c
291
292allci:
293	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci  alltree
294
295allco:
296	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co  alltree
297
298#
299#   The commands below are for generating ADIC versions of the code;
300# they are not currently used.
301#
302alladicignore:
303	-@${RM} ${PDIR}/adicignore
304	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore  tree
305
306alladic:
307	-@echo "Beginning to compile ADIC source code in all directories"
308	-@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}"
309	-@echo "========================================="
310	-@cd include ; \
311           ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h
312	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic  tree
313	-@cd src/inline ; \
314            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic
315	-@cd src/blaslapack ; \
316            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic  tree
317
318alladiclib:
319	-@echo "Beginning to compile ADIC libraries in all directories"
320	-@echo "Using compiler: ${CC} ${COPTFLAGS}"
321	-@echo "-----------------------------------------"
322	-@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}"
323	-@echo "-----------------------------------------"
324	-@echo "Using configuration flags:"
325	-@grep "define " bmake/${PETSC_ARCH}/petscconf.h
326	-@echo "-----------------------------------------"
327	-@echo "Using include paths: ${PETSC_INCLUDE}"
328	-@echo "-----------------------------------------"
329	-@echo "Using PETSc directory: ${PETSC_DIR}"
330	-@echo "Using PETSc arch: ${PETSC_ARCH}"
331	-@echo "========================================="
332	-@${RM} -f  ${PDIR}/*adic.a
333	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib  tree
334	-@cd src/blaslapack ; \
335            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib  tree
336	-@cd src/adic/src ; \
337            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib
338
339# -------------------------------------------------------------------------------
340#
341# Some macros to check if the fortran interface is up-to-date.
342#
343countfortranfunctions:
344	-@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \
345	cut -d'(' -f1 | tr -s  ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \
346	sed "s/_$$//" | sort > /tmp/countfortranfunctions
347
348countcfunctions:
349	-@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \
350	cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' |  \
351	tr 'A-Z' 'a-z' |  sort > /tmp/countcfunctions
352
353difffortranfunctions: countfortranfunctions countcfunctions
354	-@echo -------------- Functions missing in the fortran interface ---------------------
355	-@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2
356	-@echo ----------------- Functions missing in the C interface ------------------------
357	-@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2
358	-@${RM}  /tmp/countcfunctions /tmp/countfortranfunctions
359
360checkbadfortranstubs:
361	-@echo "========================================="
362	-@echo "Functions with MPI_Comm as an Argument"
363	-@echo "========================================="
364	-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \
365	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
366	-@echo "========================================="
367	-@echo "Functions with a String as an Argument"
368	-@echo "========================================="
369	-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \
370	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
371	-@echo "========================================="
372	-@echo "Functions with Pointers to PETSc Objects as Argument"
373	-@echo "========================================="
374	-@cd ${PETSC_DIR}/src/fortran/auto; \
375	_p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \
376	cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \
377	sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \
378	for OBJ in $$_p_OBJ; do \
379	grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \
380	cut -d'(' -f1 | cut -d' ' -f1,3; \
381	done
382# Builds noise routines (not yet publically available)
383# Note:	 libfast cannot run on .F files on certain machines, so we
384# use lib and check for errors here.
385noise: info chkpetsc_dir
386	-@echo "Beginning to compile noise routines"
387	-@echo "========================================="
388	-@cd src/snes/interface/noise; \
389	  ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \
390	  grep -v clog trashz | grep -v "information sections" | \
391	  egrep -i '(Error|warning|Can)' >> /dev/null;\
392	  if [ "$$?" != 1 ]; then \
393	  cat trashz ; fi; ${RM} trashz
394	${RANLIB} ${PDIR}/libpetscsnes.a
395	-@chmod g+w  ${PDIR}/libpetscsnes.a
396	-@echo "Completed compiling noise routines"
397	-@echo "========================================="
398
399