aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelJGilroy <michael.gilroy24@gmail.com>2017-07-27 01:07:16 -0600
committerMichaelJGilroy <michael.gilroy24@gmail.com>2017-07-27 01:07:16 -0600
commitc0005f8213d2ce3f549c5745005d9044182b1225 (patch)
tree630e73310b90babdb224155d02ec99df01b5ef2d
parentcommenting mpi-select_src_* to keep master stablle (diff)
downloadgentoo-mpi-c0005f8213d2ce3f549c5745005d9044182b1225.tar.gz
gentoo-mpi-c0005f8213d2ce3f549c5745005d9044182b1225.tar.bz2
gentoo-mpi-c0005f8213d2ce3f549c5745005d9044182b1225.zip
added mpi_foreach_implementation
-rw-r--r--eclass/mpi-select.eclass40
1 files changed, 40 insertions, 0 deletions
diff --git a/eclass/mpi-select.eclass b/eclass/mpi-select.eclass
index 918fe71..dda7d59 100644
--- a/eclass/mpi-select.eclass
+++ b/eclass/mpi-select.eclass
@@ -92,6 +92,46 @@ mpi_root
echo "/usr/$(get_libdir)/mpi/${PF}"
}
+# @FUNCTION: mpi_foreach_implementation
+# @DESCRIPTION:
+# Iterates through each implementation and executes src_* commands
+mpi_foreach_implementation()
+{
+ debug-print-function ${FUNCNAME} "${@}"
+
+ # [[ -z "${INSTALLED_IMPLEMENTATIONS}" ]] \
+ # die "No mpi implementations detected"
+
+ local status=0
+
+ for implementation in "${MPI_TARGETS}"
+ do
+ # iterate through implementations, repeat same commands for each variant
+ if [[ "${IMPLEMENTATION_LIST}" ~= *"${implementation}"* ]]
+ local BUILD_DIR="${WORKDIR}/build"
+
+ # modeling after multibuild for testing & learning
+ _mpi_run()
+ {
+ local i=1
+ while [[ ${!1} == _* ]];do
+ i+=1
+ done
+
+ [[ ${i} -le ${#} ]]
+ einfo ${@}
+ echo ${@}
+ }
+ else
+ die "invalid implementation!"
+ fi
+
+
+ done
+
+ echo "${status}"
+}
+
# @FUNCTION: _mpi_do
# @DESCRIPTION:
# mpi-sepecific build functions to be called from mpi pkg ebuilds