From 52369307f827da5d83fcb030ce542898acf3c2c6 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Sat, 29 Apr 2006 02:16:41 +0000 Subject: [PATCH] Add a feature to the build system that Terry from Sun and I talked about in San Jose. Allow the configure option --disable-binaries to build OMPI, but not build or install the support binaries (so basically, just build the libraries). This commit was SVN r9777. --- config/ompi_configure_options.m4 | 8 ++++++++ ompi/tools/ompi_info/Makefile.am | 7 ++++++- ompi/tools/wrappers/Makefile.am | 4 ++++ opal/tools/wrappers/Makefile.am | 18 ++++++++++++------ orte/tools/console/Makefile.am | 11 ++++++----- orte/tools/openmpi/Makefile.am | 7 ++++--- orte/tools/orted/Makefile.am | 8 ++++++-- orte/tools/orteprobe/Makefile.am | 7 ++++++- orte/tools/orterun/Makefile.am | 12 ++++++++---- orte/tools/wrappers/Makefile.am | 4 ++++ 10 files changed, 64 insertions(+), 22 deletions(-) diff --git a/config/ompi_configure_options.m4 b/config/ompi_configure_options.m4 index 07c23458be..2a0dca1885 100644 --- a/config/ompi_configure_options.m4 +++ b/config/ompi_configure_options.m4 @@ -497,4 +497,12 @@ elif test "$with_cross" != "" ; then . "$with_cross" fi +# +# Do we want to install binaries? +# +AC_ARG_ENABLE([binaries], + [AC_HELP_STRING([--enable-binaries], + [Build and install binaries required for Open MPI, such as the wrapper compilers. Useful for multi-lib installations. (default: enabled)])]) +AM_CONDITIONAL([OMPI_INSTALL_BINARIES], [test "$enable_binaries" != "no"]) + ]) diff --git a/ompi/tools/ompi_info/Makefile.am b/ompi/tools/ompi_info/Makefile.am index a51062a962..1c3d150506 100644 --- a/ompi/tools/ompi_info/Makefile.am +++ b/ompi/tools/ompi_info/Makefile.am @@ -36,12 +36,17 @@ AM_CPPFLAGS = \ -DOMPI_F77_ABSOLUTE="\"@OMPI_F77_ABSOLUTE@\"" \ -DOMPI_F90_ABSOLUTE="\"@OMPI_F90_ABSOLUTE@\"" +if OMPI_INSTALL_BINARIES + dist_pkgdata_DATA = help-ompi_info.txt +bin_PROGRAMS = ompi_info + +endif + libs = \ $(top_builddir)/ompi/libmpi.la -bin_PROGRAMS = ompi_info ompi_info_SOURCES = \ components.cc \ ompi_info.h \ diff --git a/ompi/tools/wrappers/Makefile.am b/ompi/tools/wrappers/Makefile.am index 3b19fd032b..57dcebc366 100644 --- a/ompi/tools/wrappers/Makefile.am +++ b/ompi/tools/wrappers/Makefile.am @@ -16,6 +16,8 @@ # $HEADER$ # +if OMPI_INSTALL_BINARIES + dist_pkgdata_DATA = mpicc-wrapper-data.txt \ mpic++-wrapper-data.txt \ mpif77-wrapper-data.txt \ @@ -71,3 +73,5 @@ uninstall-local: $(DESTDIR)$(bindir)/mpif90$(EXEEXT) \ $(DESTDIR)$(pkgdatadir)/mpicxx-wrapper-data.txt endif + +endif diff --git a/opal/tools/wrappers/Makefile.am b/opal/tools/wrappers/Makefile.am index 35fb033c89..800683404b 100644 --- a/opal/tools/wrappers/Makefile.am +++ b/opal/tools/wrappers/Makefile.am @@ -16,6 +16,14 @@ # $HEADER$ # +opal_wrapper_SOURCES = \ + opal_wrapper.c + +opal_wrapper_LDADD = $(top_builddir)/opal/libopal.la +opal_wrapper_DEPENDENCIES = $(top_builddir)/opal/libopal.la + +if OMPI_INSTALL_BINARIES + nodist_pkgdata_DATA = \ opalcc-wrapper-data.txt \ opalc++-wrapper-data.txt @@ -25,12 +33,6 @@ dist_pkgdata_DATA = \ bin_PROGRAMS = opal_wrapper -opal_wrapper_SOURCES = \ - opal_wrapper.c - -opal_wrapper_LDADD = $(top_builddir)/opal/libopal.la -opal_wrapper_DEPENDENCIES = $(top_builddir)/opal/libopal.la - if CASE_SENSITIVE_FS install-exec-hook: (cd $(DESTDIR)$(bindir); rm -f opalcc$(EXEEXT); $(LN_S) opal_wrapper opalcc) @@ -55,3 +57,7 @@ uninstall-local: $(DESTDIR)$(bindir)/opalc++$(EXEEXT) endif + +else + +endif diff --git a/orte/tools/console/Makefile.am b/orte/tools/console/Makefile.am index 5c2be0e90b..af106e074a 100644 --- a/orte/tools/console/Makefile.am +++ b/orte/tools/console/Makefile.am @@ -16,16 +16,20 @@ # $HEADER$ # -dist_pkgdata_DATA = help-orteconsole.txt - libs = \ $(top_builddir)/orte/liborte.la headers = orteconsole.h +if OMPI_INSTALL_BINARIES + +dist_pkgdata_DATA = help-orteconsole.txt + bin_PROGRAMS = \ orteconsole +endif + orteconsole_SOURCES = \ $(headers) \ orteconsole.c @@ -39,6 +43,3 @@ orte_HEADERS = $(headers) else ortedir = $(includedir) endif - -clean-local: - test -z "$(OMPI_CXX_TEMPLATE_REPOSITORY)" || $(RM) -rf $(OMPI_CXX_TEMPLATE_REPOSITORY) diff --git a/orte/tools/openmpi/Makefile.am b/orte/tools/openmpi/Makefile.am index 914b350d85..aebfcca26e 100644 --- a/orte/tools/openmpi/Makefile.am +++ b/orte/tools/openmpi/Makefile.am @@ -20,12 +20,13 @@ libs = \ $(top_builddir)/orte/liborte.la +if OMPI_INSTALL_BINARIES + bin_PROGRAMS = openmpi +endif + openmpi_SOURCES = openmpi.h openmpi.c openmpi_LDADD = $(libs) openmpi_DFLAGS = openmpi_DEPENDENCIES = $(libs) - -clean-local: - test -z "$(OMPI_CXX_TEMPLATE_REPOSITORY)" || $(RM) -rf $(OMPI_CXX_TEMPLATE_REPOSITORY) diff --git a/orte/tools/orted/Makefile.am b/orte/tools/orted/Makefile.am index a0f6edeb6e..87a66beada 100644 --- a/orte/tools/orted/Makefile.am +++ b/orte/tools/orted/Makefile.am @@ -16,14 +16,18 @@ # $HEADER$ # +if OMPI_INSTALL_BINARIES + dist_pkgdata_DATA = help-orted.txt +bin_PROGRAMS = orted + +endif + libs = \ $(top_builddir)/orte/liborte.la headers = orted.h - -bin_PROGRAMS = orted orted_SOURCES = \ $(headers) \ orted.c diff --git a/orte/tools/orteprobe/Makefile.am b/orte/tools/orteprobe/Makefile.am index ef7289c9b8..a17c9e0474 100644 --- a/orte/tools/orteprobe/Makefile.am +++ b/orte/tools/orteprobe/Makefile.am @@ -16,12 +16,17 @@ # $HEADER$ # +if OMPI_INSTALL_BINARIES + dist_pkgdata_DATA = help-orteprobe.txt +bin_PROGRAMS = orteprobe + +endif + libs = \ $(top_builddir)/orte/liborte.la -bin_PROGRAMS = orteprobe orteprobe_SOURCES = \ orteprobe.h \ orteprobe.c diff --git a/orte/tools/orterun/Makefile.am b/orte/tools/orterun/Makefile.am index 55fbb8590d..e44725c5ab 100644 --- a/orte/tools/orterun/Makefile.am +++ b/orte/tools/orterun/Makefile.am @@ -16,8 +16,6 @@ # $HEADER$ # -dist_pkgdata_DATA = help-orterun.txt - # This is not quite in the Automake spirit, but we have to do it. # Since the totalview portion of the library must be built with -g, we # must eliminate the CFLAGS that are passed in here by default (which @@ -30,8 +28,6 @@ CFLAGS = $(CFLAGS_WITHOUT_OPTFLAGS) $(TOTALVIEW_DEBUG_FLAGS) libs = \ $(top_builddir)/orte/liborte.la -bin_PROGRAMS = orterun - orterun_SOURCES = \ main.c \ orterun.c \ @@ -42,6 +38,12 @@ orterun_SOURCES = \ orterun_LDADD = $(libs) orterun_DEPENDENCIES = $(libs) +if OMPI_INSTALL_BINARIES + +bin_PROGRAMS = orterun + +dist_pkgdata_DATA = help-orterun.txt + # AM 1.9.6 seems to have a bug in it's dependencies for install-man if #dist_ and nodist_ are used, so explicitly add to EXTRA_DIST... man_MANS = orterun.1 mpirun.1 mpiexec.1 @@ -63,3 +65,5 @@ mpiexec.1: $(top_srcdir)/orte/tools/orterun/orterun.1 distclean-local: rm -f mpirun.1 mpiexec.1 + +endif diff --git a/orte/tools/wrappers/Makefile.am b/orte/tools/wrappers/Makefile.am index e22978abe9..575cbb37b1 100644 --- a/orte/tools/wrappers/Makefile.am +++ b/orte/tools/wrappers/Makefile.am @@ -16,6 +16,8 @@ # $HEADER$ # +if OMPI_INSTALL_BINARIES + nodist_pkgdata_DATA = \ ortecc-wrapper-data.txt \ ortec++-wrapper-data.txt @@ -44,3 +46,5 @@ uninstall-local: $(DESTDIR)$(bindir)/ortec++$(EXEEXT) endif + +endif