|
Packit Service |
c5cf8c |
# -*- Mode: Makefile; -*-
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# (C) 2011 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
# See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ACLOCAL_AMFLAGS = -I confdb -I src/hwloc/config
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# automake requires that we initialize variables to something, even just empty,
|
|
Packit Service |
c5cf8c |
# before appending to them with "+="
|
|
Packit Service |
c5cf8c |
AM_CFLAGS = @VISIBILITY_CFLAGS@ @HWLOC_EMBEDDED_CFLAGS@
|
|
Packit Service |
c5cf8c |
AM_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@
|
|
Packit Service |
c5cf8c |
AM_FFLAGS =
|
|
Packit Service |
c5cf8c |
AM_FCFLAGS =
|
|
Packit Service |
c5cf8c |
include_HEADERS =
|
|
Packit Service |
c5cf8c |
nodist_include_HEADERS =
|
|
Packit Service |
c5cf8c |
nodist_noinst_HEADERS =
|
|
Packit Service |
c5cf8c |
BUILT_SOURCES =
|
|
Packit Service |
c5cf8c |
bin_PROGRAMS =
|
|
Packit Service |
c5cf8c |
bin_SCRIPTS =
|
|
Packit Service |
c5cf8c |
dist_noinst_SCRIPTS = autogen.sh
|
|
Packit Service |
c5cf8c |
noinst_DATA =
|
|
Packit Service |
c5cf8c |
dist_noinst_DATA =
|
|
Packit Service |
c5cf8c |
noinst_HEADERS =
|
|
Packit Service |
c5cf8c |
noinst_LIBRARIES =
|
|
Packit Service |
c5cf8c |
noinst_LTLIBRARIES =
|
|
Packit Service |
c5cf8c |
sysconf_DATA =
|
|
Packit Service |
c5cf8c |
nodist_pkgconfig_DATA =
|
|
Packit Service |
c5cf8c |
CLEANFILES =
|
|
Packit Service |
c5cf8c |
DISTCLEANFILES =
|
|
Packit Service |
c5cf8c |
MAINTAINERCLEANFILES =
|
|
Packit Service |
c5cf8c |
SUFFIXES =
|
|
Packit Service |
c5cf8c |
EXTRA_DIST =
|
|
Packit Service |
c5cf8c |
DOC_SUBDIRS =
|
|
Packit Service |
c5cf8c |
MANDOC_SUBDIRS =
|
|
Packit Service |
c5cf8c |
HTMLDOC_SUBDIRS =
|
|
Packit Service |
c5cf8c |
INSTALL_DATA_LOCAL_TARGETS =
|
|
Packit Service |
c5cf8c |
doc1_src_txt =
|
|
Packit Service |
c5cf8c |
doc3_src_txt =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# add (+=) target names to this variable to add them to the dependencies of the
|
|
Packit Service |
c5cf8c |
# 'clean-local' target
|
|
Packit Service |
c5cf8c |
CLEAN_LOCAL_TARGETS =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# used by nodist_pkgconfig_DATA
|
|
Packit Service |
c5cf8c |
pkgconfigdir = @pkgconfigdir@
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# contains all of the "errnames.txt" files that are used by maint/extracterrmsgs
|
|
Packit Service |
c5cf8c |
# to build src/mpi/errhan/defmsg.h
|
|
Packit Service |
c5cf8c |
errnames_txt_files =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
external_subdirs = @mplsrcdir@ @opasrcdir@ @zmsrcdir@ @hwlocsrcdir@
|
|
Packit Service |
c5cf8c |
external_ldflags = @mpllibdir@ @opalibdir@ @zmlibdir@ @hwloclibdir@ @netloclibdir@
|
|
Packit Service |
c5cf8c |
external_libs = @WRAPPER_LIBS@
|
|
Packit Service |
c5cf8c |
mpi_convenience_libs =
|
|
Packit Service |
c5cf8c |
pmpi_convenience_libs = @opalib@ @mpllib@ @zmlib@ @hwloclib@
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# NOTE on our semi-unconventional usage of DIST_SUBDIRS:
|
|
Packit Service |
c5cf8c |
# The automake manual recommends thinking of DIST_SUBDIRS as the list of all
|
|
Packit Service |
c5cf8c |
# *configured* subdirectories. The normal autotools model involves
|
|
Packit Service |
c5cf8c |
# unconditional configure steps for all/most directories with conditional make
|
|
Packit Service |
c5cf8c |
# steps (i.e., conditional inclusion in SUBDIRS). But in the MPICH case we
|
|
Packit Service |
c5cf8c |
# almost always configure exactly the directories that will be included in
|
|
Packit Service |
c5cf8c |
# SUBDIRS. So most additions to DIST_SUBDIRS should be conditional on the same
|
|
Packit Service |
c5cf8c |
# condition as the corresponding SUBDIRS addition.
|
|
Packit Service |
c5cf8c |
DIST_SUBDIRS = ${external_subdirs}
|
|
Packit Service |
c5cf8c |
SUBDIRS = ${external_subdirs}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
## Automake attempts to guess the correct linker among the various compilers
|
|
Packit Service |
c5cf8c |
## for each language (see "How the Linker is Chosen" in the AM manual).
|
|
Packit Service |
c5cf8c |
## However, this process is static and doesn't assume that you will "disable"
|
|
Packit Service |
c5cf8c |
## Fortran support for a library and still actually build that library.
|
|
Packit Service |
c5cf8c |
## lib@MPILIBNAME@.la contains both C and F77 source, so AM picks "F77LD" as the
|
|
Packit Service |
c5cf8c |
## linker. Instead we manually override automake's choice based on the value of
|
|
Packit Service |
c5cf8c |
## enable_f77.
|
|
Packit Service |
c5cf8c |
if BUILD_F77_BINDING
|
|
Packit Service |
c5cf8c |
# link with libtool+F77LD
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 \
|
|
Packit Service |
c5cf8c |
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(F77LD) \
|
|
Packit Service |
c5cf8c |
$(AM_FFLAGS) $(FFLAGS) $(lib_lib@MPILIBNAME@_la_LDFLAGS) \
|
|
Packit Service |
c5cf8c |
$(LDFLAGS) -o $@
|
|
Packit Service |
c5cf8c |
lib_lib@PMPILIBNAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 \
|
|
Packit Service |
c5cf8c |
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(F77LD) \
|
|
Packit Service |
c5cf8c |
$(AM_FFLAGS) $(FFLAGS) $(lib_lib@PMPILIBNAME@_la_LDFLAGS) \
|
|
Packit Service |
c5cf8c |
$(LDFLAGS) -o $@
|
|
Packit Service |
c5cf8c |
else !BUILD_F77_BINDING
|
|
Packit Service |
c5cf8c |
# link with libtool+CCLD
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
|
Packit Service |
c5cf8c |
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
|
Packit Service |
c5cf8c |
$(lib_lib@MPILIBNAME@_la_CFLAGS) $(CFLAGS) \
|
|
Packit Service |
c5cf8c |
$(lib_lib@MPILIBNAME@_la_LDFLAGS) $(LDFLAGS) -o $@
|
|
Packit Service |
c5cf8c |
lib_lib@PMPILIBNAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
|
Packit Service |
c5cf8c |
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
|
Packit Service |
c5cf8c |
$(lib_lib@PMPILIBNAME@_la_CFLAGS) $(CFLAGS) \
|
|
Packit Service |
c5cf8c |
$(lib_lib@PMPILIBNAME@_la_LDFLAGS) $(LDFLAGS) -o $@
|
|
Packit Service |
c5cf8c |
endif !BUILD_F77_BINDING
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if BUILD_F77_BINDING
|
|
Packit Service |
c5cf8c |
if BUILD_FC_BINDING
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \
|
|
Packit Service |
c5cf8c |
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \
|
|
Packit Service |
c5cf8c |
$(AM_FCFLAGS) $(FCFLAGS) $(lib_lib@MPIFCLIBNAME@_la_LDFLAGS) \
|
|
Packit Service |
c5cf8c |
$(LDFLAGS) -o $@
|
|
Packit Service |
c5cf8c |
else !BUILD_FC_BINDING
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 \
|
|
Packit Service |
c5cf8c |
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(F77LD) \
|
|
Packit Service |
c5cf8c |
$(AM_FFLAGS) $(FFLAGS) $(lib_lib@MPIFCLIBNAME@_la_LDFLAGS) \
|
|
Packit Service |
c5cf8c |
$(LDFLAGS) -o $@
|
|
Packit Service |
c5cf8c |
endif !BUILD_FC_BINDING
|
|
Packit Service |
c5cf8c |
endif BUILD_F77_BINDING
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
## Create lists of files for different libraries
|
|
Packit Service |
c5cf8c |
##
|
|
Packit Service |
c5cf8c |
## mpi_sources: When compiled with -DMPICH_MPI_FROM_PMPI, these files
|
|
Packit Service |
c5cf8c |
## provide "MPI_" public functions for the C bindings and end up in
|
|
Packit Service |
c5cf8c |
## lib@MPILIBNAME@. When compiled without this macro, these files
|
|
Packit Service |
c5cf8c |
## provide "PMPI_" public functions for the C bindings as well as a
|
|
Packit Service |
c5cf8c |
## few other internal MPICH functions, all of which end up in
|
|
Packit Service |
c5cf8c |
## lib@PMPILIBNAME@ (which is the same as lib@MPILIBNAME@ on systems
|
|
Packit Service |
c5cf8c |
## that support weak symbols).
|
|
Packit Service |
c5cf8c |
##
|
|
Packit Service |
c5cf8c |
## mpi_f77_sources: When compiled with -DMPICH_MPI_FROM_PMPI, these
|
|
Packit Service |
c5cf8c |
## files provide the "mpi_" public functions for the F77 bindings and
|
|
Packit Service |
c5cf8c |
## end up in lib@MPIFCLIBNAME@.
|
|
Packit Service |
c5cf8c |
##
|
|
Packit Service |
c5cf8c |
## mpi_fc_sources: When compiled with -DMPICH_MPI_FROM_PMPI, these
|
|
Packit Service |
c5cf8c |
## files provide the "mpi_" public functions for the F90+ bindings and
|
|
Packit Service |
c5cf8c |
## end up in lib@MPIFCLIBNAME@.
|
|
Packit Service |
c5cf8c |
##
|
|
Packit Service |
c5cf8c |
## mpi_cxx_sources: When compiled with -DMPICH_MPI_FROM_PMPI, these
|
|
Packit Service |
c5cf8c |
## files provide the "MPI" public functions for the C++ bindings and
|
|
Packit Service |
c5cf8c |
## end up in lib@MPICXXLIBNAME@.
|
|
Packit Service |
c5cf8c |
##
|
|
Packit Service |
c5cf8c |
## mpi_core_sources: These files are internal non-public functions
|
|
Packit Service |
c5cf8c |
## that are used by all bindings.
|
|
Packit Service |
c5cf8c |
mpi_sources =
|
|
Packit Service |
c5cf8c |
mpi_f77_sources =
|
|
Packit Service |
c5cf8c |
mpi_fc_sources =
|
|
Packit Service |
c5cf8c |
mpi_fc_modules =
|
|
Packit Service |
c5cf8c |
mpi_cxx_sources =
|
|
Packit Service |
c5cf8c |
mpi_core_sources =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
lib_LTLIBRARIES =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# include our subdir automake fragments
|
|
Packit Service |
c5cf8c |
include maint/Makefile.mk
|
|
Packit Service |
c5cf8c |
include src/Makefile.mk
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
# dropping mpi_fc_sources and mpi_cxx_sources from libmpmpi since they
|
|
Packit Service |
c5cf8c |
# don't contribute any PMPI symbols.
|
|
Packit Service |
c5cf8c |
lib_LTLIBRARIES += lib/lib@PMPILIBNAME@.la
|
|
Packit Service |
c5cf8c |
lib_lib@PMPILIBNAME@_la_SOURCES = $(mpi_sources) $(mpi_f77_sources) $(mpi_core_sources)
|
|
Packit Service |
c5cf8c |
lib_lib@PMPILIBNAME@_la_LDFLAGS = $(external_ldflags) $(ABIVERSIONFLAGS)
|
|
Packit Service |
c5cf8c |
lib_lib@PMPILIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS) -DF77_USE_PMPI
|
|
Packit Service |
c5cf8c |
lib_lib@PMPILIBNAME@_la_LIBADD = $(external_libs) $(pmpi_convenience_libs)
|
|
Packit Service |
c5cf8c |
EXTRA_lib_lib@PMPILIBNAME@_la_DEPENDENCIES = $(pmpi_convenience_libs)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# lib@MPILIBNAME@.la might depend on lib@PMPILIBNAME@.la. We add them
|
|
Packit Service |
c5cf8c |
# in that order to lib_LTLIBRARIES so libtool doesn't get
|
|
Packit Service |
c5cf8c |
# confused. (see https://bugzilla.redhat.com/show_bug.cgi?id=91110)
|
|
Packit Service |
c5cf8c |
lib_LTLIBRARIES += lib/lib@MPILIBNAME@.la
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_SOURCES = $(mpi_sources)
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_LDFLAGS = $(ABIVERSIONFLAGS)
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPICH_MPI_FROM_PMPI
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_LIBADD = lib/lib@PMPILIBNAME@.la $(mpi_convenience_libs)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
else !BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
lib_LTLIBRARIES += lib/lib@MPILIBNAME@.la
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_SOURCES = $(mpi_sources) $(mpi_core_sources)
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_LDFLAGS = $(external_ldflags) $(ABIVERSIONFLAGS)
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
Packit Service |
c5cf8c |
lib_lib@MPILIBNAME@_la_LIBADD = $(external_libs) $(pmpi_convenience_libs) $(mpi_convenience_libs)
|
|
Packit Service |
c5cf8c |
EXTRA_lib_lib@MPILIBNAME@_la_DEPENDENCIES = $(pmpi_convenience_libs) $(mpi_convenience_libs)
|
|
Packit Service |
c5cf8c |
endif !BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if BUILD_F77_BINDING
|
|
Packit Service |
c5cf8c |
lib_LTLIBRARIES += lib/lib@MPIFCLIBNAME@.la
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
Packit Service |
c5cf8c |
if BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_CPPFLAGS += -DMPICH_MPI_FROM_PMPI -DUSE_ONLY_MPI_NAMES
|
|
Packit Service |
c5cf8c |
endif BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_SOURCES = $(mpi_f77_sources)
|
|
Packit Service |
c5cf8c |
if BUILD_FC_BINDING
|
|
Packit Service |
c5cf8c |
modinc_HEADERS = $(mpi_fc_modules)
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_SOURCES += $(mpi_fc_sources)
|
|
Packit Service |
c5cf8c |
endif BUILD_FC_BINDING
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_LDFLAGS = $(ABIVERSIONFLAGS)
|
|
Packit Service |
c5cf8c |
lib_lib@MPIFCLIBNAME@_la_LIBADD = lib/lib@MPILIBNAME@.la
|
|
Packit Service |
c5cf8c |
endif BUILD_F77_BINDING
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if BUILD_CXX_BINDING
|
|
Packit Service |
c5cf8c |
lib_LTLIBRARIES += lib/lib@MPICXXLIBNAME@.la
|
|
Packit Service |
c5cf8c |
lib_lib@MPICXXLIBNAME@_la_SOURCES = $(mpi_cxx_sources)
|
|
Packit Service |
c5cf8c |
lib_lib@MPICXXLIBNAME@_la_LDFLAGS = $(ABIVERSIONFLAGS)
|
|
Packit Service |
c5cf8c |
lib_lib@MPICXXLIBNAME@_la_LIBADD = lib/lib@MPILIBNAME@.la
|
|
Packit Service |
c5cf8c |
endif BUILD_CXX_BINDING
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# build the current directory and then the examples directory after everything else
|
|
Packit Service |
c5cf8c |
SUBDIRS += . examples
|
|
Packit Service |
c5cf8c |
DIST_SUBDIRS += . examples test
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
EXTRA_DIST += README CHANGES COPYRIGHT README.envvar
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# README.vin is tricky, we don't actually distribute it when we use release.pl,
|
|
Packit Service |
c5cf8c |
# but we do need to distribute it in order for ./autogen.sh to work
|
|
Packit Service |
c5cf8c |
# correctly on a distribution tarball. For now we distribute it when we "make
|
|
Packit Service |
c5cf8c |
# dist".
|
|
Packit Service |
c5cf8c |
EXTRA_DIST += README.vin
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
testing:
|
|
Packit Service |
c5cf8c |
( cd test && $(MAKE) $(AM_MAKEFLAGS) testing )
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
test-clean:
|
|
Packit Service |
c5cf8c |
( cd test && $(MAKE) $(AM_MAKEFLAGS) clean )
|
|
Packit Service |
c5cf8c |
CLEAN_LOCAL_TARGETS += test-clean
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
## FIXME: this should live in src/env/Makefile.mk. Moving it there
|
|
Packit Service |
c5cf8c |
## will not cause a problem, but it will break the build if another
|
|
Packit Service |
c5cf8c |
## Makefile.mk also decides to create a install-exec-hook target. A
|
|
Packit Service |
c5cf8c |
## better approach might be to have each Makefile.mk append to a
|
|
Packit Service |
c5cf8c |
## common set of rules.
|
|
Packit Service |
c5cf8c |
install-exec-hook:
|
|
Packit Service |
c5cf8c |
for e in ${DESTDIR}${bindir}/@MPICC_NAME@ ${DESTDIR}${bindir}/@MPICXX_NAME@ \
|
|
Packit Service |
c5cf8c |
${DESTDIR}${bindir}/@MPIF77_NAME@ ${DESTDIR}${bindir}/@MPIFORT_NAME@ ; do \
|
|
Packit Service |
c5cf8c |
if test -e $${e} ; then \
|
|
Packit Service |
c5cf8c |
sed -e 's|__PREFIX_TO_BE_FILLED_AT_INSTALL_TIME__|${prefix}|g' \
|
|
Packit Service |
c5cf8c |
-e 's|__EXEC_PREFIX_TO_BE_FILLED_AT_INSTALL_TIME__|${exec_prefix}|g' \
|
|
Packit Service |
c5cf8c |
-e 's|__SYSCONFDIR_TO_BE_FILLED_AT_INSTALL_TIME__|${sysconfdir}|g' \
|
|
Packit Service |
c5cf8c |
-e 's|__INCLUDEDIR_TO_BE_FILLED_AT_INSTALL_TIME__|${includedir}|g' \
|
|
Packit Service |
c5cf8c |
-e 's|__LIBDIR_TO_BE_FILLED_AT_INSTALL_TIME__|${libdir}|g' $${e} > $${e}.tmp ; \
|
|
Packit Service |
c5cf8c |
$(INSTALL_SCRIPT) $${e}.tmp $${e} ; \
|
|
Packit Service |
c5cf8c |
rm -f $${e}.tmp ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
if test -e ${DESTDIR}${bindir}/@MPICXX_NAME@ ; then \
|
|
Packit Service |
c5cf8c |
if test "@MPICXX_NAME@" != "@MPICPP_NAME@" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${bindir} && ln -f -s @MPICXX_NAME@ @MPICPP_NAME@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test -e ${DESTDIR}${bindir}/@MPIFORT_NAME@ ; then \
|
|
Packit Service |
c5cf8c |
if test "@MPIFORT_NAME@" != "@MPIF90_NAME@" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${bindir} && ln -f -s @MPIFORT_NAME@ @MPIF90_NAME@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test -e ${DESTDIR}${bindir}/@MPIFORT_NAME@ -a ! -e ${DESTDIR}${bindir}/@MPIF77_NAME@ ; then \
|
|
Packit Service |
c5cf8c |
if test "@MPIFORT_NAME@" != "@MPIF77_NAME@" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${bindir} && ln -f -s @MPIFORT_NAME@ @MPIF77_NAME@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test -e ${DESTDIR}${libdir}/lib@MPILIBNAME@@SHLIB_EXT@ ; then \
|
|
Packit Service |
c5cf8c |
if test "@MPILIBNAME@" != "mpl" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${libdir} && ln -f -s lib@MPILIBNAME@@SHLIB_EXT@ libmpl@SHLIB_EXT@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test "@MPILIBNAME@" != "opa" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${libdir} && ln -f -s lib@MPILIBNAME@@SHLIB_EXT@ libopa@SHLIB_EXT@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test "@MPILIBNAME@" != "mpich" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${libdir} && ln -f -s lib@MPILIBNAME@@SHLIB_EXT@ libmpich@SHLIB_EXT@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test -e ${DESTDIR}${libdir}/lib@MPIFCLIBNAME@@SHLIB_EXT@ ; then \
|
|
Packit Service |
c5cf8c |
if test "@MPIFCLIBNAME@" != "fmpich" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${libdir} && ln -f -s lib@MPIFCLIBNAME@@SHLIB_EXT@ libfmpich@SHLIB_EXT@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test "@MPIFCLIBNAME@" != "mpichf90" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${libdir} && ln -f -s lib@MPIFCLIBNAME@@SHLIB_EXT@ libmpichf90@SHLIB_EXT@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if test -e ${DESTDIR}${libdir}/lib@MPICXXLIBNAME@@SHLIB_EXT@ ; then \
|
|
Packit Service |
c5cf8c |
if test "@MPICXXLIBNAME@" != "mpichcxx" ; then \
|
|
Packit Service |
c5cf8c |
cd ${DESTDIR}${libdir} && ln -f -s lib@MPICXXLIBNAME@@SHLIB_EXT@ libmpichcxx@SHLIB_EXT@ ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# the configure step checks for the 'lib' dir to decide whether a source
|
|
Packit Service |
c5cf8c |
# directory has been previously used for an in-path build before allowing a
|
|
Packit Service |
c5cf8c |
# VPATH build to continue
|
|
Packit Service |
c5cf8c |
distclean-local:
|
|
Packit Service |
c5cf8c |
-rm -rf $(top_builddir)/lib
|
|
Packit Service |
c5cf8c |
-rm -rf $(top_builddir)/bin
|
|
Packit Service |
c5cf8c |
-rm -rf $(top_builddir)/include
|
|
Packit Service |
c5cf8c |
-rm -rf $(top_builddir)/share
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# created by confdb/aclocal_cache.m4
|
|
Packit Service |
c5cf8c |
DISTCLEANFILES += config.system
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# we can only have one clean-local, so we hook into it via conditionally
|
|
Packit Service |
c5cf8c |
# defined variables in the dependencies section
|
|
Packit Service |
c5cf8c |
clean-local: $(CLEAN_LOCAL_TARGETS)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
uninstall-local:
|
|
Packit Service |
c5cf8c |
for x in @MPICPP_NAME@ @MPIF90_NAME@ @MPIF77_NAME@ ; do \
|
|
Packit Service |
c5cf8c |
rm -f ${DESTDIR}${bindir}/$$x ; \
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
for x in mpl opa mpich fmpich mpichf90 mpichcxx ; do \
|
|
Packit Service |
c5cf8c |
rm -f ${DESTDIR}${libdir}/lib$$x@SHLIB_EXT@ ; \
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# --------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
# coverage rules
|
|
Packit Service |
c5cf8c |
# --------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
.PHONY: coverage
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if BUILD_COVERAGE
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# $(lib_lib@MPILIBNAME@_la_SOURCES) already contains $(mpi_sources)
|
|
Packit Service |
c5cf8c |
# We don't include the $(lib_lib@PMPILIBNAME@_la_SOURCES) here because of gcov's
|
|
Packit Service |
c5cf8c |
# inability to correctly handle multiple object files with the same source file.
|
|
Packit Service |
c5cf8c |
gcov_sources = $(lib_lib@MPILIBNAME@_la_SOURCES)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# local var meaning (for profiling foo/bar/baz.c):
|
|
Packit Service |
c5cf8c |
# dir=foo/bar
|
|
Packit Service |
c5cf8c |
# bname=baz.c
|
|
Packit Service |
c5cf8c |
# aux=baz
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Note that we delete all extra ".gcov" files that were not the direct goal,
|
|
Packit Service |
c5cf8c |
# even though they contain useful information. A more robust solution is needed
|
|
Packit Service |
c5cf8c |
# in the long run, probably one that uses "--long-file-names --preserve-paths"
|
|
Packit Service |
c5cf8c |
# and some postprocessing in a perl script.
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Gcov has no good way to deal with source files that have been compiled twice
|
|
Packit Service |
c5cf8c |
# into two different object files, such as
|
|
Packit Service |
c5cf8c |
# bcast.c --> {bcast.o,lib_libpmpi_la-bcast.o}
|
|
Packit Service |
c5cf8c |
# It still generates a bcast.c.gcov output for each object file. Long file
|
|
Packit Service |
c5cf8c |
# names and preserved paths do not help with this problem.
|
|
Packit Service |
c5cf8c |
# What we can do in this case is to move the second files to a separate
|
|
Packit Service |
c5cf8c |
# directory, rename name, and run gcov on the new files.
|
|
Packit Service |
c5cf8c |
# For the web-based coverage reports, the gcov output for the two files
|
|
Packit Service |
c5cf8c |
# needs to be merged; see maint/gcovmerge .
|
|
Packit Service |
c5cf8c |
# To make it easier to re-run the coverage generation, we copy, rather than
|
|
Packit Service |
c5cf8c |
# move, when there are two object files for each source file.
|
|
Packit Service |
c5cf8c |
# A change to the build procedure broke this target. This is a partial though
|
|
Packit Service |
c5cf8c |
# nearly complete fix to the broken build process. The generated coverage
|
|
Packit Service |
c5cf8c |
# files after the fix appear mostly correct, though there appear to also be
|
|
Packit Service |
c5cf8c |
# errors in the gcov output itself (the format of this output changes
|
|
Packit Service |
c5cf8c |
# frequently). However, the coverage analysis is still valuable and has
|
|
Packit Service |
c5cf8c |
# identified missing tests.
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# The problem:
|
|
Packit Service |
c5cf8c |
# The source file is foo.c
|
|
Packit Service |
c5cf8c |
# gcov expects foo.o, foo.gcno, and foo.gcda files
|
|
Packit Service |
c5cf8c |
# The MPICH build process, unfortunately, does not produce a foo.o file;
|
|
Packit Service |
c5cf8c |
# instead, it produces a .libs/lib_lib@MPILIBNAME@_la-foo.o file (and
|
|
Packit Service |
c5cf8c |
# similarly .libs/lib_lib@MPILIBNAME@_la_foo.gcno etc.
|
|
Packit Service |
c5cf8c |
# This change broke this coverage target. If further changes to the
|
|
Packit Service |
c5cf8c |
# naming conventions for object files are made, make sure that the
|
|
Packit Service |
c5cf8c |
# coverage target is also modified to correspond to those changes.
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
coverage:
|
|
Packit Service |
c5cf8c |
@for file in $(gcov_sources) ; do \
|
|
Packit Service |
c5cf8c |
dir=`dirname $$file` ; \
|
|
Packit Service |
c5cf8c |
bname=`basename $$file` ; \
|
|
Packit Service |
c5cf8c |
aux=`echo $$bname | sed -e 's,\.*$$,,'` ; \
|
|
Packit Service |
c5cf8c |
sname=`echo $$bname | sed -e 's/\.[^\.]*$$//'` ;\
|
|
Packit Service |
c5cf8c |
if [ -s "$$dir/$$sname.o" ] ; then \
|
|
Packit Service |
c5cf8c |
echo "( $(GCOV) -b -f -o $$file $$file && mv $$bname.gcov $$dir )" ; \
|
|
Packit Service |
c5cf8c |
( $(GCOV) -b -f -o $$file $$file && mv $$bname.gcov $$dir ) ; \
|
|
Packit Service |
c5cf8c |
elif [ -s "$$dir/lib_lib@MPILIBNAME@_la-$$sname.o" ] ; then \
|
|
Packit Service |
c5cf8c |
if [ ! -d $$dir-mpi ] ; then mkdir $$dir-mpi ; fi ; \
|
|
Packit Service |
c5cf8c |
echo "Copying name-mangled files to $$dir-mpi" ; \
|
|
Packit Service |
c5cf8c |
for pfile in $$dir/.libs/lib_lib@MPILIBNAME@_la-$$sname.* ; do \
|
|
Packit Service |
c5cf8c |
nfile=`echo $$pfile | sed -e 's/lib_lib@MPILIBNAME@_la-//'` ;\
|
|
Packit Service |
c5cf8c |
nfile=`basename $$nfile` ; \
|
|
Packit Service |
c5cf8c |
echo "cp -p $$pfile $$dir-mpi/$$nfile" ; \
|
|
Packit Service |
c5cf8c |
cp -p $$pfile $$dir-mpi/$$nfile ; \
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
for pfile in $$dir/lib_lib@MPILIBNAME@_la-$$sname.o ; do \
|
|
Packit Service |
c5cf8c |
nfile=`echo $$pfile | sed -e 's/lib_lib@MPILIBNAME@_la-//'` ;\
|
|
Packit Service |
c5cf8c |
nfile=`basename $$nfile` ; \
|
|
Packit Service |
c5cf8c |
echo "( cd $$dir-mpi && $(GCOV) -b -f $$nfile )" ; \
|
|
Packit Service |
c5cf8c |
( cd $$dir-mpi && $(GCOV) -b -f $$nfile ) ; \
|
|
Packit Service |
c5cf8c |
if [ ! -s $$dir-mpi/$$bname.gcov ] ; then \
|
|
Packit Service |
c5cf8c |
echo "No $$bname.gcov file created" ;\
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
mv $$dir-mpi/$$bname.gcov $$dir ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
echo "Missing object file for source $$file" ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
if [ -s "$$dir/lib_lib@PMPILIBNAME@_la-$$sname.o" ] ; then \
|
|
Packit Service |
c5cf8c |
if [ ! -d $$dir-pmpi ] ; then mkdir $$dir-pmpi ; fi ; \
|
|
Packit Service |
c5cf8c |
echo "Copying name-mangled files to $$dir-pmpi" ; \
|
|
Packit Service |
c5cf8c |
for pfile in $$dir/.libs/lib_lib@PMPILIBNAME@_la-$$sname.* ; do \
|
|
Packit Service |
c5cf8c |
nfile=`echo $$pfile | sed -e 's/lib_lib@PMPILIBNAME@_la-//'` ;\
|
|
Packit Service |
c5cf8c |
nfile=`basename $$nfile` ; \
|
|
Packit Service |
c5cf8c |
echo "cp -p $$pfile $$dir-pmpi/$$nfile" ; \
|
|
Packit Service |
c5cf8c |
cp -p $$pfile $$dir-pmpi/$$nfile ; \
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
for pfile in $$dir/lib_lib@PMPILIBNAME@_la-$$sname.o ; do \
|
|
Packit Service |
c5cf8c |
nfile=`echo $$pfile | sed -e 's/lib_lib@PMPILIBNAME@_la-//'` ;\
|
|
Packit Service |
c5cf8c |
nfile=`basename $$nfile` ; \
|
|
Packit Service |
c5cf8c |
echo "( cd $$dir-pmpi && $(GCOV) -b -f $$nfile )" ; \
|
|
Packit Service |
c5cf8c |
( cd $$dir-pmpi && $(GCOV) -b -f $$nfile ) ; \
|
|
Packit Service |
c5cf8c |
if [ -s $$dir/$$bname.gcov ] ; then \
|
|
Packit Service |
c5cf8c |
echo "gcovmerge $$dir-pmpi/$$bname.gcov $$dir/$$bname.gcov > $$dir/$$bname.gcov.merge" ; \
|
|
Packit Service |
c5cf8c |
$(srcdir)/maint/gcovmerge $$dir-pmpi/$$bname.gcov \
|
|
Packit Service |
c5cf8c |
$$dir/$$bname.gcov > $$dir/$$bname.gcov.merge ;\
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
echo "Did not find file $$dir/$$bname.gcov" ; \
|
|
Packit Service |
c5cf8c |
echo "mv $$dir-pmpi/$$bname.gcov $$dir/$$bname.gcov";\
|
|
Packit Service |
c5cf8c |
mv $$dir-pmpi/$$bname.gcov $$dir/$$bname.gcov ; \
|
|
Packit Service |
c5cf8c |
fi ;\
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
rm -f *.gcov ; \
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
for subdir in $(SUBDIRS) - ; do \
|
|
Packit Service |
c5cf8c |
if test "x$$subdir" = "x-" ; then break ; fi ; \
|
|
Packit Service |
c5cf8c |
## SUBDIRS contains "."
|
|
Packit Service |
c5cf8c |
if test "x$$subdir" = "x." ; then \
|
|
Packit Service |
c5cf8c |
: ; \
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
if grep coverage: $$subdir/Makefile >/dev/null 2>&1 ; then \
|
|
Packit Service |
c5cf8c |
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) coverage ) ; \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
CLEAN_LOCAL_TARGETS += coverage-clean
|
|
Packit Service |
c5cf8c |
# heavy handed, but it gets the job done
|
|
Packit Service |
c5cf8c |
coverage-clean:
|
|
Packit Service |
c5cf8c |
-find $(top_builddir) -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" | \
|
|
Packit Service |
c5cf8c |
xargs -n 10 rm -f
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
else !BUILD_COVERAGE
|
|
Packit Service |
c5cf8c |
coverage:
|
|
Packit Service |
c5cf8c |
@echo 'ERROR: MPICH was not configured with "--enable-coverage"'
|
|
Packit Service |
c5cf8c |
exit 1
|
|
Packit Service |
c5cf8c |
endif !BUILD_COVERAGE
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# --------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
# documentation rules
|
|
Packit Service |
c5cf8c |
# --------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Tell make (via the automake SUFFIXES var) that our phony suffixes exist and
|
|
Packit Service |
c5cf8c |
# should be considered when dissecting suffix-based implicit rules. These phony
|
|
Packit Service |
c5cf8c |
# suffix files should NOT be added to a .PHONY target, otherwise make will not
|
|
Packit Service |
c5cf8c |
# use the implicit rules to attempt to build them.
|
|
Packit Service |
c5cf8c |
SUFFIXES += .man-phony .html-phony .man1-phony .html1-phony .man3-phony .html3-phony .txt
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# "make V=1" support for our documentation recipes
|
|
Packit Service |
c5cf8c |
doctextman_verbose = $(doctextman_verbose_$(V))
|
|
Packit Service |
c5cf8c |
doctextman_verbose_ = $(doctextman_verbose_$(AM_DEFAULT_VERBOSITY))
|
|
Packit Service |
c5cf8c |
doctextman_verbose_0 = @echo " DOCTEXTMAN " $@;
|
|
Packit Service |
c5cf8c |
doctexthtml_verbose = $(doctexthtml_verbose_$(V))
|
|
Packit Service |
c5cf8c |
doctexthtml_verbose_ = $(doctexthtml_verbose_$(AM_DEFAULT_VERBOSITY))
|
|
Packit Service |
c5cf8c |
doctexthtml_verbose_0 = @echo " DOCTEXTHTML " $@;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# build dir paths for doc generation, used to override subdir (esp. ROMIO) doc
|
|
Packit Service |
c5cf8c |
# generation locations/options
|
|
Packit Service |
c5cf8c |
mandoc_path1=$(abs_top_builddir)/man/man1
|
|
Packit Service |
c5cf8c |
mandoc_path3=$(abs_top_builddir)/man/man3
|
|
Packit Service |
c5cf8c |
htmldoc_path1=$(abs_top_builddir)/www/www1
|
|
Packit Service |
c5cf8c |
htmldoc_path3=$(abs_top_builddir)/www/www3
|
|
Packit Service |
c5cf8c |
doctext_docnotes=$(abs_top_srcdir)/maint/docnotes
|
|
Packit Service |
c5cf8c |
# Provide an easily replaced url root for the generated index file.
|
|
Packit Service |
c5cf8c |
# You can override this with URL desired in the index file generated by doctext.
|
|
Packit Service |
c5cf8c |
# You can ignore this if you don't use mapnames or tohtml to add links
|
|
Packit Service |
c5cf8c |
# to the MPI manual pages to documents.
|
|
Packit Service |
c5cf8c |
htmldoc_root3="--your-url-here--"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Implicit suffix rules to cause the docs to be built. These are a bit of a
|
|
Packit Service |
c5cf8c |
# hack, but using the implicit rules like this instead of a shell for loop
|
|
Packit Service |
c5cf8c |
# permits make -jN to work.
|
|
Packit Service |
c5cf8c |
.c.man-phony:
|
|
Packit Service |
c5cf8c |
$(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path3) -ext 3 \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
.c.html-phony:
|
|
Packit Service |
c5cf8c |
$(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path3) \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation \
|
|
Packit Service |
c5cf8c |
-index $(htmldoc_path3)/mpi.cit -indexdir $(htmldoc_root3) \
|
|
Packit Service |
c5cf8c |
$(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
.txt.man1-phony:
|
|
Packit Service |
c5cf8c |
$(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path1) -ext 1 \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
.txt.html1-phony:
|
|
Packit Service |
c5cf8c |
$(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path1) \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
.txt.man3-phony:
|
|
Packit Service |
c5cf8c |
$(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path3) -ext 3 \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
.txt.html3-phony:
|
|
Packit Service |
c5cf8c |
$(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path3) \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation \
|
|
Packit Service |
c5cf8c |
-index $(htmldoc_path3)/mpi.cit -indexdir $(htmldoc_root3) \
|
|
Packit Service |
c5cf8c |
$(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# use mandoc-local target to force directory creation before running DOCTEXT
|
|
Packit Service |
c5cf8c |
mandoc:
|
|
Packit Service |
c5cf8c |
test -d $(mandoc_path1) || $(MKDIR_P) $(mandoc_path1)
|
|
Packit Service |
c5cf8c |
test -d $(mandoc_path3) || $(MKDIR_P) $(mandoc_path3)
|
|
Packit Service |
c5cf8c |
$(MAKE) $(AM_MAKEFLAGS) mandoc-local
|
|
Packit Service |
c5cf8c |
mandoc-local: $(mpi_sources:.c=.man-phony) $(doc1_src_txt:.txt=.man1-phony) \
|
|
Packit Service |
c5cf8c |
$(doc3_src_txt:.txt=.man3-phony)
|
|
Packit Service |
c5cf8c |
for subdir in $(MANDOC_SUBDIRS) - ; do \
|
|
Packit Service |
c5cf8c |
if test "x$$subdir" = "x-" ; then break ; fi ; \
|
|
Packit Service |
c5cf8c |
## MANDOC_SUBDIRS might accidentally contain "."
|
|
Packit Service |
c5cf8c |
if test "x$$subdir" = "x." ; then \
|
|
Packit Service |
c5cf8c |
: ; \
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
if grep 'mandoc:' $$subdir/Makefile >/dev/null 2>&1 ; then \
|
|
Packit Service |
c5cf8c |
## make 'mandoc' in subdirectory but tell sub-make to output to the top-level
|
|
Packit Service |
c5cf8c |
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) \
|
|
Packit Service |
c5cf8c |
mandoc_path1=$(mandoc_path1) \
|
|
Packit Service |
c5cf8c |
mandoc_path3=$(mandoc_path3) \
|
|
Packit Service |
c5cf8c |
doctext_docnotes=$(doctext_docnotes) \
|
|
Packit Service |
c5cf8c |
mandoc ) ; \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
# FIXME: the 'mancnst' script need to be committed for this to work
|
|
Packit Service |
c5cf8c |
# (cd $(abs_top_builddir) && $(abs_top_srcdir)/doc/mansrc/mancnst)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# use htmldoc-local target to force directory creation before running DOCTEXT
|
|
Packit Service |
c5cf8c |
# Note that the mpi.cit is appended to by each update, so it must be removed
|
|
Packit Service |
c5cf8c |
# and recreated when the documentation files are updated
|
|
Packit Service |
c5cf8c |
htmldoc:
|
|
Packit Service |
c5cf8c |
test -d $(top_builddir)/www/www1 || $(MKDIR_P) $(top_builddir)/www/www1
|
|
Packit Service |
c5cf8c |
test -d $(top_builddir)/www/www3 || $(MKDIR_P) $(top_builddir)/www/www3
|
|
Packit Service |
c5cf8c |
rm -f $(htmldoc_path3)/mpi.cit
|
|
Packit Service |
c5cf8c |
$(MAKE) $(AM_MAKEFLAGS) htmldoc-local
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
htmldoc-local: $(mpi_sources:.c=.html-phony) $(doc1_src_txt:.txt=.html1-phony) \
|
|
Packit Service |
c5cf8c |
$(doc3_src_txt:.txt=.html3-phony)
|
|
Packit Service |
c5cf8c |
for subdir in $(HTMLDOC_SUBDIRS) - ; do \
|
|
Packit Service |
c5cf8c |
if test "x$$subdir" = "x-" ; then break ; fi ; \
|
|
Packit Service |
c5cf8c |
## HTMLDOC_SUBDIRS might accidentally contain "."
|
|
Packit Service |
c5cf8c |
if test "x$$subdir" = "x." ; then \
|
|
Packit Service |
c5cf8c |
: ; \
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
if grep 'htmldoc:' $$subdir/Makefile >/dev/null 2>&1 ; then \
|
|
Packit Service |
c5cf8c |
## make 'htmldoc' in subdirectory but tell sub-make to output to the top-level
|
|
Packit Service |
c5cf8c |
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) \
|
|
Packit Service |
c5cf8c |
htmldoc_path1=$(htmldoc_path1) \
|
|
Packit Service |
c5cf8c |
htmldoc_path3=$(htmldoc_path3) \
|
|
Packit Service |
c5cf8c |
doctext_docnotes=$(doctext_docnotes) \
|
|
Packit Service |
c5cf8c |
htmldoc ) ; \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
$(srcdir)/maint/createhtmlindex -wwwroot=$(top_builddir)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# install-man does not have a special "-local" target for some reason
|
|
Packit Service |
c5cf8c |
INSTALL_DATA_LOCAL_TARGETS += install-man-local
|
|
Packit Service |
c5cf8c |
# this is a variation on the recipe that was previously generated by simplemake
|
|
Packit Service |
c5cf8c |
install-man-local:
|
|
Packit Service |
c5cf8c |
@dir= ; \
|
|
Packit Service |
c5cf8c |
if test -d $(builddir)/man ; then \
|
|
Packit Service |
c5cf8c |
dir=$(builddir)/man ; \
|
|
Packit Service |
c5cf8c |
elif test -d $(srcdir)/man ; then \
|
|
Packit Service |
c5cf8c |
dir=$(srcdir)/man ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
export dir ; \
|
|
Packit Service |
c5cf8c |
if test ! -z $$dir && test -d $$dir && cd $$dir ; then \
|
|
Packit Service |
c5cf8c |
for name in * ; do \
|
|
Packit Service |
c5cf8c |
if [ "$$name" = "*" ] ; then continue ; fi ; \
|
|
Packit Service |
c5cf8c |
if [ -f $$name ] ; then \
|
|
Packit Service |
c5cf8c |
echo "$(INSTALL_DATA) $$name ${DESTDIR}${mandir}/$$name" ; \
|
|
Packit Service |
c5cf8c |
$(INSTALL_DATA) $$name ${DESTDIR}${mandir}/$$name ; \
|
|
Packit Service |
c5cf8c |
elif [ -d $$name ] ; then \
|
|
Packit Service |
c5cf8c |
if [ ! -d ${DESTDIR}${mandir}/$$name ] ; then $(MKDIR_P) ${DESTDIR}${mandir}/$$name ; fi ;\
|
|
Packit Service |
c5cf8c |
( cd $$name && for name2 in * ; do \
|
|
Packit Service |
c5cf8c |
if [ "$$name2" = "*" ] ; then continue ; fi ; \
|
|
Packit Service |
c5cf8c |
if [ -f $$name2 ] ; then \
|
|
Packit Service |
c5cf8c |
echo "$(INSTALL_DATA) $$name2 ${DESTDIR}${mandir}/$$name/$$name2" ; \
|
|
Packit Service |
c5cf8c |
$(INSTALL_DATA) $$name2 ${DESTDIR}${mandir}/$$name/$$name2 ; \
|
|
Packit Service |
c5cf8c |
elif [ -d $$name2 ] ; then \
|
|
Packit Service |
c5cf8c |
echo "cp -rp $$name2 ${DESTDIR}${mandir}/$$name" ; \
|
|
Packit Service |
c5cf8c |
cp -rp $$name2 ${DESTDIR}${mandir}/$$name ; \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
done ) ; \
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
echo "Unknown file type for $$name" ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
INSTALL_DATA_LOCAL_TARGETS += install-html-local
|
|
Packit Service |
c5cf8c |
install-html-local:
|
|
Packit Service |
c5cf8c |
@dir= ; \
|
|
Packit Service |
c5cf8c |
if test -d $(builddir)/www ; then \
|
|
Packit Service |
c5cf8c |
dir=$(builddir)/www ; \
|
|
Packit Service |
c5cf8c |
elif test -d $(srcdir)/www ; then \
|
|
Packit Service |
c5cf8c |
dir=$(srcdir)/www ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
export dir ; \
|
|
Packit Service |
c5cf8c |
if test ! -z $$dir && test -d $$dir && cd $$dir ; then \
|
|
Packit Service |
c5cf8c |
if [ ! -e ${DESTDIR}${htmldir} ] ; then $(MKDIR_P) ${DESTDIR}${htmldir} ; fi ; \
|
|
Packit Service |
c5cf8c |
for name in * ; do \
|
|
Packit Service |
c5cf8c |
if [ "$$name" = "*" ] ; then continue ; fi ; \
|
|
Packit Service |
c5cf8c |
if [ -f $$name ] ; then \
|
|
Packit Service |
c5cf8c |
echo "$(INSTALL_DATA) $$name ${DESTDIR}${htmldir}/$$name" ; \
|
|
Packit Service |
c5cf8c |
$(INSTALL_DATA) $$name ${DESTDIR}${htmldir}/$$name ; \
|
|
Packit Service |
c5cf8c |
elif [ -d $$name ] ; then \
|
|
Packit Service |
c5cf8c |
if [ ! -d ${DESTDIR}${htmldir}/$$name ] ; then $(MKDIR_P) ${DESTDIR}${htmldir}/$$name ; fi ;\
|
|
Packit Service |
c5cf8c |
( cd $$name && for name2 in * ; do \
|
|
Packit Service |
c5cf8c |
if [ "$$name2" = "*" ] ; then continue ; fi ; \
|
|
Packit Service |
c5cf8c |
if [ -f $$name2 ] ; then \
|
|
Packit Service |
c5cf8c |
echo "$(INSTALL_DATA) $$name2 ${DESTDIR}${htmldir}/$$name/$$name2" ; \
|
|
Packit Service |
c5cf8c |
$(INSTALL_DATA) $$name2 ${DESTDIR}${htmldir}/$$name/$$name2 ; \
|
|
Packit Service |
c5cf8c |
elif [ -d $$name2 ] ; then \
|
|
Packit Service |
c5cf8c |
echo "cp -rp $$name2 ${DESTDIR}${htmldir}/$$name" ; \
|
|
Packit Service |
c5cf8c |
cp -rp $$name2 ${DESTDIR}${htmldir}/$$name ; \
|
|
Packit Service |
c5cf8c |
fi \
|
|
Packit Service |
c5cf8c |
done ) ; \
|
|
Packit Service |
c5cf8c |
else \
|
|
Packit Service |
c5cf8c |
echo "Unknown file type for $$name" ; \
|
|
Packit Service |
c5cf8c |
fi ; \
|
|
Packit Service |
c5cf8c |
done ; \
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
.PHONY: mandoc mandoc-local htmldoc htmldoc-local install-html-local install-man-local
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# build the latex docs in the old style
|
|
Packit Service |
c5cf8c |
latexdoc:
|
|
Packit Service |
c5cf8c |
for dir in $(DOC_SUBDIRS) ; do \
|
|
Packit Service |
c5cf8c |
(cd $$dir && ${MAKE} latexdoc ) ; done
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# install-pdf will not be run by default in a "make install" unless we do this
|
|
Packit Service |
c5cf8c |
INSTALL_DATA_LOCAL_TARGETS += install-pdf-local
|
|
Packit Service |
c5cf8c |
# note that these PDFs are currently built in the srcdir, even in a VPATH
|
|
Packit Service |
c5cf8c |
# build...
|
|
Packit Service |
c5cf8c |
install-pdf-local:
|
|
Packit Service |
c5cf8c |
if [ ! -e ${DESTDIR}${docdir} ] ; then $(MKDIR_P) ${DESTDIR}${docdir} ; fi
|
|
Packit Service |
c5cf8c |
if [ -s $(srcdir)/doc/userguide/user.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/userguide/user.pdf ${DESTDIR}${docdir}/user.pdf ; fi
|
|
Packit Service |
c5cf8c |
if [ -s $(srcdir)/doc/installguide/install.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/installguide/install.pdf ${DESTDIR}${docdir}/install.pdf ; fi
|
|
Packit Service |
c5cf8c |
if [ -s $(srcdir)/doc/logging/logging.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/logging/logging.pdf ${DESTDIR}${docdir}/logging.pdf ; fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
include $(top_srcdir)/doc/Makefile.mk
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# use the _TARGETS var as a workaround for being unable to define multiple
|
|
Packit Service |
c5cf8c |
# -local targets
|
|
Packit Service |
c5cf8c |
install-data-local: $(INSTALL_DATA_LOCAL_TARGETS)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# sometimes helpful when debugging macros to see the preprocessed output.
|
|
Packit Service |
c5cf8c |
# Also using '-CC' because comments provide useful landmarks
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
SUFFIXES += .i
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
.c.i:
|
|
Packit Service |
c5cf8c |
$(COMPILE) -CC -E -o $@ $<
|