Skip to content

Commit e1ab66c

Browse files
author
rhc54
committed
Merge pull request open-mpi#692 from miked-mellanox/topic/v1.10_build_plat_patch
BUILD: add support for --with-platform-patches-dir=DIR
2 parents 729b913 + 43725d0 commit e1ab66c

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

config/ompi_load_platform.m4

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,18 @@ AC_DEFUN([OMPI_LOAD_PLATFORM], [
9898
AC_SUBST(OPAL_PARAM_FROM_PLATFORM, "no")
9999
fi
100100

101-
if test -d "$with_platform_patches_dir"; then
102-
patch_dir=$with_platform_patches_dir
103-
else
104-
patch_dir="${with_platform}.patches"
101+
patch_dir="${with_platform}.patches"
102+
if test -n "$with_platform_patches_dir"; then
103+
if test "$with_platform_patches_dir" = "yes"; then
104+
patch_dir="${with_platform}.patches"
105+
elif test "$with_platform_patches_dir" = "no"; then
106+
AC_MSG_NOTICE([Disabling platform patches on user request])
107+
patch_dir=""
108+
elif test -d "$with_platform_patches_dir"; then
109+
patch_dir=$with_platform_patches_dir
110+
else
111+
AC_MSG_ERROR([User provided patches directory: $with_platform_patches_dir not found])
112+
fi
105113
fi
106114

107115
patch_done="${srcdir}/.platform_patches"
@@ -161,15 +169,16 @@ AC_DEFUN([OMPI_LOAD_PLATFORM], [
161169

162170
AC_MSG_NOTICE([Platform patches applied, created stamp file ${patch_done}])
163171
touch ${patch_done}
172+
else
173+
AC_MSG_NOTICE([No platform patches in ${patch_dir}])
164174
fi
165175

166176
else
167177
AC_MSG_WARN([Platform patches already applied, skipping. ${patch_done} can be removed to re-apply ])
168178
fi
169-
else
170-
AC_MSG_NOTICE([No platform patches in ${patch_dir}])
179+
elif test -n "${patch_dir}"; then
180+
AC_MSG_NOTICE([No platform patches in ${patch_dir}])
171181
fi
172-
173182
else
174183
AC_SUBST(OPAL_DEFAULT_MCA_PARAM_CONF, [openmpi-mca-params.conf])
175184
fi

0 commit comments

Comments
 (0)