diff options
author | Julian Ospald <hasufell@gentoo.org> | 2015-10-24 13:57:53 +0200 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2015-10-27 04:04:16 +1100 |
commit | 51c366676fb2b2292a85accce933f228f3a9b5c0 (patch) | |
tree | 8ff3346f8ea6f993ec5dc7c92a1a3bf4ac99f5f7 /eclass/cmake-utils.eclass | |
parent | cmake-utils.eclass: warn when using mycmakeargs as a string (diff) | |
download | gentoo-51c366676fb2b2292a85accce933f228f3a9b5c0.tar.gz gentoo-51c366676fb2b2292a85accce933f228f3a9b5c0.tar.bz2 gentoo-51c366676fb2b2292a85accce933f228f3a9b5c0.zip |
cmake-utils.eclass: add missing '|| die' on pushd/popd
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r-- | eclass/cmake-utils.eclass | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index dd6045a95a03..c92759d3c5f4 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -398,7 +398,7 @@ _modify-cmakelists() { enable_cmake-utils_src_prepare() { debug-print-function ${FUNCNAME} "$@" - pushd "${S}" > /dev/null + pushd "${S}" > /dev/null || die debug-print "$FUNCNAME: PATCHES=$PATCHES" [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" @@ -406,7 +406,7 @@ enable_cmake-utils_src_prepare() { debug-print "$FUNCNAME: applying user patches" epatch_user - popd > /dev/null + popd > /dev/null || die } # @VARIABLE: mycmakeargs @@ -579,11 +579,11 @@ enable_cmake-utils_src_configure() { cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" ) fi - pushd "${BUILD_DIR}" > /dev/null + pushd "${BUILD_DIR}" > /dev/null || die debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}" echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed" - popd > /dev/null + popd > /dev/null || die } enable_cmake-utils_src_compile() { @@ -660,25 +660,25 @@ cmake-utils_src_make() { debug-print-function ${FUNCNAME} "$@" _check_build_dir - pushd "${BUILD_DIR}" > /dev/null + pushd "${BUILD_DIR}" > /dev/null || die ${CMAKE_MAKEFILE_GENERATOR}_src_make "$@" - popd > /dev/null + popd > /dev/null || die } enable_cmake-utils_src_test() { debug-print-function ${FUNCNAME} "$@" _check_build_dir - pushd "${BUILD_DIR}" > /dev/null + pushd "${BUILD_DIR}" > /dev/null || die [[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; } [[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure ) if ctest "${myctestargs[@]}" "$@" ; then einfo "Tests succeeded." - popd > /dev/null + popd > /dev/null || die return 0 else if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then @@ -693,7 +693,7 @@ enable_cmake-utils_src_test() { fi # die might not die due to nonfatal - popd > /dev/null + popd > /dev/null || die return 1 fi } @@ -702,13 +702,13 @@ enable_cmake-utils_src_install() { debug-print-function ${FUNCNAME} "$@" _check_build_dir - pushd "${BUILD_DIR}" > /dev/null + pushd "${BUILD_DIR}" > /dev/null || die DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" || die "died running ${CMAKE_MAKEFILE_GENERATOR} install" - popd > /dev/null + popd > /dev/null || die - pushd "${S}" > /dev/null + pushd "${S}" > /dev/null || die einstalldocs - popd > /dev/null + popd > /dev/null || die } # @FUNCTION: cmake-utils_src_prepare |