#!/bin/bash # # Copyright (C) 2009, 2010 by Marc Kleine-Budde # # See CREDITS for details about who has contributed to this project. # # For further information about the PTXdist project and license conditions # see the README file. # # # perform sanity check # ptxd_make_world_prepare_sanity_check() { if [ "${pkg_conf_tool}" = "autoconf" -a \! -x "${pkg_conf_dir_abs}/configure" ]; then cat >&2 <&2 <&2 <&2 < assume the package has nothing to configure. return fi # delete existing build_dir if [ -n "${pkg_build_oot}" ]; then rm -rf -- "${pkg_build_dir}" && mkdir -p -- "${pkg_build_dir}" || return fi case "${pkg_conf_tool}" in autoconf|cmake|qmake|kconfig|perl) cd -- "${pkg_build_dir}" && ptxd_make_world_prepare_"${pkg_conf_tool}" 2>&1 ;; python|python3) : ;; # nothing to do "NO") echo "prepare stage disabled." ;; "") echo "No prepare tool found. Do nothing." ;; *) ptxd_bailout "automatic prepare tool selection failed. Set _CONF_TOOL";; esac } export -f ptxd_make_world_prepare