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 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 makes it comparable to the typical  Is this what you had in mind?


2010-08-11  Yaakov Selkowitz  <>

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

RCS file: /cvs/cygwin-apps/setup/,v
retrieving revision 2.4
diff -u -r2.4
---	8 Apr 2010 15:50:38 -0000	2.4
+++	11 Aug 2010 08:08:56 -0000
@@ -4,6 +4,8 @@
 # configure has not been run, or if a in a non-configured directory
 # has been updated
+srcdir=`dirname "$0"`
 bootstrap() {
   if "$@"; then
@@ -16,6 +18,8 @@
+cd "$srcdir"
 # Make sure we are running in the right directory
 if [ ! -f ]; 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++; ./
-echo "Autotool bootstrapping complete."
+if test -n "$NOCONFIGURE"; then
+	echo "Skipping configure per request"
+	exit 0
+cd "$builddir"
+if hash $host-g++ 2> /dev/null; then
+	CC="$host-gcc"
+	CXX="$host-g++"
+	CC="gcc-3 -mno-cygwin"
+	CXX="g++-3 -mno-cygwin"
+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]