echo " ${ROOT}"
# Persist the LLVM ROOT path information
-. ${MINIX_LLVM_DIR}/minix.inc
+[ -f ${MINIX_LLVM_DIR}/common.inc ] || cp ${MINIX_LLVM_DIR}/common.inc.default ${MINIX_LLVM_DIR}/common.inc
ROOT_1=`echo ${ROOT} | sed "s/\\\//\\\\\\\\\//g"`
sed -i "s/ROOT=.*$/ROOT=\"${ROOT_1}\"/g" ${MINIX_LLVM_DIR}/common.inc
+. ${MINIX_LLVM_DIR}/minix.inc
# Configure llvm-apps
cp ${ROOT}/conf/common.overrides.llvm-minix.inc ${ROOT}/common.overrides.llvm.inc
-sed -i "s/MINIX_ROOT=.*$/MINIX_ROOT=\"${MINIX_ROOT}\"/g" ${ROOT}/common.overrides.llvm.inc
+MINIX_ROOT_1=`readlink -f ${MINIX_ROOT} | sed "s/\\\//\\\\\\\\\//g"`
+sed -i "s/_MINIX_ROOT=.*$/_MINIX_ROOT=\"${MINIX_ROOT_1}\"/g" ${ROOT}/common.overrides.llvm.inc
if [ ! -d ${ROOT}/.tmp ]; then
mkdir ${ROOT}/.tmp 2>/dev/null || true
fi
-# Load useful functions and environment variables from llvm-apps repo.
-. ${ROOT}/apps/scripts/include/configure.llvm.inc
-
# Set default values for essential variables
: ${JOBS=1}
: ${GEN_GOLD_PLUGIN="yes"}
fi
if [ "${GEN_GOLD_PLUGIN}" == "yes" ]; then
-
- echo LLVMPREFIX= ${LLVMPREFIX}
${MINIX_LLVM_DIR}/generate_gold_plugin.sh
if [ ! -f "${GOLD_DEST_DIR}/libLTO.so" ] || [ ! -f "${GOLD_DEST_DIR}/LLVMgold.so" ]; then
echo "Failure: generate_gold_plugin.sh"
fi
# Reconfigure llvm-apps
-MINIX_TOOLS_DIR=$(readlink -f ${MINIX_ROOT}/obj.386/tooldir.*)
-sed -i "s/MINIX_TOOLS_DIR=.*$/MINIX_TOOLS_DIR=\"${MINIX_TOOLS_DIR}\"/g" ${ROOT}/common.overrides.llvm.inc
+MINIX_TOOLS_DIR=$(readlink -f ${MINIX_ROOT}/../obj.i386/tooldir.*)
+MINIX_TOOLS_DIR_1=`echo ${MINIX_TOOLS_DIR} | sed "s/\\\//\\\\\\\\\//g"`
+sed -i "s/MINIX_TOOLS_DIR=.*$/MINIX_TOOLS_DIR=\"${MINIX_TOOLS_DIR_1}\"/g" ${ROOT}/common.overrides.llvm.inc