This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] setup: build enhancements


On Wed, 2010-08-11 at 01:11 -0400, Christopher Faylor wrote:
> I really don't know why we have something like doconfigure.  Can't we
> just get rid of it?

Interesting point.  Most software comes with one autogen.sh script,
which runs autotools and then configure; right now, we have separate
scripts for each of those tasks.  The only other thing doconfigure does
is provide "maint" and "debug" shortcuts for adjusting C*FLAGS.

The attached patch for bootstrap.sh makes it comparable to the typical
autogen.sh.  Is this what you had in mind?


Yaakov

2010-08-11  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* bootstrap.sh: Allow running from a builddir.
	Run configure unless NOCONFIGURE is defined.
	* doconfigure: Remove.

Index: bootstrap.sh
===================================================================
RCS file: /cvs/cygwin-apps/setup/bootstrap.sh,v
retrieving revision 2.4
diff -u -r2.4 bootstrap.sh
--- bootstrap.sh	8 Apr 2010 15:50:38 -0000	2.4
+++ bootstrap.sh	11 Aug 2010 08:08:56 -0000
@@ -4,6 +4,8 @@
 # configure has not been run, or if a Makefile.am in a non-configured directory
 # has been updated
 
+builddir=`pwd`
+srcdir=`dirname "$0"`
 
 bootstrap() {
   if "$@"; then
@@ -16,6 +18,8 @@
   fi
 }
 
+cd "$srcdir"
+
 # Make sure we are running in the right directory
 if [ ! -f cygpackage.cc ]; then
   echo "You must run this script from the directory containing it"
@@ -27,6 +31,7 @@
 mkdir -p cfgaux
 
 # Bootstrap the autotool subsystems
+echo "bootstrapping in $srcdir"
 bootstrap aclocal
 # bootstrap autoheader
 bootstrap libtoolize --automake
@@ -34,7 +39,30 @@
 bootstrap automake --foreign --add-missing
 
 # Run bootstrap in required subdirs, iff it has not yet been run
-echo "bootstrapping in libgetopt++"
+echo "bootstrapping in $srcdir/libgetopt++"
 cd libgetopt++; ./bootstrap.sh
 
-echo "Autotool bootstrapping complete."
+if test -n "$NOCONFIGURE"; then
+	echo "Skipping configure per request"
+	exit 0
+fi
+
+cd "$builddir"
+
+build=`$srcdir/cfgaux/config.guess`
+host="i686-pc-mingw32"
+
+if hash $host-g++ 2> /dev/null; then
+	CC="$host-gcc"
+	CXX="$host-g++"
+else
+	CC="gcc-3 -mno-cygwin"
+	CXX="g++-3 -mno-cygwin"
+fi
+
+echo "running configure"
+$srcdir/configure -C --enable-maintainer-mode \
+	--build=$build --host=$host CC="$CC" CXX="$CXX" \
+	"$@"
+
+exit $?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]