From 6fc4dd8eb36709a7b294cea30deedb728994fff3 Mon Sep 17 00:00:00 2001 From: Mike Dubman Date: Wed, 7 Oct 2015 09:31:49 +0300 Subject: [PATCH] BUILD: allow specifying platform patch_dir from cmd line before: patch_dir=$PLATFORM.patches after patch_dir can be specified as ./configure <....> patch_dir=/usr/local/site_ompi_v_x.y_patches/ if not specified - use default --- config/ompi_load_platform.m4 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/ompi_load_platform.m4 b/config/ompi_load_platform.m4 index f71f5b039d1..447c439ced1 100644 --- a/config/ompi_load_platform.m4 +++ b/config/ompi_load_platform.m4 @@ -20,6 +20,10 @@ # OMPI_LOAD_PLATFORM() # -------------------- AC_DEFUN([OMPI_LOAD_PLATFORM], [ + AC_ARG_WITH([platform-patches-dir], + [AC_HELP_STRING([--with-platform-patches-dir=DIR], + [Location of the platform patches directory. If you use this option, you must also use --with-platform.])]) + AC_ARG_WITH([platform], [AC_HELP_STRING([--with-platform=FILE], [Load options for build from FILE. Options on the @@ -94,7 +98,12 @@ AC_DEFUN([OMPI_LOAD_PLATFORM], [ AC_SUBST(OPAL_PARAM_FROM_PLATFORM, "no") fi - patch_dir="${with_platform}.patches" + if test -d "$with_platform_patches_dir"; then + patch_dir=$with_platform_patches_dir + else + patch_dir="${with_platform}.patches" + fi + patch_done="${srcdir}/.platform_patches" patch_found=no