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