xref: /petsc/makefile (revision 5fde6e02abc9764c098c152d82ac8e8a7ecc60c6)
173f4d377SMatthew Knepley# $Id: makefile,v 1.353 2001/08/28 19:43:38 balay Exp $
211b6ed10SLois Curfman McInnes#
3cfd69a58SBarry Smith# This is the makefile for installing PETSc. See the file
47fc3c18eSBarry Smith# docs/installation.html for directions on installing PETSc.
5cfd69a58SBarry Smith# See also bmake/common for additional commands.
611b6ed10SLois Curfman McInnes#
7716b9c40SSatish BalayALL: all
848b2c0e9SBarry SmithLOCDIR = .
9b16a3bb1SBarry SmithDIRS   = src include docs
10ca5c9d59SMatthew Knepley#
11ca5c9d59SMatthew Knepley# Configuration Variables
12ca5c9d59SMatthew Knepley#
13ca5c9d59SMatthew Knepley# Read configure options from a file if CONFIGURE_OPTIONSis not defined
141fe47f9fSMatthew KnepleyAUTOMAKE               = ${PETSC_DIR}/bin/automake
1519552e71SMatthew KnepleyCONFIGURE_ARCH         = `config/configarch`
1619552e71SMatthew KnepleyCONFIGURE_OPTIONS_FILE = ./config/configure_options.${CONFIGURE_ARCH}
17ca5c9d59SMatthew KnepleyCONFIGURE_OPTIONS      = $(shell cat $(CONFIGURE_OPTIONS_FILE))
18ca5c9d59SMatthew KnepleyCONFIGURE_LOG_FILE     = configure_petsc.log
19ca5c9d59SMatthew KnepleyAUTOMAKE_ADD_FILES     = config/config.guess config/config.sub config/install-sh config/missing config/mkinstalldirs \
20ba1077baSMatthew Knepley                         config/ltmain.sh
21bc87b169SSatish BalayBMAKE_TEMPLATE_FILES   = bmake/config/packages.in bmake/config/rules.in bmake/config/variables.in
2261523587SBarry Smith
23516d1546SSatish Balayinclude ${PETSC_DIR}/bmake/common/base
24516d1546SSatish Balayinclude ${PETSC_DIR}/bmake/common/test
2561523587SBarry Smith
26ca5c9d59SMatthew Knepley#
27ca5c9d59SMatthew Knepley# Configuration Targets
28ca5c9d59SMatthew Knepley#
29ca5c9d59SMatthew Knepleyaclocal.m4: configure.in
30ca5c9d59SMatthew Knepley	@echo "Making $@" >> $(CONFIGURE_LOG_FILE)
31ca5c9d59SMatthew Knepley	@echo "----------------------------------------" >> $(CONFIGURE_LOG_FILE)
32ca5c9d59SMatthew Knepley	@aclocal >> $(CONFIGURE_LOG_FILE)
33c83b6f97SSatish Balay
34ca5c9d59SMatthew Knepleybmake/config/petscconf.h.in: config/acconfig.h config/acsite.m4 configure.in
35ca5c9d59SMatthew Knepley	@echo "Making $@" >> $(CONFIGURE_LOG_FILE)
36ca5c9d59SMatthew Knepley	@echo "----------------------------------------" >> $(CONFIGURE_LOG_FILE)
37ca5c9d59SMatthew Knepley	@autoheader -l config >> $(CONFIGURE_LOG_FILE)
38c83b6f97SSatish Balay
39ca5c9d59SMatthew Knepley$(AUTOMAKE_ADD_FILES):
40ca5c9d59SMatthew Knepley	@echo "Making $@" >> $(CONFIGURE_LOG_FILE)
41ca5c9d59SMatthew Knepley	@echo "----------------------------------------" >> $(CONFIGURE_LOG_FILE)
421fe47f9fSMatthew Knepley	@${AUTOMAKE} --foreign --add-missing --copy Makefile >> $(CONFIGURE_LOG_FILE)
43ca5c9d59SMatthew Knepley
44ca5c9d59SMatthew KnepleyMakefile.am: $(AUTOMAKE_ADD_FILES)
45ca5c9d59SMatthew Knepley
46ca5c9d59SMatthew KnepleyMakefile.in: Makefile.am
47ca5c9d59SMatthew Knepley	@echo "Making $@" >> $(CONFIGURE_LOG_FILE)
48ca5c9d59SMatthew Knepley	@echo "----------------------------------------" >> $(CONFIGURE_LOG_FILE)
491fe47f9fSMatthew Knepley	@${AUTOMAKE} --foreign Makefile >> $(CONFIGURE_LOG_FILE)
50ca5c9d59SMatthew Knepley
51ca5c9d59SMatthew Knepleyconfigure: configure.in config/acsite.m4 aclocal.m4 bmake/config/petscconf.h.in $(AUTOMAKE_ADD_FILES)
52ca5c9d59SMatthew Knepley	@echo "Making $@" >> $(CONFIGURE_LOG_FILE)
53ca5c9d59SMatthew Knepley	@echo "----------------------------------------" >> $(CONFIGURE_LOG_FILE)
54ca5c9d59SMatthew Knepley	@autoconf -l config >> $(CONFIGURE_LOG_FILE)
55ca5c9d59SMatthew Knepley
56ca5c9d59SMatthew Knepleystart_configure:
57ca5c9d59SMatthew Knepley	-@$(RM) $(CONFIGURE_LOG_FILE)
58ca5c9d59SMatthew Knepley
59ca5c9d59SMatthew Knepleyconfigure_petsc: start_configure configure Makefile.in
60ca5c9d59SMatthew Knepley	@echo "Configuring Petsc with options:" >> $(CONFIGURE_LOG_FILE)
61ca5c9d59SMatthew Knepley	@echo "$(CONFIGURE_OPTIONS)" >> $(CONFIGURE_LOG_FILE)
62ca5c9d59SMatthew Knepley	@echo "----------------------------------------" >> $(CONFIGURE_LOG_FILE)
63ca5c9d59SMatthew Knepley	@echo "$(CONFIGURE_OPTIONS)" > $(CONFIGURE_OPTIONS_FILE)
64ca5c9d59SMatthew Knepley	@./configure $(CONFIGURE_OPTIONS) >> $(CONFIGURE_LOG_FILE)
65ca5c9d59SMatthew Knepley
663302b940SMatthew Knepley$(CONFIGURE_OPTIONS_FILE):
678d86d5feSSatish Balay	@touch $(CONFIGURE_OPTIONS_FILE)
683302b940SMatthew Knepley
6919552e71SMatthew Knepley# We allow substring matching so that new configure architectures can be created
70ba1077baSMatthew Knepley$(CONFIGURE_LOG_FILE): $(CONFIGURE_OPTIONS_FILE) $(BMAKE_TEMPLATE_FILES)
7119552e71SMatthew Knepley	@if test `${PETSC_DIR}/config/configarch | awk 'BEGIN {} {print match("${PETSC_ARCH}",$$1)} END{}'` -gt 0; then \
72ba1077baSMatthew Knepley	    $(MAKE) configure_petsc; \
73ba1077baSMatthew Knepley    else \
7419552e71SMatthew Knepley        echo "Petsc is preconfigured for architecture ${PETSC_ARCH}" > $(CONFIGURE_LOG_FILE); \
75ba1077baSMatthew Knepley    fi
76ca5c9d59SMatthew Knepley
77ca5c9d59SMatthew Knepleyconfigure_clean:
78ca5c9d59SMatthew Knepley	-@$(RM) aclocal.m4
79ca5c9d59SMatthew Knepley	-@$(RM) bmake/config/petscconf.h.in
80ca5c9d59SMatthew Knepley	-@$(RM) $(AUTOMAKE_ADD_FILES) Makefile.in
81ca5c9d59SMatthew Knepley	-@$(RM) configure
823677444aSSatish Balay#
833677444aSSatish Balay# Basic targets to build PETSc libraries.
84fa527775SLois Curfman McInnes# all: builds the c, fortran, and f90 libraries
85ba1077baSMatthew Knepleyall: $(CONFIGURE_LOG_FILE)
868d86d5feSSatish Balay	-@${MAKE} all_build
87ba1077baSMatthew Knepley# This is necessary if configure jsut created files to have them reread
88ba1077baSMatthew Knepleyall_build: chk_petsc_dir info info_h chklib_dir deletelibs build shared
89efd74e9bSBarry Smith#
90fa527775SLois Curfman McInnes# Prints information about the system and version of PETSc being compiled
91efd74e9bSBarry Smith#
92efd74e9bSBarry Smithinfo:
93efd74e9bSBarry Smith	-@echo "=========================================="
9411b6dc0cSBarry Smith	-@echo " "
95d76296fbSBarry Smith	-@echo "See docs/troubleshooting.html and docs/bugreporting.html"
96d76296fbSBarry Smith	-@echo "for help with installation problems. Please send EVERYTHING"
97d76296fbSBarry Smith	-@echo "printed out below when reporting problems"
9811b6dc0cSBarry Smith	-@echo " "
9911b6dc0cSBarry Smith	-@echo "To subscribe to the PETSc users mailing list, send mail to "
10011b6dc0cSBarry Smith	-@echo "majordomo@mcs.anl.gov with the message: "
10111b6dc0cSBarry Smith	-@echo "subscribe petsc-users"
10211b6dc0cSBarry Smith	-@echo " "
103d76296fbSBarry Smith	-@echo "=========================================="
1041d91fb6eSBarry Smith	-@echo On `date` on `hostname`
10530fdcc7aSBarry Smith	-@echo Machine characteristics: `uname -a`
106efd74e9bSBarry Smith	-@echo "-----------------------------------------"
10767b024f7SSatish Balay	-@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS}"
108c20d8eedSBarry Smith	-@if [ -n "${C_CCV}" -a "${C_CCV}" != "unknown" ]; then \
109ba1077baSMatthew Knepley        echo "C Compiler version: " `${C_CCV}`; fi
110ba1077baSMatthew Knepley	-@echo "Using C++ compiler: ${CXX} ${COPTFLAGS} ${CCPPFLAGS}"
111c20d8eedSBarry Smith	-@if [ -n "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ]; then \
112ba1077baSMatthew Knepley        echo "C++ Compiler version: " `${CXX_CCV}`; fi
11367b024f7SSatish Balay	-@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}"
11488b81347SBarry Smith	-@if [ -n "${C_FCV}" -a "${C_FCV}" != "unknown" ]; then \
115ba1077baSMatthew Knepley	  echo "Fortran Compiler version: " `${C_FCV}`; fi
11647794344SBarry Smith	-@echo "-----------------------------------------"
117f209c26bSSatish Balay	-@grep PETSC_VERSION_NUMBER ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//"
118f265ae5cSBarry Smith	-@echo "-----------------------------------------"
119d77bb2e1SSatish Balay	-@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}"
12047794344SBarry Smith	-@echo "-----------------------------------------"
121e0e703c1SSatish Balay	-@echo "Using configuration flags:"
12219552e71SMatthew Knepley	-@grep "\#define " ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscconf.h
12347794344SBarry Smith	-@echo "-----------------------------------------"
124d77bb2e1SSatish Balay	-@echo "Using include paths: ${PETSC_INCLUDE}"
12547794344SBarry Smith	-@echo "-----------------------------------------"
126d77bb2e1SSatish Balay	-@echo "Using PETSc directory: ${PETSC_DIR}"
12719552e71SMatthew Knepley	-@echo "Using PETSc arch: ${PETSC_ARCH}"
128efd74e9bSBarry Smith	-@echo "------------------------------------------"
129d77bb2e1SSatish Balay	-@echo "Using C linker: ${CLINKER}"
130d77bb2e1SSatish Balay	-@echo "Using Fortran linker: ${FLINKER}"
131f2b01315SBarry Smith	-@echo "Using libraries: ${PETSC_LIB}"
132efd74e9bSBarry Smith	-@echo "=========================================="
133b8d81f61SBarry Smith#
134b8d81f61SBarry Smith#
13519552e71SMatthew KnepleyMINFO = ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscmachineinfo.h
136b8d81f61SBarry Smithinfo_h:
137ddbfe947SBarry Smith	-@$(RM) -f MINFO ${MINFO}
138c5e9c7dfSBarry Smith	-@echo  "static char *petscmachineinfo = \"  " >> MINFO
13934a92de5SBarry Smith	-@echo  "Libraries compiled on `date` on `hostname` " >> MINFO
140c5e9c7dfSBarry Smith	-@echo  Machine characteristics: `uname -a` "" >> MINFO
141f6a9982fSBarry Smith	-@echo  "Using PETSc directory: ${PETSC_DIR}" >> MINFO
14219552e71SMatthew Knepley	-@echo  "Using PETSc arch: ${PETSC_ARCH}" >> MINFO
14393520af8SSatish Balay	-@echo  "-----------------------------------------\"; " >> MINFO
14493520af8SSatish Balay	-@echo  "static char *petsccompilerinfo = \"  " >> MINFO
145c5e9c7dfSBarry Smith	-@echo  "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS} " >> MINFO
146b8d81f61SBarry Smith	-@if [  "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \
147ec289e47SSatish Balay	  echo  "C Compiler version:"  >> MINFO ; ${C_CCV} >> MINFO 2>&1; fi ; true
148b8d81f61SBarry Smith	-@if [  "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \
149ec289e47SSatish Balay	  echo  "C++ Compiler version:"  >> MINFO; ${CXX_CCV} >> MINFO 2>&1 ; fi ; true
150c5e9c7dfSBarry Smith	-@echo  "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" >> MINFO
151b8d81f61SBarry Smith	-@if [  "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \
152ec289e47SSatish Balay	  echo  "Fortran Compiler version:" >> MINFO ; ${C_FCV} >> MINFO 2>&1 ; fi ; true
15393520af8SSatish Balay	-@echo  "-----------------------------------------\"; " >> MINFO
15493520af8SSatish Balay	-@echo  "static char *petsccompilerflagsinfo = \"  " >> MINFO
155c5e9c7dfSBarry Smith	-@echo  "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" >> MINFO
156c5e9c7dfSBarry Smith	-@echo  "-----------------------------------------" >> MINFO
157c5e9c7dfSBarry Smith	-@echo  "Using configuration flags:" >> MINFO
158c5e9c7dfSBarry Smith	-@echo  "-----------------------------------------" >> MINFO
159c5e9c7dfSBarry Smith	-@echo  "Using include paths: ${PETSC_INCLUDE}" >> MINFO
16093520af8SSatish Balay	-@echo  "------------------------------------------\"; " >> MINFO
16193520af8SSatish Balay	-@echo  "static char *petsclinkerinfo = \"  " >> MINFO
162c5e9c7dfSBarry Smith	-@echo  "Using C linker: ${CLINKER}" >> MINFO
163c5e9c7dfSBarry Smith	-@echo  "Using Fortran linker: ${FLINKER}" >> MINFO
16493520af8SSatish Balay	-@echo  "Using libraries: ${PETSC_LIB} \"; " >> MINFO
16593520af8SSatish Balay	-@cat MINFO | ${SED} -e 's/$$/ \\n\\/' | sed -e 's/\;  \\n\\/\;/'> ${MINFO}
166a21fb8cbSBarry Smith	-@chmod g+w ${MINFO}
1679c0905fcSSatish Balay	-@$(RM) MINFO
1683677444aSSatish Balay#
169fa527775SLois Curfman McInnes# Builds the PETSc libraries
170fa527775SLois Curfman McInnes# This target also builds fortran77 and f90 interface
171f6a9982fSBarry Smith# files and compiles .F files
1723677444aSSatish Balay#
173f6a9982fSBarry Smithbuild:
174efd74e9bSBarry Smith	-@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES"
17547794344SBarry Smith	-@echo "========================================="
1768d86d5feSSatish Balay	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=libfast tree \
177ba1077baSMatthew Knepley         2>&1 | tee make_log_${BOPT} | egrep "(^lib|^*\.c:|Error)"
178*5fde6e02SSatish Balay	-@${RANLIB} ${PETSC_LIB_DIR}/*.${LIB_SUFFIX}
179*5fde6e02SSatish Balay	-@chmod g+w  ${PETSC_LIB_DIR}/*.${LIB_SUFFIX}
1800b3634f8SBarry Smith	-@echo "Completed building libraries"
18147794344SBarry Smith	-@echo "========================================="
18235ca7349SBarry Smith#
183a42cec9dSMatthew Knepley# Builds the PETSc libraries
184a42cec9dSMatthew Knepley# This target is the same as 'build', but uses the 'lib' target instead
185a42cec9dSMatthew Knepley#
186a42cec9dSMatthew Knepleybuild_lt:
187a42cec9dSMatthew Knepley	-@echo "BEGINNING TO COMPILE LIBTOOL LIBRARIES IN ALL DIRECTORIES"
188a42cec9dSMatthew Knepley	-@echo "========================================="
18919552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=lib tree \
1908ba1e511SMatthew Knepley          2>&1 | tee make_log_${BOPT} | egrep "(^lib|^*\.c:|Error)"
191a42cec9dSMatthew Knepley	-@echo "Completed building libraries"
192a42cec9dSMatthew Knepley	-@echo "========================================="
193a42cec9dSMatthew Knepley#
1943677444aSSatish Balay# Builds PETSc test examples for a given BOPT and architecture
1958744090aSBarry Smith#
1963677444aSSatish Balaytestexamples: info chkopts
1973677444aSSatish Balay	-@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES"
1983677444aSSatish Balay	-@echo "Due to different numerical round-off on certain"
1993677444aSSatish Balay	-@echo "machines some of the numbers may not match exactly."
2003677444aSSatish Balay	-@echo "========================================="
20119552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH}  PETSC_DIR=${PETSC_DIR} ACTION=testexamples_1  tree
2023677444aSSatish Balay	-@echo "Completed compiling and running test examples"
2033677444aSSatish Balay	-@echo "========================================="
2043677444aSSatish Balaytestfortran: info chkopts
2053677444aSSatish Balay	-@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES"
2063677444aSSatish Balay	-@echo "========================================="
2073677444aSSatish Balay	-@echo "Due to different numerical round-off on certain"
2083677444aSSatish Balay	-@echo "machines or the way Fortran formats numbers"
2093677444aSSatish Balay	-@echo "some of the results may not match exactly."
2103677444aSSatish Balay	-@echo "========================================="
21119552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_3  tree
2123677444aSSatish Balay	-@echo "Completed compiling and running Fortran test examples"
2133677444aSSatish Balay	-@echo "========================================="
21401c5c36fSSatish Balaytestexamples_uni: info chkopts
21501c5c36fSSatish Balay	-@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES"
21601c5c36fSSatish Balay	-@echo "Due to different numerical round-off on certain"
21701c5c36fSSatish Balay	-@echo "machines some of the numbers may not match exactly."
21801c5c36fSSatish Balay	-@echo "========================================="
21919552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_4  tree
22001c5c36fSSatish Balay	-@echo "Completed compiling and running uniprocessor test examples"
22101c5c36fSSatish Balay	-@echo "========================================="
2223677444aSSatish Balaytestfortran_uni: info chkopts
2233677444aSSatish Balay	-@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES"
2243677444aSSatish Balay	-@echo "Due to different numerical round-off on certain"
2253677444aSSatish Balay	-@echo "machines some of the numbers may not match exactly."
2263677444aSSatish Balay	-@echo "========================================="
22719552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=testexamples_9  tree
2283677444aSSatish Balay	-@echo "Completed compiling and running uniprocessor fortran test examples"
2293677444aSSatish Balay	-@echo "========================================="
230ad96cc0dSLois Curfman McInnes
231f3eacedaSSatish Balay# Ranlib on the libraries
2328c37ef55SBarry Smithranlib:
233*5fde6e02SSatish Balay	${RANLIB} ${PETSC_LIB_DIR}/*.${LIB_SUFFIX}
23461523587SBarry Smith
23511b6ed10SLois Curfman McInnes# Deletes PETSc libraries
236f3eacedaSSatish Balaydeletelibs: chkopts_basic
237b87434adSSatish Balay	-${RM} -f ${PETSC_LIB_DIR}/*
238d44968ceSBarry Smith
239a42cec9dSMatthew Knepley# Cleans up build
240a42cec9dSMatthew Knepleyallclean: deletelibs
24119552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=clean tree
242a42cec9dSMatthew Knepley
243467fbd6dSBarry Smith#
244467fbd6dSBarry Smith#   Updates your PETSc version to the latest set of patches
245467fbd6dSBarry Smith#
246467fbd6dSBarry Smithupdate:
247467fbd6dSBarry Smith	-@bin/petscupdate
2483677444aSSatish Balay
2494918a6b0SSatish Balay#
2504918a6b0SSatish Balay# Check if PETSC_DIR variable specified is valid
2514918a6b0SSatish Balay#
2524918a6b0SSatish Balaychk_petsc_dir:
2534918a6b0SSatish Balay	@if [ ! -f ${PETSC_DIR}/include/petscversion.h ]; then \
2541390f061SBarry Smith	  echo "Incorrect PETSC_DIR specified: ${PETSC_DIR}!"; \
2551390f061SBarry Smith	  echo "You need to use / to separate directories, not \\!"; \
2561390f061SBarry Smith	  echo "Aborting build"; \
2574918a6b0SSatish Balay	  false; fi
2584918a6b0SSatish Balay
2593677444aSSatish Balay# ------------------------------------------------------------------
2603677444aSSatish Balay#
2613677444aSSatish Balay# All remaining actions are intended for PETSc developers only.
2623677444aSSatish Balay# PETSc users should not generally need to use these commands.
2633677444aSSatish Balay#
2643677444aSSatish Balay
26565783a8cSBarry Smith# To access the tags in EMACS, type M-x visit-tags-table and specify
26665783a8cSBarry Smith# the file petsc/TAGS.
26765783a8cSBarry Smith# 1) To move to where a PETSc function is defined, enter M-. and the
26865783a8cSBarry Smith#     function name.
26965783a8cSBarry Smith# 2) To search for a string and move to the first occurrence,
27065783a8cSBarry Smith#     use M-x tags-search and the string.
2717acb7333SLois Curfman McInnes#     To locate later occurrences, use M-,
27211b6ed10SLois Curfman McInnes# Builds all etags files
27311b6ed10SLois Curfman McInnesalletags:
27401c05c5cSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags
27509f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete
27609f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples
27709f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples
27809f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles
27911b6ed10SLois Curfman McInnes# Builds the basic etags file.	This should be employed by most users.
28020563c6bSBarry Smithetags:
28109f7043eSSatish Balay	-${RM} ${TAGSDIR}/TAGS
28209f7043eSSatish Balay	-touch ${TAGSDIR}/TAGS
28309f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree
28441fa366cSBarry Smith	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcej alltree
28509f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree
28609f7043eSSatish Balay	-cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree
28709f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree
28809f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree
28909f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree
29009f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree
29109f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree
29209f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles
29355194d7eSSatish Balay	-chmod g+w TAGS
29429cdf679SBarry Smith# Builds complete etags list; only for PETSc developers.
29529cdf679SBarry Smithetags_complete:
29609f7043eSSatish Balay	-${RM} ${TAGSDIR}/TAGS_COMPLETE
29709f7043eSSatish Balay	-touch ${TAGSDIR}/TAGS_COMPLETE
29809f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree
29941fa366cSBarry Smith	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcej alltree
30009f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree
30109f7043eSSatish Balay	-cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree
30209f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree
30309f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree
30409f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree
30509f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree
30609f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree
30709f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles
30809f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree
30909f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree
31055194d7eSSatish Balay	-chmod g+w TAGS_COMPLETE
31111b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories
312bfce26a3SBarry Smithetags_noexamples:
31309f7043eSSatish Balay	-${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES
31409f7043eSSatish Balay	-touch ${TAGSDIR}/TAGS_NO_EXAMPLES
31509f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree
31641fa366cSBarry Smith	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcej alltree
31709f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree
31809f7043eSSatish Balay	-cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree
31909f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree
32009f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles
32109f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree
32255194d7eSSatish Balay	-chmod g+w TAGS_NO_EXAMPLES
32311b6ed10SLois Curfman McInnes# Builds the etags file for makefiles
324b16a3bb1SBarry Smithetags_makefiles:
3257e0368d4SSatish Balay	-${RM} ${TAGSDIR}/TAGS_MAKEFILES
3267e0368d4SSatish Balay	-touch ${TAGSDIR}/TAGS_MAKEFILES
3277e0368d4SSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree
3287e0368d4SSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles
3297e0368d4SSatish Balay	-chmod g+w TAGS_MAKEFILES
330dc80aa23SSatish Balay# Builds the etags file for examples
331dc80aa23SSatish Balayetags_examples:
33209f7043eSSatish Balay	-${RM} ${TAGSDIR}/TAGS_EXAMPLES
33309f7043eSSatish Balay	-touch ${TAGSDIR}/TAGS_EXAMPLES
33409f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree
33509f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree
33609f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree
33709f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree
33855194d7eSSatish Balay	-chmod g+w TAGS_EXAMPLES
3392176044fSSatish Balayetags_fexamples:
34009f7043eSSatish Balay	-${RM} ${TAGSDIR}/TAGS_FEXAMPLES
34109f7043eSSatish Balay	-touch ${TAGSDIR}/TAGS_FEXAMPLES
34209f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree
34309f7043eSSatish Balay	-${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree
3442176044fSSatish Balay	-chmod g+w TAGS_FEXAMPLES
345b38bb785SSatish Balay#
346f20f7ba3SSatish Balay# These are here for the target allci and allco, and etags
3473677444aSSatish Balay#
348b38bb785SSatish Balay
34923bef294SSatish BalayBMAKEFILES = bmake/common/base bmake/common/test \
350516d1546SSatish Balay	     bmake/common/bopt* bmake/*/rules bmake/*/variables bmake/*/packages \
35123bef294SSatish Balay	     bmake/*/petscconf.h bmake/*/petscfix.h bmake/config/*.in \
3527666ef6eSBarry Smith             bmake/*/buildtest bmake/adic.init bmake/adicmf.init
3532f1ebae6SLois Curfman McInnesDOCS	   = bmake/readme bmake/petscconf.defs
35457c4596dSSatish BalaySCRIPTS    = maint/addlinks maint/builddist maint/buildlinks maint/wwwman \
35557c4596dSSatish Balay	     maint/xclude maint/crontab  \
35657c4596dSSatish Balay	     maint/autoftp include/foldinclude/generateincludes
35711b6ed10SLois Curfman McInnes
3586b91f8d1SSatish Balayupdatewebdocs:
3596b91f8d1SSatish Balay	-chmod -R ug+w /mcs/tmp/petsc-tmp
3606b91f8d1SSatish Balay	-chgrp -R petsc /mcs/tmp/petsc-tmp
3616b91f8d1SSatish Balay	-/bin/rm -rf /mcs/tmp/petscdocs
3626b91f8d1SSatish Balay	-/bin/cp -r /mcs/tmp/petsc-tmp/docs /mcs/tmp/petscdocs
3636b91f8d1SSatish Balay	-maint/update-docs.py /mcs/tmp/petscdocs
3646b91f8d1SSatish Balay	-find /mcs/tmp/petscdocs -type d -name "*" -exec chmod g+w {} \;
3656b91f8d1SSatish Balay	-/bin/cp -r /mcs/tmp/petscdocs/* ${PETSC_DIR}/docs
3666b91f8d1SSatish Balay	-/bin/rm -rf /mcs/tmp/petscdocs
3676b91f8d1SSatish Balay
3687f52c680SSatish Balay# Builds all the documentation - should be done every night
369074fadd8SSatish Balayalldoc: allmanualpages
370e15d8129SBarry Smith	cd docs/tex/manual; ${OMAKE} manual.dvi manual.ps manual.html splitmanual.html
3717f52c680SSatish Balay
3722496ca06SSatish Balay# Deletes man pages (HTML version)
3732496ca06SSatish Balaydeletemanualpages:
374130c9832SBarry Smith	${RM} -f ${LOC}/docs/manualpages/*/*.html \
375130c9832SBarry Smith                 ${LOC}/docs/manualpages/manualpages.cit
3762496ca06SSatish Balay
37711b6ed10SLois Curfman McInnes# Builds all versions of the man pages
378981c4779SBarry Smithallmanualpages: deletemanualpages
379130c9832SBarry Smith	-${OMAKE} ACTION=manualpages_buildcite tree_basic LOC=${LOC}
380130c9832SBarry Smith	-${OMAKE} ACTION=manualpages tree_basic  LOC=${LOC}
38148b2c0e9SBarry Smith	-maint/wwwindex.py ${PETSC_DIR} ${LOC}
382130c9832SBarry Smith	-${OMAKE} ACTION=manexamples tree  LOC=${LOC}
383130c9832SBarry Smith	-${OMAKE} manconcepts  LOC=${LOC}
38448b2c0e9SBarry Smith	-${OMAKE} ACTION=getexlist tree LOC=${LOC}
38548b2c0e9SBarry Smith	-${OMAKE} ACTION=exampleconcepts tree LOC=${LOC}
38648b2c0e9SBarry Smith	-maint/helpindex.py ${PETSC_DIR} ${LOC}
387130c9832SBarry Smith	-@chmod g+w ${LOC}/docs/manualpages/*/*.html
388e01137a2SSatish Balay
389435da068SBarry Smith# Builds .html versions of the source
390435da068SBarry Smithallhtml:
391779f5535SBarry Smith	-${OMAKE} ACTION=html PETSC_DIR=${PETSC_DIR} tree LOC=${LOC}
392435da068SBarry Smith
393115a300dSBarry Smithallcleanhtml:
394115a300dSBarry Smith	-${OMAKE} ACTION=cleanhtml PETSC_DIR=${PETSC_DIR} tree
395395565bcSBarry Smith
39611b6ed10SLois Curfman McInnes# Builds Fortran stub files
39711b6ed10SLois Curfman McInnesallfortranstubs:
398807270aaSBarry Smith	-@include/foldinclude/generateincludes ${PETSC_DIR}
399d77bb2e1SSatish Balay	-@${RM} -f src/fortran/auto/*.c
400bbe92fcfSSatish Balay	-${OMAKE} ACTION=fortranstubs tree_basic
4010a0eb2c5SBarry Smith	chmod g+w src/fortran/auto/*.c
402807270aaSBarry Smith	-@cd src/fortran/auto; ${RM} makefile.src; echo SOURCEC = `find . -type f -name "*.c" -printf "%f "` > makefile.src
403807270aaSBarry Smith	-@cd src/fortran/auto; ${OMAKE} fixfortran
404f6ff2982SSatish Balay
405d55938c2SBarry Smithallci:
40619552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci  alltree
407b951964fSBarry Smith
408d55938c2SBarry Smithallco:
40919552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co  alltree
410d55938c2SBarry Smith
411791d64f4SSatish Balay# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28
412791d64f4SSatish Balayallrcslabel:
41319552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel  alltree
414b334301eSBarry Smith#
415b334301eSBarry Smith#   The commands below are for generating ADIC versions of the code;
416b334301eSBarry Smith# they are not currently used.
417b334301eSBarry Smith#
4185eea60f9SBarry Smithalladicignore:
419b87434adSSatish Balay	-@${RM} ${INSTALL_LIB_DIR}/adicignore
42019552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore  tree
4215eea60f9SBarry Smith
4225eea60f9SBarry Smithalladic:
423d18b0ea7SBarry Smith	-@echo "Beginning to compile ADIC source code in all directories"
42467b024f7SSatish Balay	-@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}"
425d18b0ea7SBarry Smith	-@echo "========================================="
42647794344SBarry Smith	-@cd include ; \
42767b024f7SSatish Balay           ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h
42819552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic  tree
42947794344SBarry Smith	-@cd src/inline ; \
43019552e71SMatthew Knepley            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic
43177ed5343SBarry Smith	-@cd src/blaslapack ; \
43219552e71SMatthew Knepley            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic  tree
4336e81b665SBarry Smith
43447794344SBarry Smithalladiclib:
435d18b0ea7SBarry Smith	-@echo "Beginning to compile ADIC libraries in all directories"
436d77bb2e1SSatish Balay	-@echo "Using compiler: ${CC} ${COPTFLAGS}"
437d18b0ea7SBarry Smith	-@echo "-----------------------------------------"
438d77bb2e1SSatish Balay	-@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}"
439d18b0ea7SBarry Smith	-@echo "-----------------------------------------"
440e0e703c1SSatish Balay	-@echo "Using configuration flags:"
441ba1077baSMatthew Knepley	-@grep "define " bmake/${INLUDE_ARCH}/petscconf.h
442d18b0ea7SBarry Smith	-@echo "-----------------------------------------"
443d77bb2e1SSatish Balay	-@echo "Using include paths: ${PETSC_INCLUDE}"
444d18b0ea7SBarry Smith	-@echo "-----------------------------------------"
445d77bb2e1SSatish Balay	-@echo "Using PETSc directory: ${PETSC_DIR}"
44619552e71SMatthew Knepley	-@echo "Using PETSc arch: ${PETSC_ARCH}"
447d18b0ea7SBarry Smith	-@echo "========================================="
448*5fde6e02SSatish Balay	-@${RM} -f  ${INSTALL_LIB_DIR}/*adic.${LIB_SUFFIX}
44919552e71SMatthew Knepley	-@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib  tree
45077ed5343SBarry Smith	-@cd src/blaslapack ; \
45119552e71SMatthew Knepley            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib  tree
4527e351921SBarry Smith	-@cd src/adic/src ; \
45319552e71SMatthew Knepley            ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib
4545eea60f9SBarry Smith
4559e417c50SSatish Balay# -------------------------------------------------------------------------------
4569e417c50SSatish Balay#
4579e417c50SSatish Balay# Some macros to check if the fortran interface is up-to-date.
4589e417c50SSatish Balay#
4599e417c50SSatish Balaycountfortranfunctions:
460d77bb2e1SSatish Balay	-@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \
46185c7cd6cSSatish Balay	cut -d'(' -f1 | tr -s  ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \
4629e417c50SSatish Balay	sed "s/_$$//" | sort > /tmp/countfortranfunctions
463b334301eSBarry Smith
4649e417c50SSatish Balaycountcfunctions:
46585c7cd6cSSatish Balay	-@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \
46685c7cd6cSSatish Balay	cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' |  \
4679e417c50SSatish Balay	tr 'A-Z' 'a-z' |  sort > /tmp/countcfunctions
4689e417c50SSatish Balay
4699e417c50SSatish Balaydifffortranfunctions: countfortranfunctions countcfunctions
4709e417c50SSatish Balay	-@echo -------------- Functions missing in the fortran interface ---------------------
4719700b7f8SSatish Balay	-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2
4729e417c50SSatish Balay	-@echo ----------------- Functions missing in the C interface ------------------------
4739700b7f8SSatish Balay	-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2
474d77bb2e1SSatish Balay	-@${RM}  /tmp/countcfunctions /tmp/countfortranfunctions
475b334301eSBarry Smith
4763f4c9a3aSSatish Balaycheckbadfortranstubs:
4773f4c9a3aSSatish Balay	-@echo "========================================="
4783f4c9a3aSSatish Balay	-@echo "Functions with MPI_Comm as an Argument"
4793f4c9a3aSSatish Balay	-@echo "========================================="
480d77bb2e1SSatish Balay	-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \
48185c7cd6cSSatish Balay	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
4823f4c9a3aSSatish Balay	-@echo "========================================="
4833f4c9a3aSSatish Balay	-@echo "Functions with a String as an Argument"
4843f4c9a3aSSatish Balay	-@echo "========================================="
485d77bb2e1SSatish Balay	-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \
48685c7cd6cSSatish Balay	tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
4873f4c9a3aSSatish Balay	-@echo "========================================="
4883f4c9a3aSSatish Balay	-@echo "Functions with Pointers to PETSc Objects as Argument"
4893f4c9a3aSSatish Balay	-@echo "========================================="
490d77bb2e1SSatish Balay	-@cd ${PETSC_DIR}/src/fortran/auto; \
49185c7cd6cSSatish Balay	_p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \
49285c7cd6cSSatish Balay	cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \
4933f4c9a3aSSatish Balay	sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \
4943f4c9a3aSSatish Balay	for OBJ in $$_p_OBJ; do \
49585c7cd6cSSatish Balay	grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \
4963f4c9a3aSSatish Balay	cut -d'(' -f1 | cut -d' ' -f1,3; \
4973f4c9a3aSSatish Balay	done
4983677444aSSatish Balay# Builds noise routines (not yet publically available)
4993677444aSSatish Balay# Note:	 libfast cannot run on .F files on certain machines, so we
5003677444aSSatish Balay# use lib and check for errors here.
50171fcab10SSatish Balaynoise: info chklib_dir
5023677444aSSatish Balay	-@echo "Beginning to compile noise routines"
5033677444aSSatish Balay	-@echo "========================================="
5043677444aSSatish Balay	-@cd src/snes/interface/noise; \
50519552e71SMatthew Knepley	  ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \
5063677444aSSatish Balay	  grep -v clog trashz | grep -v "information sections" | \
5073677444aSSatish Balay	  egrep -i '(Error|warning|Can)' >> /dev/null;\
5083677444aSSatish Balay	  if [ "$$?" != 1 ]; then \
5093677444aSSatish Balay	  cat trashz ; fi; ${RM} trashz
510*5fde6e02SSatish Balay	${RANLIB} ${INSTALL_LIB_DIR}/libpetscsnes.${LIB_SUFFIX}
511*5fde6e02SSatish Balay	-@chmod g+w  ${INSTALL_LIB_DIR}/libpetscsnes.${LIB_SUFFIX}
5123677444aSSatish Balay	-@echo "Completed compiling noise routines"
5133677444aSSatish Balay	-@echo "========================================="
5143677444aSSatish Balay
5154556b810SBarry Smith#
5164556b810SBarry Smith# Automatically generates PETSc exercises in html from the tutorial examples.
517b6ea66eeSBarry Smith#
518b6ea66eeSBarry Smith# The introduction for each section is obtained from docs/manualpages/bop.${MANSEC} is under RCS and may be edited
519b6ea66eeSBarry Smith#  (used also in introductions to the manual pages)
520b6ea66eeSBarry Smith# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited
521b6ea66eeSBarry Smith# The list of exercises is from TUTORIALS in each directory's makefile
522b6ea66eeSBarry Smith#
5234556b810SBarry Smith# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced.
5244556b810SBarry Smith# The pagemaker rule is in the file bmake/common (at the bottom)
5254556b810SBarry Smith#
526843ae28eSBarry Smith# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed
52797e8d271SBarry Smith#	-@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker
528843ae28eSBarry Smith#
52997e8d271SBarry Smithexercises:
53097e8d271SBarry Smith	-@echo "========================================="
53197e8d271SBarry Smith	-@echo "Generating HTML tutorial exercises"
532467fbd6dSBarry Smith	-@${RM} docs/pageform.txt
53397e8d271SBarry Smith	-@echo "title=\"PETSc Exercises\""                >  docs/pageform.txt
53497e8d271SBarry Smith	-@echo "access_title=Exercise Sections"              >>  docs/pageform.txt
535beb1b3a5SBarry Smith	-@echo "access_format=short"                        >> docs/pageform.txt
53697e8d271SBarry Smith	-@echo "startpage=../exercises/introduction.htm"  >> docs/pageform.txt
53797e8d271SBarry Smith	-@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt
53897e8d271SBarry Smith	-@echo "Generating HTML for individual directories"
53997e8d271SBarry Smith	-@echo "========================================="
540beb1b3a5SBarry Smith	-@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree
54197e8d271SBarry Smith	-@echo "Completed HTML for individual directories"
54297e8d271SBarry Smith	-@echo "NONE title=\"<HR>\" " >> docs/pageform.txt;
54397e8d271SBarry Smith	-@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt
54497e8d271SBarry Smith	/home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises
54597e8d271SBarry Smith	-@echo "========================================="
54697e8d271SBarry Smith
547db87f17aSMatthew Knepley.PHONY: info info_h build build_lt testexamples testfortran testexamples_uni testfortran_uni ranlib deletelibs allclean update chk_petsc_dir \
548a42cec9dSMatthew Knepley        alletags etags etags_complete etags_noexamples etags_makefiles etags_examples etags_fexamples updatewebdocs alldoc allmanualpages \
549a42cec9dSMatthew Knepley        allhtml allcleanhtml allfortranstubs allci allco allrcslabel alladicignore alladic alladiclib countfortranfunctions \
550ca5c9d59SMatthew Knepley        start_configure configure_petsc configure_clean
55197e8d271SBarry Smith
552