From 08423ba51f0e9fb5bf8ff30f9ecb319c9f8a15fb Mon Sep 17 00:00:00 2001 From: Erik van der Kouwe Date: Fri, 8 Aug 2014 21:43:24 +0200 Subject: [PATCH] Adjust LLVM MINIX scripts for new source layout Adjust to the fact that drivers and servers have moved into the minix subdir. --- minix/llvm/build.llvm | 4 ++-- minix/llvm/configure.llvm | 4 ++-- minix/llvm/minix.inc | 6 +++--- minix/llvm/relink.llvm | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/minix/llvm/build.llvm b/minix/llvm/build.llvm index 202b59abc..d980e5dbf 100755 --- a/minix/llvm/build.llvm +++ b/minix/llvm/build.llvm @@ -38,9 +38,9 @@ function usage() function check_current_dir() { #Make sure we are running from the root dir of the Minix sources - if [ -d ./minix ] && [ -d ./drivers ] && [ -d ./servers ] ; then + if [ -d ./minix/drivers ] && [ -d ./minix/servers ] ; then MINIX_ROOT="${MYPWD}" - elif [ -d ../../minix ] && [ -d ../../drivers ] && [ -d ../../servers ]; then + elif [ -d ../../minix/drivers ] && [ -d ../../minix/servers ]; then MINIX_ROOT="${MYPWD}/../.." else echo "Please run the script from either of the following locations:" diff --git a/minix/llvm/configure.llvm b/minix/llvm/configure.llvm index dda744388..60a3b6132 100755 --- a/minix/llvm/configure.llvm +++ b/minix/llvm/configure.llvm @@ -24,9 +24,9 @@ EXITCODE=0 function check_current_dir() { #Make sure we are running from the root dir of the Minix sources - if [ -d ./minix ] && [ -d ./drivers ] && [ -d ./servers ] ; then + if [ -d ./minix/drivers ] && [ -d ./minix/servers ] ; then MINIX_ROOT="${MYPWD}" - elif [ -d ../../minix ] && [ -d ../../drivers ] && [ -d ../../servers ]; then + elif [ -d ../../minix/drivers ] && [ -d ../../minix/servers ]; then MINIX_ROOT="${MYPWD}/../.." else echo "Please run the script from either of the following locations:" diff --git a/minix/llvm/minix.inc b/minix/llvm/minix.inc index 93675264a..715253bc8 100644 --- a/minix/llvm/minix.inc +++ b/minix/llvm/minix.inc @@ -24,9 +24,9 @@ function generate_modules_map() cat ${TMPFILE} | sed -e "s/\.\///g" > ${TMPFILE}.1 for l in `cat ${TMPFILE}.1`; do echo "`echo $l | cut -d: -f2`=`echo $l | cut -d: -f1`" | sed -e "s/\/Makefile//g"; done > ${TMPFILE}.2 - GREP_FILTER=$( cat drivers/Makefile | awk "\$1 ~ /endif/ {N=0}; N==1 {print}; \$4 ~ /earm/ {N=1}" | sed "s/^\t//g" | sed "s/SUBDIR[^ ]* *//g" | sed "s/ \\\//g" | xargs | sed "s/ /= -e ^/g") + GREP_FILTER=$( cat minix/drivers/Makefile | awk "\$1 ~ /endif/ {N=0}; N==1 {print}; \$4 ~ /earm/ {N=1}" | sed "s/^\t//g" | sed "s/SUBDIR[^ ]* *//g" | sed "s/ \\\//g" | xargs | sed "s/ /= -e ^/g") grep -v -e ^${GREP_FILTER}= -e ^memory= ${TMPFILE}.2 > ${OUTFILE} - echo memory=drivers/memory >> ${OUTFILE} # memory always last + echo memory=minix/drivers/storage/memory >> ${OUTFILE} # memory always last rm -rf ${TMPFILE} ${TMPFILE}.1 ${TMPFILE}.2 @@ -45,7 +45,7 @@ function get_modules_path() generate_modules_map fi if [ $MODULE_NAME == "servers" ] || [ $MODULE_NAME == "drivers" ]; then - MODULE_NAME="=${MODULE_NAME}/" + MODULE_NAME="=minix/${MODULE_NAME}/" else MODULE_NAME="^${MODULE_NAME}=" fi diff --git a/minix/llvm/relink.llvm b/minix/llvm/relink.llvm index 3ccf919e0..700a0b9d6 100755 --- a/minix/llvm/relink.llvm +++ b/minix/llvm/relink.llvm @@ -35,9 +35,9 @@ function usage() function check_current_dir() { #Make sure we are running from the root dir of the Minix sources - if [ -d ./minix ] && [ -d ./drivers ] && [ -d ./servers ] ; then + if [ -d ./minix/drivers ] && [ -d ./minix/servers ] ; then MINIX_ROOT="${MYPWD}" - elif [ -d ../../minix ] && [ -d ../../drivers ] && [ -d ../../servers ]; then + elif [ -d ../../minix/drivers ] && [ -d ../../minix/servers ]; then MINIX_ROOT="${MYPWD}/../.." else echo "Please run the script from either of the following locations:"