From 8da44f190834cca7cbc14ee5e5fdce44eeae2142 Mon Sep 17 00:00:00 2001 From: olsner Date: Fri, 17 Jul 2009 22:07:09 +0000 Subject: [PATCH] Simplify the update-workspaces.sh script, remove some uses of absolute paths and allow the script to be run from anywhere (e.g. as ../update-workspaces.sh from the workspaces/gcc/ directory) This was SVN commit r7011. --- build/workspaces/update-workspaces.sh | 28 +++++++-------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index c8bd63aa6d..0a884670c5 100755 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -1,26 +1,12 @@ #!/bin/sh -# build/workspaces/ +cd "$(dirname $0)" +# Now in build/workspaces/ (where we assume this script resides) -start_dir=$(pwd) -premake_dir=$(pwd)/../premake -workspace_dir=$(pwd)/gcc -mkdir "$workspace_dir" 2>/dev/null - -cd "$premake_dir" - -# build/premake/ +# Make sure workspaces/gcc exists. +mkdir -p gcc +# Now build premake and run it to create the makefiles +cd ../premake make -C src -HOSTTYPE=$HOSTTYPE ./premake --outpath "$workspace_dir" --atlas --collada "$@" --target gnu - -# These files need to be linked; premake makefiles assume that the -# lua file is accessible from the makefile directory - -cd "$workspace_dir" -ln -f -s "$premake_dir"/premake.lua "$premake_dir"/functions.lua . -if [ -x "$premake_dir"/premake ]; then - ln -f -s "$premake_dir"/premake . -fi - -cd "$start_dir" +src/bin/premake --outpath ../workspaces/gcc --atlas --collada "$@" --target gnu