[GRASS-SVN] r48313 - grass/branches/develbranch_6/scripts/g.extension

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 16 04:21:37 EDT 2011


Author: hamish
Date: 2011-09-16 01:21:36 -0700 (Fri, 16 Sep 2011)
New Revision: 48313

Modified:
   grass/branches/develbranch_6/scripts/g.extension/g.extension
Log:
add $ARCH to dist.build dir

Modified: grass/branches/develbranch_6/scripts/g.extension/g.extension
===================================================================
--- grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-09-16 07:38:59 UTC (rev 48312)
+++ grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-09-16 08:21:36 UTC (rev 48313)
@@ -281,6 +281,13 @@
 cd "$TMPDIR/$MODULE"
 g.message message="Compiling <$MODULE>..."
 
+if [ -n "$MACHTYPE" ] ; then
+   DIST_DIR="dist.$MACHTYPE"
+elif [ -x "`which arch`" ] ; then
+   DIST_DIR="dist.`arch`"
+else 
+   DIST_DIR="dist.unknown"
+fi
 
 # $INST_NOW helps compile and install modules directly into $(INST_DIR)
 # without having to install whole distribution even after modifying only
@@ -290,10 +297,10 @@
 export INST_NOW
 
 make MODULE_TOPDIR="$GISBASE" \
-   ARCH_INC="-I$GISBASE/include -I${MYINST_DIR}/include -I$TMPDIR/dist/include" \
-   ARCH_LIBPATH="-L$GISBASE/lib -L${MYINST_DIR}/lib -L$TMPDIR/dist/lib" \
+   ARCH_INC="-I$GISBASE/include -I${MYINST_DIR}/include -I$TMPDIR/$DIST_DIR/include" \
+   ARCH_LIBPATH="-L$GISBASE/lib -L${MYINST_DIR}/lib -L$TMPDIR/$DIST_DIR/lib" \
    ARCH_LIBDIR="$GISBASE/lib" \
-   ARCH_DISTDIR="$TMPDIR/dist" \
+   ARCH_DISTDIR="$TMPDIR/$DIST_DIR" \
    UNIX_BIN="$TMPDIR/bin"
 
 if [ $? -ne 0 ] ; then
@@ -337,12 +344,12 @@
          g.message "You may need to enter your password to install $MODULE:"
 
          sudo make MODULE_TOPDIR="$GISBASE" \
-	     ARCH_DISTDIR="$TMPDIR/dist" \
+	     ARCH_DISTDIR="$TMPDIR/$DIST_DIR" \
 	     INST_DIR="$MYINST_DIR" install
       else
          g.message "You need to enter the root password to install $MODULE:"
 
-         su -c "make MODULE_TOPDIR=\"$GISBASE\" ARCH_DISTDIR=\"$TMPDIR/dist\" INST_DIR=\"$MYINST_DIR\" install"
+         su -c "make MODULE_TOPDIR=\"$GISBASE\" ARCH_DISTDIR=\"$TMPDIR/$DIST_DIR\" INST_DIR=\"$MYINST_DIR\" install"
       fi
    else
       if test -f "$MYINST_DIR/$PROGTYPE/$MODULE" ; then
@@ -350,7 +357,7 @@
       fi
 
       make MODULE_TOPDIR="$GISBASE" \
-           ARCH_DISTDIR="$TMPDIR/dist" \
+           ARCH_DISTDIR="$TMPDIR/$DIST_DIR" \
 	   INST_DIR="$MYINST_DIR" install
    fi
 



More information about the grass-commit mailing list