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 09:54 -0400, Christopher Faylor wrote:
> On Wed, Aug 11, 2010 at 03:16:58AM -0500, Yaakov (Cygwin/X) wrote:
> >The attached patch for bootstrap.sh makes it comparable to the typical
> >autogen.sh.  Is this what you had in mind?
> 
> Yes.  Please go ahead with that change.  I appreciate your reading my
> mind.  :-)

I missed some references to doconfigure the first time.  Revised patch
attached.


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.
	* Makefile.am (EXTRA_DIST): Remove doconfigure.
	* README: Document that bootstrap.sh runs configure.
	Remove reference to doconfigure.

Index: Makefile.am
===================================================================
RCS file: /cvs/cygwin-apps/setup/Makefile.am,v
retrieving revision 2.85
diff -u -r2.85 Makefile.am
--- Makefile.am	11 Aug 2010 08:19:46 -0000	2.85
+++ Makefile.am	11 Aug 2010 18:37:10 -0000
@@ -49,7 +49,6 @@
 	choose-rtarrow.bmp \
 	choose-spin.bmp \
 	cygwin.ico \
-	doconfigure \
 	libmd5-rfc/README \
 	libmd5-rfc/md5main.c \
 	setup.exe.manifest \
Index: README
===================================================================
RCS file: /cvs/cygwin-apps/setup/README,v
retrieving revision 2.42
diff -u -r2.42 README
--- README	7 Apr 2010 16:32:31 -0000	2.42
+++ README	11 Aug 2010 18:38:25 -0000
@@ -29,6 +29,7 @@
 Build commands:
 1) Skip this step if building from a source tarball.
    $ ./bootstrap.sh
+   This will automatically handle step 2 as well, so proceed to step 3.
 
 2) Configure using the following set of options.
    $ ./configure -C --disable-shared --host=i686-pc-mingw32 \
@@ -44,8 +45,6 @@
    Compress using UPX:
    $ upx -9 setup.exe
 
-As a convenient shortcut to steps 1 and 2 above you can use "./doconfigure".
-
 ABOUT BRANCHES:
 ---------------
 Main setup development usually occurs on trunk. Releases are made from branches
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 18:40:46 -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]