Subversion Repositories slepc-dev

Rev

Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 dsic.upv.es!jroman 1
#
2
# This is the makefile for installing SLEPc. See the Users Manual
3
# for directions on installing SLEPc.
4
#
1378 slepc 5
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1672 slepc 6
#  SLEPc - Scalable Library for Eigenvalue Problem Computations
2575 eromero 7
#  Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain
1378 slepc 8
#
1672 slepc 9
#  This file is part of SLEPc.
10
#
11
#  SLEPc is free software: you can redistribute it and/or modify it under  the
12
#  terms of version 3 of the GNU Lesser General Public License as published by
13
#  the Free Software Foundation.
14
#
15
#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
16
#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
17
#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
18
#  more details.
19
#
20
#  You  should have received a copy of the GNU Lesser General  Public  License
21
#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
1378 slepc 22
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
23
#
24
 
6 dsic.upv.es!jroman 25
ALL: all
26
LOCDIR = .
27
DIRS   = src include docs
28
 
2502 jroman 29
# Include the rest of makefiles
1523 slepc 30
include ${SLEPC_DIR}/conf/slepc_common
6 dsic.upv.es!jroman 31
 
32
#
2502 jroman 33
# Basic targets to build SLEPc library
6 dsic.upv.es!jroman 34
all:
1871 antodo 35
	@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} chkpetsc_dir
36
	@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} chkslepc_dir
2475 jroman 37
	@if [ "${SLEPC_BUILD_USING_CMAKE}" != "" ]; then \
2511 jroman 38
	   echo "=========================================="; \
2475 jroman 39
           echo "Building SLEPc using CMake with ${MAKE_NP} build threads"; \
2511 jroman 40
	   echo "Using SLEPC_DIR=${SLEPC_DIR}, PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"; \
41
	   echo "=========================================="; \
2475 jroman 42
	   ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-cmake; \
43
	 else \
44
	   ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-legacy; \
45
	 fi
2839 jroman 46
	@egrep -i "( error | error: |no such file or directory)" ${PETSC_ARCH}/conf/make.log | tee ${PETSC_ARCH}/conf/error.log > /dev/null
47
	@if test -s ${PETSC_ARCH}/conf/error.log; then \
785 dsic.upv.es!antodo 48
           echo "********************************************************************"; \
1523 slepc 49
           echo "  Error during compile, check ${PETSC_ARCH}/conf/make.log"; \
50
           echo "  Send all contents of ${PETSC_ARCH}/conf to slepc-maint@grycap.upv.es";\
785 dsic.upv.es!antodo 51
           echo "********************************************************************"; \
2217 jroman 52
	 elif [ "${SLEPC_DESTDIR}" = "${SLEPC_DIR}/${PETSC_ARCH}" ]; then \
2378 jroman 53
           echo "Now to check if the library is working do: make test";\
1567 slepc 54
           echo "=========================================";\
1557 slepc 55
	 else \
2378 jroman 56
	   echo "Now to install the library do:";\
57
	   echo "make SLEPC_DIR=${PWD} PETSC_DIR=${PETSC_DIR} PETSC_ARCH=arch-installed-petsc install";\
1567 slepc 58
	   echo "=========================================";\
1557 slepc 59
	 fi
2839 jroman 60
	@if test -s ${PETSC_ARCH}/conf/error.log; then exit 1; fi
2511 jroman 61
 
2475 jroman 62
all-cmake:
63
	@${OMAKE} -j ${MAKE_NP} -C ${PETSC_ARCH} VERBOSE=1 2>&1 | tee ${PETSC_ARCH}/conf/make.log \
2476 jroman 64
	          | egrep -v '( --check-build-system |cmake -E | -o CMakeFiles/slepc[[:lower:]]*.dir/| -o lib/libslepc|CMakeFiles/slepc[[:lower:]]*\.dir/(build|depend|requires)|-f CMakeFiles/Makefile2|Dependee .* is newer than depender |provides\.build. is up to date)'
2475 jroman 65
 
66
all-legacy:
67
	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all_build 2>&1 | tee ${PETSC_ARCH}/conf/make.log
68
 
2721 jroman 69
all_build: chk_petsc_dir chk_slepc_dir chklib_dir info deletelibs deletemods build slepc_shared slepc4py_noinstall
6 dsic.upv.es!jroman 70
#
71
# Prints information about the system and version of SLEPc being compiled
72
#
73
info:
74
	-@echo "=========================================="
75
	-@echo On `date` on `hostname`
76
	-@echo Machine characteristics: `uname -a`
77
	-@echo "-----------------------------------------"
785 dsic.upv.es!antodo 78
	-@echo "Using SLEPc directory: ${SLEPC_DIR}"
79
	-@echo "Using PETSc directory: ${PETSC_DIR}"
80
	-@echo "Using PETSc arch: ${PETSC_ARCH}"
6 dsic.upv.es!jroman 81
	-@echo "-----------------------------------------"
785 dsic.upv.es!antodo 82
	-@grep "define SLEPC_VERSION" ${SLEPC_DIR}/include/slepcversion.h | ${SED} "s/........//"
6 dsic.upv.es!jroman 83
	-@echo "-----------------------------------------"
785 dsic.upv.es!antodo 84
	-@grep "define PETSC_VERSION" ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//"
85
	-@echo "-----------------------------------------"
2270 jroman 86
	-@echo "Using PETSc configure options:" ${CONFIGURE_OPTIONS}
1078 slepc 87
	-@echo "Using SLEPc configuration flags:"
1523 slepc 88
	-@cat ${SLEPC_DIR}/${PETSC_ARCH}/conf/slepcvariables
2270 jroman 89
	-@grep "\#define " ${SLEPC_DIR}/${PETSC_ARCH}/include/slepcconf.h
1078 slepc 90
	-@echo "Using PETSc configuration flags:"
2301 jroman 91
	-@if [ "${PETSC_ARCH}" != "arch-installed-petsc" ]; then \
92
	   grep "\#define " ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h; \
93
	 else \
94
	   grep "\#define " ${PETSC_DIR}/include/petscconf.h; \
95
         fi
785 dsic.upv.es!antodo 96
	-@echo "-----------------------------------------"
2270 jroman 97
	-@echo "Using include paths: ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES}"
785 dsic.upv.es!antodo 98
	-@echo "------------------------------------------"
1042 slepc 99
	-@echo "Using C/C++ compiler: ${PCC} ${PCC_FLAGS} ${COPTFLAGS} ${CFLAGS}"
785 dsic.upv.es!antodo 100
	-@if [ "${FC}" != "" ]; then \
2270 jroman 101
	   echo "Using Fortran include/module paths: ${PETSC_FC_INCLUDES}";\
1042 slepc 102
	   echo "Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}";\
785 dsic.upv.es!antodo 103
         fi
6 dsic.upv.es!jroman 104
	-@echo "-----------------------------------------"
1042 slepc 105
	-@echo "Using C/C++ linker: ${PCC_LINKER}"
2270 jroman 106
	-@echo "Using C/C++ flags: ${PCC_LINKER_FLAGS}"
785 dsic.upv.es!antodo 107
	-@if [ "${FC}" != "" ]; then \
108
	   echo "Using Fortran linker: ${FC_LINKER}";\
2270 jroman 109
	   echo "Using Fortran flags: ${FC_LINKER_FLAGS}";\
785 dsic.upv.es!antodo 110
         fi
6 dsic.upv.es!jroman 111
	-@echo "-----------------------------------------"
2378 jroman 112
	-@echo "Using library: ${SLEPC_LIB}"
6 dsic.upv.es!jroman 113
	-@echo "------------------------------------------"
2270 jroman 114
	-@echo "Using mpiexec: ${MPIEXEC}"
6 dsic.upv.es!jroman 115
	-@echo "=========================================="
116
 
117
#
2378 jroman 118
# Builds the SLEPc library
6 dsic.upv.es!jroman 119
#
785 dsic.upv.es!antodo 120
build:
2502 jroman 121
	-@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES"
6 dsic.upv.es!jroman 122
	-@echo "========================================="
2495 jroman 123
	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} ACTION=libfast slepc_tree
2505 jroman 124
	-@${RANLIB} ${SLEPC_LIB_DIR}/*.${AR_LIB_SUFFIX}  > tmpf 2>&1 ; ${GREP} -v "has no symbols" tmpf; ${RM} tmpf;
2502 jroman 125
	-@echo "Completed building libraries"
6 dsic.upv.es!jroman 126
	-@echo "========================================="
127
 
1523 slepc 128
# Simple test examples for checking a correct installation
1098 slepc 129
test:
2511 jroman 130
	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} test_build 2>&1 | tee ./${PETSC_ARCH}/conf/test.log
131
test_build:
1098 slepc 132
	-@echo "Running test examples to verify correct installation"
2511 jroman 133
	-@echo "Using SLEPC_DIR=${SLEPC_DIR}, PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"
2610 jroman 134
	@cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest10
2535 jroman 135
	@if [ "${FC}" != "" ]; then cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest7f; fi;
2531 jroman 136
	-@if [ "${BLOPEX_LIB}" != "" ]; then cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest5_blopex; fi;
1098 slepc 137
	-@echo "Completed test examples"
138
 
1523 slepc 139
# Builds SLEPc test examples for C
801 dsic.upv.es!antodo 140
testexamples: info
6 dsic.upv.es!jroman 141
	-@echo "BEGINNING TO COMPILE AND RUN SLEPc TEST EXAMPLES"
142
	-@echo "Due to different numerical round-off on certain"
143
	-@echo "machines some of the numbers may not match exactly."
144
	-@echo "========================================="
1871 antodo 145
	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \
2495 jroman 146
	   ACTION=testexamples_C slepc_tree
6 dsic.upv.es!jroman 147
	-@echo "Completed compiling and running test examples"
148
	-@echo "========================================="
149
 
1523 slepc 150
# Builds SLEPc test examples for Fortran
801 dsic.upv.es!antodo 151
testfortran: info
6 dsic.upv.es!jroman 152
	-@echo "BEGINNING TO COMPILE AND RUN SLEPc FORTRAN TEST EXAMPLES"
153
	-@echo "========================================="
154
	-@echo "Due to different numerical round-off on certain"
155
	-@echo "machines or the way Fortran formats numbers"
156
	-@echo "some of the results may not match exactly."
157
	-@echo "========================================="
801 dsic.upv.es!antodo 158
	-@if [ "${FC}" != "" ]; then \
1871 antodo 159
	    ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \
2495 jroman 160
	      ACTION=testexamples_Fortran slepc_tree ; \
604 dsic.upv.es!antodo 161
            echo "Completed compiling and running Fortran test examples"; \
162
          else \
163
            echo "Error: No FORTRAN compiler available"; \
164
          fi
6 dsic.upv.es!jroman 165
	-@echo "========================================="
166
 
2496 jroman 167
# Test BLOPEX use
168
testblopex:
169
	-@echo "BEGINNING TO COMPILE AND RUN SLEPc BLOPEX TEST EXAMPLES"
170
	-@echo "========================================="
171
	-@echo "Due to different numerical round-off on certain"
172
	-@echo "machines some of the results may not match exactly."
173
	-@echo "========================================="
174
	-@if [ "${BLOPEX_LIB}" != "" ]; then \
175
	    ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \
176
	      ACTION=testexamples_BLOPEX slepc_tree ; \
177
            echo "Completed compiling and running BLOPEX test examples"; \
178
          else \
179
            echo "Error: SLEPc has not been configured with BLOPEX"; \
180
          fi
181
	-@echo "========================================="
182
 
2378 jroman 183
# Ranlib on the library
785 dsic.upv.es!antodo 184
ranlib:
2199 jroman 185
	${RANLIB} ${SLEPC_LIB_DIR}/*.${AR_LIB_SUFFIX}
6 dsic.upv.es!jroman 186
 
2378 jroman 187
# Deletes SLEPc library
785 dsic.upv.es!antodo 188
deletelibs:
2195 jroman 189
	-${RM} -r ${SLEPC_LIB_DIR}/libslepc*.*
2199 jroman 190
deletemods:
191
	-${RM} -f ${SLEPC_DIR}/${PETSC_ARCH}/include/slepc*.mod
6 dsic.upv.es!jroman 192
 
785 dsic.upv.es!antodo 193
# Cleans up build
2199 jroman 194
allclean: deletelibs deletemods
2495 jroman 195
	-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} ACTION=clean slepc_tree
6 dsic.upv.es!jroman 196
 
197
#
785 dsic.upv.es!antodo 198
# Check if PETSC_DIR variable specified is valid
199
#
200
chk_petsc_dir:
201
	@if [ ! -f ${PETSC_DIR}/include/petscversion.h ]; then \
202
	  echo "Incorrect PETSC_DIR specified: ${PETSC_DIR}!"; \
203
	  echo "You need to use / to separate directories, not \\!"; \
204
	  echo "Aborting build"; \
205
	  false; fi
206
#
6 dsic.upv.es!jroman 207
# Check if SLEPC_DIR variable specified is valid
208
#
209
chk_slepc_dir:
210
	@if [ ! -f ${SLEPC_DIR}/include/slepcversion.h ]; then \
211
	  echo "Incorrect SLEPC_DIR specified: ${SLEPC_DIR}!"; \
212
	  echo "You need to use / to separate directories, not \\!"; \
213
	  echo "Aborting build"; \
214
	  false; fi
2502 jroman 215
#
216
# Install relevant files in the prefix directory
217
#
1366 slepc 218
install:
1611 slepc 219
	-@if [ "${PETSC_ARCH}" = "" ]; then \
1527 slepc 220
	  echo "PETSC_ARCH is undefined";\
2217 jroman 221
	elif [ "${SLEPC_DESTDIR}" = "${SLEPC_DIR}/${PETSC_ARCH}" ]; then \
1366 slepc 222
	  echo "Install directory is current directory; nothing needs to be done";\
223
        else \
2217 jroman 224
	  echo Installing SLEPc at ${SLEPC_DESTDIR};\
225
          if [ ! -d `dirname ${SLEPC_DESTDIR}` ]; then \
226
	    ${MKDIR} `dirname ${SLEPC_DESTDIR}` ; \
1366 slepc 227
          fi;\
2217 jroman 228
          if [ ! -d ${SLEPC_DESTDIR} ]; then \
229
	    ${MKDIR} ${SLEPC_DESTDIR} ; \
1366 slepc 230
          fi;\
2217 jroman 231
          if [ ! -d ${SLEPC_DESTDIR}/include ]; then \
232
	    ${MKDIR} ${SLEPC_DESTDIR}/include ; \
1372 slepc 233
          fi;\
2217 jroman 234
          cp -f include/*.h ${SLEPC_DESTDIR}/include;\
2277 jroman 235
          cp -f ${PETSC_ARCH}/include/*.h ${SLEPC_DESTDIR}/include;\
1558 slepc 236
          if [ -f ${PETSC_ARCH}/include/slepceps.mod ]; then \
2217 jroman 237
            cp -f ${PETSC_ARCH}/include/*.mod ${SLEPC_DESTDIR}/include;\
1558 slepc 238
          fi;\
2217 jroman 239
          if [ ! -d ${SLEPC_DESTDIR}/include/finclude ]; then \
240
	    ${MKDIR} ${SLEPC_DESTDIR}/include/finclude ; \
1372 slepc 241
          fi;\
2217 jroman 242
          cp -f include/finclude/*.h* ${SLEPC_DESTDIR}/include/finclude;\
2191 jroman 243
          if [ -d include/finclude/ftn-auto ]; then \
2217 jroman 244
            if [ ! -d ${SLEPC_DESTDIR}/include/finclude/ftn-auto ]; then \
245
	      ${MKDIR} ${SLEPC_DESTDIR}/include/finclude/ftn-auto ; \
2191 jroman 246
            fi;\
2217 jroman 247
            cp -f include/finclude/ftn-auto/*.h90 ${SLEPC_DESTDIR}/include/finclude/ftn-auto;\
1555 slepc 248
          fi;\
2217 jroman 249
          if [ ! -d ${SLEPC_DESTDIR}/include/finclude/ftn-custom ]; then \
250
	    ${MKDIR} ${SLEPC_DESTDIR}/include/finclude/ftn-custom ; \
1555 slepc 251
          fi;\
2217 jroman 252
          cp -f include/finclude/ftn-custom/*.h90 ${SLEPC_DESTDIR}/include/finclude/ftn-custom;\
253
          if [ ! -d ${SLEPC_DESTDIR}/include/private ]; then \
254
	    ${MKDIR} ${SLEPC_DESTDIR}/include/private ; \
1527 slepc 255
          fi;\
2301 jroman 256
          cp -f include/private/*.h ${SLEPC_DESTDIR}/include/private;\
2217 jroman 257
          if [ ! -d ${SLEPC_DESTDIR}/conf ]; then \
258
	    ${MKDIR} ${SLEPC_DESTDIR}/conf ; \
1366 slepc 259
          fi;\
2428 jroman 260
          for dir in bin bin/matlab bin/matlab/classes bin/matlab/classes/examples \
261
              bin/matlab/classes/examples/tutorials; \
262
          do \
263
            if [ ! -d ${SLEPC_DESTDIR}/$$dir ]; then ${MKDIR} ${SLEPC_DESTDIR}/$$dir; fi;\
264
          done; \
265
          for dir in bin/matlab/classes bin/matlab/classes/examples/tutorials; \
266
          do \
267
            cp -f $$dir/*.m ${SLEPC_DESTDIR}/$$dir;\
268
          done; \
269
          cp -f bin/matlab/classes/slepcmatlabheader.h ${SLEPC_DESTDIR}/bin/matlab/classes;\
2494 jroman 270
          cp -f conf/slepc_* ${SLEPC_DESTDIR}/conf;\
2217 jroman 271
          cp -f ${PETSC_ARCH}/conf/slepcvariables ${SLEPC_DESTDIR}/conf;\
272
          cp -f ${PETSC_ARCH}/conf/slepcrules ${SLEPC_DESTDIR}/conf;\
273
          if [ ! -d ${SLEPC_DESTDIR}/lib ]; then \
274
	    ${MKDIR} ${SLEPC_DESTDIR}/lib ; \
1366 slepc 275
          fi;\
1523 slepc 276
          if [ -d ${PETSC_ARCH}/lib ]; then \
2217 jroman 277
            cp -f ${PETSC_ARCH}/lib/*.${AR_LIB_SUFFIX} ${SLEPC_DESTDIR}/lib;\
278
            ${RANLIB} ${SLEPC_DESTDIR}/lib/*.${AR_LIB_SUFFIX} ;\
2752 jroman 279
            ${OMAKE} PETSC_DIR=${PETSC_DIR} PETSC_ARCH="" SLEPC_DIR=${SLEPC_DESTDIR} OTHERSHAREDLIBS="${PETSC_KSP_LIB} ${SLEPC_EXTERNAL_LIB}" shared; \
2217 jroman 280
            ${OMAKE} PETSC_DIR=${PETSC_DIR} PETSC_ARCH="" SLEPC_DIR=${SLEPC_DESTDIR} slepc4py; \
1366 slepc 281
          fi;\
1717 jroman 282
          echo "====================================";\
2378 jroman 283
	  echo "Install complete.";\
284
	  echo "It is usable with SLEPC_DIR=${SLEPC_DESTDIR} PETSC_DIR=${PETSC_DIR} [and no more PETSC_ARCH].";\
285
          echo "Run the following to verify the install (in current directory):";\
286
          echo "make SLEPC_DIR=${SLEPC_DESTDIR} PETSC_DIR=${PETSC_DIR} test";\
1717 jroman 287
          echo "====================================";\
1366 slepc 288
        fi;
42 dsic.upv.es!antodo 289
 
6 dsic.upv.es!jroman 290
# ------------------------------------------------------------------
291
#
292
# All remaining actions are intended for SLEPc developers only.
293
# SLEPc users should not generally need to use these commands.
294
#
295
 
296
# Builds all the documentation
804 dsic.upv.es!antodo 297
alldoc: alldoc1 alldoc2
6 dsic.upv.es!jroman 298
 
804 dsic.upv.es!antodo 299
# Build everything that goes into 'doc' dir except html sources
1161 slepc 300
alldoc1: chk_loc deletemanualpages
42 dsic.upv.es!antodo 301
	-${OMAKE} ACTION=manualpages_buildcite tree_basic LOC=${LOC}
804 dsic.upv.es!antodo 302
	-@sed -e s%man+../%man+manualpages/% ${LOC}/docs/manualpages/manualpages.cit > ${LOC}/docs/manualpages/htmlmap
303
	-@cat ${PETSC_DIR}/src/docs/mpi.www.index >> ${LOC}/docs/manualpages/htmlmap
1161 slepc 304
	-${OMAKE} ACTION=slepc_manualpages tree_basic LOC=${LOC}
2502 jroman 305
	-${PYTHON} ${PETSC_DIR}/bin/maint/wwwindex.py ${SLEPC_DIR} ${LOC}
2642 jroman 306
	-${OMAKE} ACTION=slepc_manexamples tree_basic LOC=${LOC}
804 dsic.upv.es!antodo 307
 
308
# Builds .html versions of the source
309
alldoc2: chk_loc
310
	-${OMAKE} ACTION=slepc_html PETSC_DIR=${PETSC_DIR} alltree LOC=${LOC}
47 dsic.upv.es!antodo 311
	cp ${LOC}/docs/manual.htm ${LOC}/docs/index.html
6 dsic.upv.es!jroman 312
 
2502 jroman 313
# Deletes documentation
314
alldocclean: deletemanualpages allcleanhtml
804 dsic.upv.es!antodo 315
deletemanualpages: chk_loc
316
	-@if [ -d ${LOC} -a -d ${LOC}/docs/manualpages ]; then \
317
          find ${LOC}/docs/manualpages -type f -name "*.html" -exec ${RM} {} \; ;\
318
          ${RM} ${LOC}/docs/manualpages/manualpages.cit ;\
319
        fi
2502 jroman 320
allcleanhtml:
321
	-${OMAKE} ACTION=cleanhtml PETSC_DIR=${PETSC_DIR} alltree
804 dsic.upv.es!antodo 322
 
6 dsic.upv.es!jroman 323
# Builds Fortran stub files
794 dsic.upv.es!antodo 324
allfortranstubs:
2502 jroman 325
	-@${PYTHON} ${SLEPC_DIR}/config/generatefortranstubs.py ${BFORT}
326
deletefortranstubs:
327
	-@find . -type d -name ftn-auto | xargs rm -rf
6 dsic.upv.es!jroman 328
 
329
# -------------------------------------------------------------------------------
330
#
1523 slepc 331
# Some macros to check if the Fortran interface is up-to-date.
6 dsic.upv.es!jroman 332
#
794 dsic.upv.es!antodo 333
countfortranfunctions:
1022 slepc 334
	-@for D in `find ${SLEPC_DIR}/src -name ftn-auto` \
335
	`find ${SLEPC_DIR}/src -name ftn-custom`; do cd $$D; \
336
	egrep '^void' *.c | \
337
	cut -d'(' -f1 | tr -s  ' ' | cut -d' ' -f3 | uniq | egrep -v "(^$$|Petsc)" | \
1025 slepc 338
	sed "s/_$$//"; done | sort > /tmp/countfortranfunctions
6 dsic.upv.es!jroman 339
 
794 dsic.upv.es!antodo 340
countcfunctions:
2502 jroman 341
	-@ ls ${SLEPC_DIR}/include/*.h | grep -v slepcblaslapack.h | \
342
	xargs grep extern | grep "(" | tr -s ' ' | \
6 dsic.upv.es!jroman 343
	cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' |  \
344
	tr 'A-Z' 'a-z' |  sort > /tmp/countcfunctions
345
 
794 dsic.upv.es!antodo 346
difffortranfunctions: countfortranfunctions countcfunctions
1523 slepc 347
	-@echo -------------- Functions missing in the Fortran interface ---------------------
794 dsic.upv.es!antodo 348
	-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2
6 dsic.upv.es!jroman 349
	-@echo ----------------- Functions missing in the C interface ------------------------
794 dsic.upv.es!antodo 350
	-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2
6 dsic.upv.es!jroman 351
	-@${RM}  /tmp/countcfunctions /tmp/countfortranfunctions
352
 
794 dsic.upv.es!antodo 353
checkbadfortranstubs:
6 dsic.upv.es!jroman 354
	-@echo "========================================="
355
	-@echo "Functions with MPI_Comm as an Argument"
356
	-@echo "========================================="
1022 slepc 357
	-@for D in `find ${SLEPC_DIR}/src -name ftn-auto`; do cd $$D; \
358
	grep '^void' *.c | grep 'MPI_Comm' | \
1025 slepc 359
	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3; done
6 dsic.upv.es!jroman 360
	-@echo "========================================="
361
	-@echo "Functions with a String as an Argument"
362
	-@echo "========================================="
1022 slepc 363
	-@for D in `find ${SLEPC_DIR}/src -name ftn-auto`; do cd $$D; \
364
	grep '^void' *.c | grep 'char \*' | \
1025 slepc 365
	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3; done
6 dsic.upv.es!jroman 366
	-@echo "========================================="
794 dsic.upv.es!antodo 367
	-@echo "Functions with Pointers to PETSc Objects as Argument"
6 dsic.upv.es!jroman 368
	-@echo "========================================="
1022 slepc 369
	-@_p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \
6 dsic.upv.es!jroman 370
	cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \
371
	sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \
1022 slepc 372
	_p_OBJS=`grep _p_ ${SLEPC_DIR}/include/*.h | tr -s ' ' | \
373
	cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \
374
	sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \
375
	for D in `find ${SLEPC_DIR}/src -name ftn-auto`; do cd $$D; \
376
	for OBJ in $$_p_OBJ $$_p_OBJS; do \
6 dsic.upv.es!jroman 377
	grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \
1022 slepc 378
	cut -d'(' -f1 | cut -d' ' -f1,4; \
1025 slepc 379
	done; done
6 dsic.upv.es!jroman 380
 
2243 jroman 381
# Generate tags with PETSc's script
382
alletags:
2502 jroman 383
	-@${PYTHON} ${PETSC_DIR}/bin/maint/generateetags.py
384
	-@find config -type f -name "*.py" |grep -v SCCS | xargs etags -o TAGS_PYTHON
1130 slepc 385