Browse Source

trim out the parts of cross.sh that don't make sense now that we've
applied cross-path directly.

also, now we can run cross.sh from the tarball, not just from cvs.


svn:r6477

Roger Dingledine 19 years ago
parent
commit
b65c43939e
1 changed files with 5 additions and 22 deletions
  1. 5 22
      contrib/cross.sh

+ 5 - 22
contrib/cross.sh

@@ -1,13 +1,11 @@
 #!/bin/bash
 #!/bin/bash
 # $Id$
 # $Id$
-# Copyright 2006 Michael Mohr
+# Copyright 2006 Michael Mohr with modifications by Roger Dingledine
 # See LICENSE for licensing information.
 # See LICENSE for licensing information.
 
 
 #######################################################################
 #######################################################################
 #  Tor-cross: a tool to help cross-compile Tor
 #  Tor-cross: a tool to help cross-compile Tor
 #
 #
-#  mailto:tor-assistants@freehaven.net
-#
 #  The purpose of a cross-compiler is to produce an executable for
 #  The purpose of a cross-compiler is to produce an executable for
 #  one system (CPU) on another.  This is useful, for example, when
 #  one system (CPU) on another.  This is useful, for example, when
 #  the target system does not have a native compiler available.
 #  the target system does not have a native compiler available.
@@ -15,10 +13,6 @@
 #  host (the computer you're working on now) for a target such as
 #  host (the computer you're working on now) for a target such as
 #  a router or handheld computer.
 #  a router or handheld computer.
 #
 #
-#  This script automatically patches two files in the Tor source:
-#        configure.in	: remove test programs
-#        compat.h	: remove check for NULL==0
-#
 #  A number of environment variables must be set in order for this
 #  A number of environment variables must be set in order for this
 #  script to work:
 #  script to work:
 #        $PREFIX, $CROSSPATH, $ARCH_PREFIX, $HOST,
 #        $PREFIX, $CROSSPATH, $ARCH_PREFIX, $HOST,
@@ -53,10 +47,10 @@
 #
 #
 #######################################################################
 #######################################################################
 
 
-# disable some show-stopping bugs (see cross.patch for more)
+# disable the platform-specific tests in configure
 export CROSS_COMPILE=yes
 export CROSS_COMPILE=yes
 
 
-if [ ! -f configure.in ]
+if [ ! -f configure ]
 then
 then
   echo "Please run this script from the root of the Tor distribution."
   echo "Please run this script from the root of the Tor distribution."
   exit -1
   exit -1
@@ -109,19 +103,7 @@ then
   make clean
   make clean
 fi
 fi
 
 
-# check if the source has already been patched
-patch -f -p1 -R --dry-run < contrib/cross.patch > /dev/null 2>&1
-# if it hasn't, rerun the autotools
-if [ $? -ne 0 ]
-then
-  patch -p1 < contrib/cross.patch
-  aclocal
-  autoconf
-  autoheader
-  automake --add-missing
-fi
-
-# Set up the buld environment and try to run configure
+# Set up the build environment and try to run configure
 export PATH=$PATH:$CROSSPATH
 export PATH=$PATH:$CROSSPATH
 export RANLIB=${ARCH_PREFIX}ranlib
 export RANLIB=${ARCH_PREFIX}ranlib
 export CC=${ARCH_PREFIX}gcc
 export CC=${ARCH_PREFIX}gcc
@@ -165,3 +147,4 @@ echo ""
 echo "Tor should be compiled at this point.  Now run 'make install' to"
 echo "Tor should be compiled at this point.  Now run 'make install' to"
 echo "install to $PREFIX"
 echo "install to $PREFIX"
 echo ""
 echo ""
+