← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~hjd/widelands/scan-build-script-paths into lp:widelands

 

Hans Joachim Desserud has proposed merging lp:~hjd/widelands/scan-build-script-paths into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~hjd/widelands/scan-build-script-paths/+merge/174606

After thinking about the talk about paths and building elsewhere, I realized my script was rather ill-equipped for that purpose. My idea was that if anyone really wanted to build somewhere else, they could edit the BUILD_DIR variable. However, since the SOURCE_DIR was pointing to ../.. (two directories above), this meant you could end up in a different place if the build directory was changed and the script would fail to remove it at the end.

I've now reworked this section to base the source directory on the current directory (we have a minor check at the beginning to establish we are in the root of the repo) and the build directory can now be wherever on the system, though still defaults to build/scan-build. 

I guess the only problem not being dealt with is if the user does not have the necessary permissions to create the build directory, but I'm not really sure if that needs to be addressed.
-- 
https://code.launchpad.net/~hjd/widelands/scan-build-script-paths/+merge/174606
Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/scan-build-script-paths into lp:widelands.
=== modified file 'utils/scan-build.sh'
--- utils/scan-build.sh	2013-07-10 10:03:48 +0000
+++ utils/scan-build.sh	2013-07-14 10:44:25 +0000
@@ -27,8 +27,8 @@
   exit 1
 fi
 
-BUILD_DIR=build/scan-build
-SOURCE_DIR=../..
+SOURCE_DIR=`pwd`
+BUILD_DIR=$SOURCE_DIR/build/scan-build
 
 mkdir -p $BUILD_DIR
 cd $BUILD_DIR