Subversion Repositories slepc-dev

Rev

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

Rev Author Line No. Line
1522 slepc 1
include ${PETSC_DIR}/conf/rules
2
 
3
chkslepc_dir:
2249 jroman 4
	@mypwd=`pwd`; cd ${SLEPC_DIR} 2>&1 > /dev/null; true_SLEPC_DIR=`pwd`; cd $${mypwd} 2>&1 >/dev/null; \
1522 slepc 5
        newpwd=`echo $${mypwd} | sed "s+$${true_SLEPC_DIR}+DUMMY+g"`;\
6
        hasslepc=`echo $${mypwd} | sed "s+slepc-+DUMMY+g"`;\
7
        if [ $${mypwd} = $${newpwd} -a $${hasslepc} != $${mypwd} ]; then \
8
          echo "*********************Warning*************************" ; \
2249 jroman 9
          echo "Your SLEPC_DIR may not match the directory you are in";\
10
          echo "SLEPC_DIR " $${true_SLEPC_DIR} "Current directory" $${mypwd};\
1522 slepc 11
          echo "******************************************************" ; \
12
        fi
13
 
14
slepc_manualpages:
15
	-@if [ "${MANSEC}" != "" ] ; then \
16
	  DOCTEXT_PATH=${PETSC_DIR}/src/docs/tex/doctext; export DOCTEXT_PATH; \
17
	  ${DOCTEXT} -html \
18
		-mpath ${LOC}/docs/manualpages/${MANSEC} -heading SLEPc \
19
		-defn ${SLEPC_DIR}/src/docs/tex/doctext/html.def \
20
		-locdir ${LOCDIR} -mapref ${LOC}/docs/manualpages/manualpages.cit \
21
		${SOURCEC} ${SOURCEH}; \
22
		chmod -f g+w ${LOC}/docs/manualpages/${MANSEC}/* ; fi
23
 
24
slepc_html:
25
	-@sed -e s?man+../?man+ROOT/docs/manualpages/? ${LOC}/docs/manualpages/manualpages.cit > /tmp/$$USER.htmlmap
26
	-@cat ${PETSC_DIR}/src/docs/mpi.www.index >> /tmp/$$USER.htmlmap
27
	-@ROOT=`echo ${LOCDIR} | sed -e s?/[a-z]*?/..?g -e s?src/??g -e s?include/??g` ;\
28
          loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`;  \
29
          ${MKDIR} -p $${loc} ;\
30
          for i in ${SOURCEC} ${SOURCEF} ${SOURCEH} ${EXAMPLESC} ${EXAMPLESF} ${EXAMPLESCH} ${EXAMPLESFH} ${EXAMPLESMATLAB} foo ; do\
31
	    if [ -f $$i ]; then \
32
              iroot=`echo $$i | sed -e "s?[a-z.]*/??g"`;\
33
              IROOT=`echo $${i} | sed -e s?[.][.]??g` ;\
34
              if [ "$${IROOT}" != "$${i}" ] ; then \
35
                IROOT=".."; \
36
              else \
37
                IROOT=$${ROOT};\
38
              fi;\
39
              ${RM} $${loc}/$$i.html; \
40
              echo "<center><a href=\"$${iroot}\">Actual source code: $${iroot}</a></center><br>" > $${loc}/$$i.html; \
41
              sed -e "s/CHKERRQ(ierr);//g" -e "s/PetscFunctionReturn(0)/return(0)/g"  \
42
              -e "s/ierr [ ]*= //g"  $$i | ${C2HTML} -n  | ${PETSC_DIR}/bin/maint/fixinclude $$i $${ROOT} | \
43
              egrep -v '(PetscValid|PetscFunctionBegin|PetscCheck|PetscErrorCode ierr;|#if !defined\(__|#define __|#undef __|EXTERN_C|extern )' | \
44
              ${MAPNAMES} -map /tmp/$$USER.htmlmap -inhtml | sed -e s?ROOT?$${IROOT}?g >> $${loc}/$$i.html ; \
45
	    fi; \
46
         done
47
	-@ROOT=`echo ${LOCDIR} | sed -e s?/[a-z]*?/..?g -e s?src/??g -e s?include/??g` ;\
48
          loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`; ${RM} $${loc}/index.html; \
49
          cat ${SLEPC_DIR}/src/docs/manualpages-sec/header_${MANSEC} | sed -e "s?<A HREF=\"PETSC_DIR[a-z/]*\">Examples</A>?<A HREF=\"$${ROOT}/docs/manualpages/${MANSEC}\">Manual pages</A>?g" -e "s?PETSC_DIR?$${ROOT}/?g"> $${loc}/index.html; \
50
          echo "<p>" >> $${loc}/index.html
51
	-@loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`;\
52
            if [ "${EXAMPLESC}" != "" ] ; then \
53
               for file in ${EXAMPLESC} foo ; do \
54
		if [ -f $$file ]; then \
55
                   cmess=`grep "static char help" $${file} | cut -d\" -f2 | cut -d\. -f1`; \
56
                   echo "<a href=\"$${file}.html\">$${file}: $${cmess}</a><br>" >> $${loc}/index.html;\
57
		fi; \
58
               done ;\
59
            else \
60
               for file in ${DIRS} foo; do \
61
		 if [ -d $$file ]; then \
62
                   echo "<a href=\"$${file}/\">$${file}/</a><br>" >> $${loc}/index.html; \
63
		 fi; \
64
               done; \
65
               echo " " >> $${loc}/index.html; \
66
               for file in ${SOURCEH} ${SOURCEC} ${SOURCEF} foo ; do \
67
		 if [ -f $$file ]; then \
68
                   echo "<a href=\"$${file}.html\">$${file}</a><br>" >> $${loc}/index.html; \
69
		 fi; \
70
               done; \
71
            fi ;\
72
            echo " " >> $${loc}/index.html; \
73
            echo "<a href=\"makefile.html\">makefile</a><br>" >> $${loc}/index.html
74
	-@loc=`pwd | sed -e s?\$${PETSC_DIR}?$${LOC}/?g -e s?/disks??g`;  \
75
	   cat makefile | ${C2HTML}  | ${MAPNAMES} -map /tmp/$$USER.htmlmap -inhtml > $${loc}/makefile.html
76
	-@${RM} /tmp/$$USER.htmlmap tmp
1714 jroman 77
 
2266 jroman 78
slepctree: ${ACTION}
79
	-@for dir in ${DIRS} ftn-auto ftn-custom f90-custom; do \
80
            if [ -d $$dir ]; then \
2278 eromero 81
              if [ "${PETSC_ARCH}" = "arch-installed-petsc" ]; then \
2277 jroman 82
                PETSCCONF="${PETSC_DIR}/include/petscconf.h" ; \
83
              else \
84
                PETSCCONF="${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h" ; \
85
              fi; \
2266 jroman 86
	      r=`grep -w requirespackage $$dir/makefile`; \
87
              if [ "$$?" = 0 ]; then \
88
		PKGFLG=`echo $$r | cut -d \' -f2`;\
2277 jroman 89
                grep -w "#define $${PKGFLG}" $${PETSCCONF} > /dev/null; \
2266 jroman 90
                if [ "$$?" = 1 ]; then \
2395 jroman 91
                  continue; \
2266 jroman 92
                fi; \
93
              fi; \
94
	      r=`grep -w requiresfunction $$dir/makefile`; \
95
              if [ "$$?" = 0 ]; then \
96
		PKGFLG=`echo $$r | cut -d \' -f2`;\
2277 jroman 97
                grep -w "#define $${PKGFLG}" $${PETSCCONF} > /dev/null; \
2266 jroman 98
                if [ "$$?" = 1 ]; then \
2395 jroman 99
                  continue; \
2266 jroman 100
                fi; \
101
              fi; \
102
	      r=`grep -w requiresdefine $$dir/makefile`; \
103
              if [ "$$?" = 0 ]; then \
104
		PKGFLG=`echo $$r | cut -d \' -f2`;\
105
                grep -w "#define $${PKGFLG}" ${SLEPC_DIR}/${PETSC_ARCH}/include/slepcconf.h > /dev/null; \
106
                if [ "$$?" = 1 ]; then \
2277 jroman 107
                  grep -w "#define $${PKGFLG}" $${PETSCCONF} > /dev/null; \
2267 jroman 108
                  if [ "$$?" = 1 ]; then \
2395 jroman 109
                    continue; \
2266 jroman 110
                  fi; \
111
                fi; \
112
              fi; \
113
              r=`grep -w requireslanguage $$dir/makefile`; \
114
              if [ "$$?" = 0 ]; then \
115
                echo $$r | grep -w ${PETSC_LANGUAGE} > /dev/null; \
116
                if [ "$$?" = 1 ]; then \
117
                  continue; \
118
                fi; \
119
              fi; \
120
              r=`grep -w requiresscalar $$dir/makefile`; \
121
              if [ "$$?" = 0 ]; then \
122
                echo $$r |  grep -w ${PETSC_SCALAR} > /dev/null; \
123
                if [ "$$?" = 1 ]; then \
124
                  continue; \
125
                fi; \
126
              fi; \
127
              r=`grep -w requiresprecision $$dir/makefile`; \
128
              if [ "$$?" = 0 ]; then \
129
                echo $$r |  grep -w ${PETSC_PRECISION} > /dev/null; \
130
                if [ "$$?" = 1 ]; then \
131
                  continue; \
132
                fi; \
133
              fi; \
134
            else \
135
              continue; \
136
            fi; \
137
            (cd $$dir ; \
138
            echo ${ACTION} in: `pwd`; \
2267 jroman 139
            ${OMAKE} slepctree ACTION=${ACTION}  PETSC_ARCH=${PETSC_ARCH} LOC=${LOC} DATAFILESPATH=${DATAFILESPATH} BASE_DIR=${BASE_DIR});\
2266 jroman 140
	  done
141
 
2477 jroman 142
# uses the cmake infrastructure to build/rebuild the libraries
143
slepc_cmake:
144
	make -j ${MAKE_NP} -C ${SLEPC_DIR}/${PETSC_ARCH}
145
 
1714 jroman 146
include ${SLEPC_DIR}/${PETSC_ARCH}/conf/slepcrules