Browse Source

Minor fix and code clean up on build scripts.

Yao Wei Tjong 姚伟忠 10 years ago
parent
commit
fb097bac5a
5 changed files with 6 additions and 7 deletions
  1. 1 1
      .bash_helpers.sh
  2. 1 1
      cmake_clean.bat
  3. 1 1
      cmake_generic.bat
  4. 2 3
      cmake_generic.sh
  5. 1 1
      cmake_ios.sh

+ 1 - 1
.bash_helpers.sh

@@ -89,7 +89,7 @@ post_cmake() {
                 #
                 xmlstarlet ed -P -L \
                     -u "/cproject/storageModule/cconfiguration/storageModule/pathentry[@kind = 'src']/@path" -v "" \
-                    -s "/cproject/storageModule/cconfiguration/storageModule/pathentry[@kind = 'src']" -t attr -n "excluding" -v "[Build]/|[Subprojects]/|[Targets]/" \
+                    -s "/cproject/storageModule/cconfiguration/storageModule/pathentry[@kind = 'src']" -t attr -n "excluding" -v "[Build]/|[Subprojects]/|[Targets]/|Docs/AngelScriptAPI.h" \
                     -u "/cproject/storageModule/cconfiguration/storageModule/pathentry[@kind = 'out']/@path" -v "[Build]" \
                     -u "/cproject/storageModule/cconfiguration/storageModule/pathentry[@kind = 'out']/@excluding" -x "substring-after(., '[Source directory]/|')" \
                     "$SOURCE"/.cproject

+ 1 - 1
cmake_clean.bat

@@ -33,6 +33,6 @@ cmake -E touch "%BUILD%\CMakeCache.txt"
 goto :eof
 :error
 echo An error has occured, build tree has to be provided as the first argument OR call this script in a build tree itself
-echo Usage: %~nx0 /path/to/build-tree
+echo Usage: %~nx0 \path\to\build-tree
 exit /B 1
 :eof

+ 1 - 1
cmake_generic.bat

@@ -60,6 +60,6 @@ cmake -E make_directory %BUILD% && cmake -E chdir %BUILD% cmake %OPTS% %* %SOURC
 goto :eof
 :error
 echo An error has occured, build tree has to be provided as the first argument OR call this script in a build tree itself
-echo Usage: %~nx0 /path/to/build-tree
+echo Usage: %~nx0 \path\to\build-tree
 exit /B 1
 :eof

+ 2 - 3
cmake_generic.sh

@@ -22,9 +22,8 @@
 #
 
 # Determine source tree and build tree
-if [ "$1" ] && [[ ! "$1" =~ ^- ]]; then BUILD=$1; shift; elif [ -f $(pwd)/CMakeCache.txt ]; then BUILD=$(pwd); else caller=$(ps -o args= $PPID |cut -d' ' -f2); if [[ ! $caller =~ cmake_.*\.sh$ ]]; then caller=$0; fi; echo -e "An error has occured, build tree has to be provided as the first argument OR call this script in a build tree itself\nUsage: ${caller##*/} /path/to/build-tree"; exit 1; fi
-SOURCE=$(dirname $0)
-if [ "$SOURCE" == "." ]; then SOURCE=$(pwd); fi
+if [ "$1" ] && [[ ! "$1" =~ ^- ]]; then BUILD=$1; shift; elif [ -f $(pwd)/CMakeCache.txt ]; then BUILD=$(pwd); else caller=$(ps -o args= $PPID |cut -d' ' -f2); if [[ ! "$caller" =~ cmake_.*\.sh$ ]]; then caller=$0; fi; echo -e "An error has occured, build tree has to be provided as the first argument OR call this script in a build tree itself\nUsage: ${caller##*/} /path/to/build-tree"; exit 1; fi
+SOURCE=$(cd ${0%/*}; pwd)
 if [ "$BUILD" == "." ]; then BUILD=$(pwd); fi
 
 # Define helpers

+ 1 - 1
cmake_ios.sh

@@ -21,6 +21,6 @@
 # THE SOFTWARE.
 #
 
-$(dirname $0)/cmake_macosx.sh $@ -DIOS=1
+$(dirname $0)/cmake_generic.sh $@ -G Xcode -DIOS=1
 
 # vi: set ts=4 sw=4 expandtab: