From a546b6834b16f29a10016649172978f36a42e846 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Mon, 25 Sep 2006 23:51:13 +0000 Subject: [PATCH] Only add the ROMIO source directory into DIST_SUBDIRS and SUBDIRS if the component is configured successfully. Otherwise, we can end up trying to run make in the romio directory without any Makefiles. This really only happens on the targets that recurse into DIST_SUBDIRS - ie dist, maintainer-clean, and distclean refs trac:411 This commit was SVN r11807. The following Trac tickets were found above: Ticket 411 --> https://svn.open-mpi.org/trac/ompi/ticket/411 --- config/ompi_mca.m4 | 3 +++ ompi/mca/io/romio/Makefile.am | 4 ++++ ompi/mca/io/romio/configure.m4 | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/config/ompi_mca.m4 b/config/ompi_mca.m4 index 8b9692222d..977314f42d 100644 --- a/config/ompi_mca.m4 +++ b/config/ompi_mca.m4 @@ -541,6 +541,9 @@ AC_DEFUN([MCA_CONFIGURE_M4_CONFIG_COMPONENT],[ # add component to all component list $4="$$4 $3"]) + m4_ifdef([MCA_$2_$3_POST_CONFIG], + [MCA_$2_$3_POST_CONFIG($should_build)]) + # set the AM_CONDITIONAL on how we should build AS_IF([test "$compile_mode" = "dso"], [BUILD_$2_$3_DSO=1], diff --git a/ompi/mca/io/romio/Makefile.am b/ompi/mca/io/romio/Makefile.am index 61027e2937..93fdbc8031 100644 --- a/ompi/mca/io/romio/Makefile.am +++ b/ompi/mca/io/romio/Makefile.am @@ -23,7 +23,11 @@ sources = include src/Makefile.extra +if MCA_io_romio_SHOULD_BUILD +# Need to set both SUBDIRS and DIST_SUBDIRS due to oddities with AM SUBDIRS = romio +DIST_SUBDIRS = romio +endif # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/io/romio/configure.m4 b/ompi/mca/io/romio/configure.m4 index f6922e25cc..420eaf505b 100644 --- a/ompi/mca/io/romio/configure.m4 +++ b/ompi/mca/io/romio/configure.m4 @@ -17,6 +17,14 @@ # $HEADER$ # +AC_DEFUN([MCA_io_romio_POST_CONFIG], [ + AS_IF([test $1 -eq 0 -a "$enable_dist" = "yes"], + [AC_MSG_ERROR([ROMIO disabled but --enable-dist specifed. This will result in a bad tarball. Aborting configure.])]) + AM_CONDITIONAL([MCA_io_romio_SHOULD_BUILD], [test $1 -eq 1]) + +]) + + # MCA_io_romio_CONFIG([action-if-found], [action-if-not-found]) # ----------------------------------------------------------- AC_DEFUN([MCA_io_romio_CONFIG],[