Here are two patches and a combined patch for both.
These patches include changes to the help.

patch-1.9-8-xv.patch adds the x and v options for debugging.  

patch-1.9-8-w.patch adds the w option, w standing for "Where to Build"

patch-1.9-8-wxv.patch combines both changes.

I'm in the process of working out how to do a variety of builds
for testing the download and compile script.  The x and v options help
in that regard.  

The w option allows me to test different download_and_compile builds
with different options in different directories from a single copy of
download_and_compile.sh

Like so:

download_and_compile.sh -w master ALL 
download_and_compile.sh -w master_e -e ALL # new event model
download_and_compile.sh -w master_r -r ALL # openrti
download_and_compile.sh -w master_er -er ALL # both

However just using a different directory is a bit inefficient.  It
results in multiple copies of git that are separate clones of the
gitorious repository.

Anders made a suggestion on IRC I'm going to follow up on. " You can
have local git clones that share the same .git/* files via file links"

I think that means we could have several local clones of a single local
git repository.  The various local clones would support building
multiple branches and  versions, without having to sync each clone
independently with gitorious.

The script would still work just as well for someone who just wanted to
compile a single version

-Pat

Note for those reading on the devel list, the patches are based on
download_and_compile.sh version 1.9-8, as of today, that's available
from http://assistenza.larasrl.net/brisa/fgfs/download_and_compile.sh





--- download_and_compile-1.9-8.sh	2013-02-24 10:23:20.288494978 -0500
+++ download_and_compile-w.sh	2013-02-24 11:45:41.688504514 -0500
@@ -39,6 +39,7 @@
 
 WHATTOBUILD=
 WHATTOBUILDALL=( PLIB OSG OPENRTI SIMGEAR FGFS DATA FGRUN )
+COMPILE_BASE_DIR=.
 UPDATE=
 STABLE=
 
@@ -56,7 +57,7 @@
 WITH_EVENT_INPUT=""
 WITH_OPENRTI=""
 
-while getopts "suhc:p:a:d:r:j:O:gei" OPTION
+while getopts "suhc:p:a:d:r:j:O:geiw:" OPTION
 do
      case $OPTION in
          s)
@@ -98,6 +99,9 @@
          i)
              WITH_OPENRTI="-D ENABLE_RTI=ON"
              ;;
+         w)
+		COMPILE_BASE_DIR=./$OPTARG
+             ;;
 
 
          ?)
@@ -191,6 +195,7 @@
 	echo "* -O X    Add -OX to the make compilation	           				default=None"
 	echo "* -r y|n  y=reconfigure programs before compiling them  n=do not reconfigure	default=y"
 	echo "* -s compile only last stable known versions					default=y"
+	echo "* -w run the build in a subdirectory						default=current directory"
 	
 	exit
 fi
@@ -342,18 +347,7 @@
 	echo " OK" >> $LOGFILE
 fi
 
-
-
-
-
-
-
-
-
-COMPILE_BASE_DIR=.
-
-
-
+mkdir -p $COMPILE_BASE_DIR || echo "Unable to create directory $COMPILE_BASE_DIR"
 
 #cd into compile base directory
 cd "$COMPILE_BASE_DIR"
--- download_and_compile-1.9-8.sh	2013-02-24 10:23:20.288494978 -0500
+++ download_and_compile-wxv.sh	2013-02-24 11:42:48.096504179 -0500
@@ -18,8 +18,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-VERSION="1.9-8"
-
+VERSION="1.9-8-wxv"
+echo download_and_compile.sh version: $VERSION
 #COMPILE GIT FGFS
 
 #######################################################
@@ -39,6 +39,7 @@
 
 WHATTOBUILD=
 WHATTOBUILDALL=( PLIB OSG OPENRTI SIMGEAR FGFS DATA FGRUN )
+COMPILE_BASE_DIR=.
 UPDATE=
 STABLE=
 
@@ -56,7 +57,7 @@
 WITH_EVENT_INPUT=""
 WITH_OPENRTI=""
 
-while getopts "suhc:p:a:d:r:j:O:gei" OPTION
+while getopts "suhc:p:a:d:r:j:O:geiw:xv" OPTION
 do
      case $OPTION in
          s)
@@ -98,6 +99,15 @@
          i)
              WITH_OPENRTI="-D ENABLE_RTI=ON"
              ;;
+         w)
+		COMPILE_BASE_DIR=./$OPTARG
+             ;;
+         x)
+             set -x
+             ;;
+         v)
+             set -v
+             ;;
 
 
          ?)
@@ -187,11 +197,13 @@
 	echo "* -p y|n  y=download packages n=skip download packages                      	default=y"
 	echo "* -c y|n  y=compile programs  n=do not compile programs                     	default=y"
 	echo "* -d y|n  y=fetch programs from internet (cvs, svn, etc...)  n=do not fetch 	default=y"
-	echo "* -j X    Add -jX to the make compilation		                             	default=None"
-	echo "* -O X    Add -OX to the make compilation	           				default=None"
+	echo "* -j X    Add -jX to the make compilation					default=None"
+	echo "* -O X    Add -OX to the make compilation					default=None"
 	echo "* -r y|n  y=reconfigure programs before compiling them  n=do not reconfigure	default=y"
 	echo "* -s compile only last stable known versions					default=y"
-	
+	echo "* -w run the build in a subdirectory						default=current directory"
+	echo "* -x set the -x option for script debugging					not set by default"
+	echo "* -v set the -x option for script debugging				        not set by default"
 	exit
 fi
 
@@ -342,18 +354,7 @@
 	echo " OK" >> $LOGFILE
 fi
 
-
-
-
-
-
-
-
-
-COMPILE_BASE_DIR=.
-
-
-
+mkdir -p $COMPILE_BASE_DIR || echo "Unable to create directory $COMPILE_BASE_DIR"
 
 #cd into compile base directory
 cd "$COMPILE_BASE_DIR"
--- download_and_compile-1.9-8.sh	2013-02-24 10:23:20.288494978 -0500
+++ download_and_compile-xv.sh	2013-02-24 09:54:30.848491641 -0500
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-VERSION="1.9-8"
+VERSION="1.9-8-xv"
 
 #COMPILE GIT FGFS
 
@@ -56,7 +56,7 @@
 WITH_EVENT_INPUT=""
 WITH_OPENRTI=""
 
-while getopts "suhc:p:a:d:r:j:O:gei" OPTION
+while getopts "suhc:p:a:d:r:j:O:geixv" OPTION
 do
      case $OPTION in
          s)
@@ -98,6 +98,12 @@
          i)
              WITH_OPENRTI="-D ENABLE_RTI=ON"
              ;;
+         x)
+             set -x
+             ;;
+         v)
+             set -v
+             ;;
 
 
          ?)
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to