Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2013-01-17 Thread Jon TURNEY
On 14/09/2012 01:43, Warren Young wrote:
 On 9/13/2012 5:09 AM, Jon TURNEY wrote:
 On 13/09/2012 03:23, Warren Young wrote:
 5. Several build system files refer to iniparse.h, but on my system,
 iniparse.yy yields iniparse.hh, not .h.

 See the note on a Slightly backward-incompatible change in the section
 Changes to Yacc and Lex support in [1]
 
 Lovely.
 
 I don't see a clean solution short of demanding that everyone be on Automake
 1.12 then.  Symlink hackery only works when you know which versino of Automake
 you are running.  I guess bootstrap.sh could detect Automake 1.11 and below,
 but ick.

Indeed.

Attached is a patch which fixes things for and requires automake =1.12.

(Note that automake has some magic to select the version of automake which was
previously run in a directory, rather than just selecting the latest version
installed, so you'll need to distclean or 'WANT_AUTOMAKE=1.12 ./bootstrap.sh'
to build in an already configured directory after applying this patch)

From 478c40eeaa5d6fda2f527072863b5f393ffeca2a Mon Sep 17 00:00:00 2001
From: Jon TURNEY jon.tur...@dronecode.org.uk
Date: Thu, 17 Jan 2013 15:13:11 +
Subject: [PATCH] Require automake 1.12 for consistent naming of generated
 file

Automake =1.11 and =1.12 have different behaviour (.h vs .hh) for naming the
C++ header file generated from a .yy file.

Adapt for the the behaviour of automake 1.12, and require it.

2013-01-17  Jon TURNEY  jon.tur...@dronecode.org.uk

* configure.in: Require automake 1.12.
* Makefile.am (BUILT_SOURCES): Update iniparse.h to iniparse.hh.
* iniparse.yy: Ditto.
* inilex.ll: Ditto.

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 Makefile.am  |4 ++--
 configure.in |2 +-
 inilex.ll|2 +-
 iniparse.yy  |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 621c8ff..0f1498b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,10 +54,10 @@ EXTRA_DIST = \
tree-plus.bmp
 
-# iniparse.h is generated from iniparse.yy via bison -d, so it needs to be
+# iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
 # included here for proper tracking (but not iniparse.cc, since automake
 # knows about that already)
 BUILT_SOURCES = \
setup_version.c \
-   iniparse.h
+   iniparse.hh
 
 CLEANFILES = setup_version.c
diff --git a/configure.in b/configure.in
index 37a3ef2..566a3fd 100644
--- a/configure.in
+++ b/configure.in
@@ -21,5 +21,5 @@ 
 AC_PREREQ(2.60)
 AC_CONFIG_AUX_DIR([cfgaux])
-AM_INIT_AUTOMAKE([subdir-objects foreign no-define -Wall -Wno-portability])
+AM_INIT_AUTOMAKE([1.12 subdir-objects foreign no-define -Wall 
-Wno-portability])
 dnl AM_CONFIG_HEADER(include/autoconf.h)
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES(yes)])
diff --git a/inilex.ll b/inilex.ll
index b119049..a70b5b5 100644
--- a/inilex.ll
+++ b/inilex.ll
@@ -24,5 +24,5 @@
 
 #include ini.h
-#include iniparse.h
+#include iniparse.hh
 #include String++.h
 #include IniParseFeedback.h
diff --git a/iniparse.yy b/iniparse.yy
index c8332ff..684fc47 100644
--- a/iniparse.yy
+++ b/iniparse.yy
@@ -20,5 +20,5 @@
 #include win32.h
 #include ini.h
-#include iniparse.h
+#include iniparse.hh
 #include PackageTrust.h
 
-- 
1.7.9



Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2013-01-17 Thread Christopher Faylor
On Thu, Jan 17, 2013 at 05:22:33PM +, Jon TURNEY wrote:
On 14/09/2012 01:43, Warren Young wrote:
 On 9/13/2012 5:09 AM, Jon TURNEY wrote:
 On 13/09/2012 03:23, Warren Young wrote:
 5. Several build system files refer to iniparse.h, but on my system,
 iniparse.yy yields iniparse.hh, not .h.

 See the note on a Slightly backward-incompatible change in the section
 Changes to Yacc and Lex support in [1]
 
 Lovely.
 
 I don't see a clean solution short of demanding that everyone be on Automake
 1.12 then.  Symlink hackery only works when you know which versino of 
 Automake
 you are running.  I guess bootstrap.sh could detect Automake 1.11 and below,
 but ick.

Indeed.

Attached is a patch which fixes things for and requires automake =1.12.

(Note that automake has some magic to select the version of automake which was
previously run in a directory, rather than just selecting the latest version
installed, so you'll need to distclean or 'WANT_AUTOMAKE=1.12 ./bootstrap.sh'
to build in an already configured directory after applying this patch)


From 478c40eeaa5d6fda2f527072863b5f393ffeca2a Mon Sep 17 00:00:00 2001
From: Jon TURNEY jon.tur...@dronecode.org.uk
Date: Thu, 17 Jan 2013 15:13:11 +
Subject: [PATCH] Require automake 1.12 for consistent naming of generated
 file

Automake =1.11 and =1.12 have different behaviour (.h vs .hh) for naming the
C++ header file generated from a .yy file.

Adapt for the the behaviour of automake 1.12, and require it.

2013-01-17  Jon TURNEY  jon.tur...@dronecode.org.uk

   * configure.in: Require automake 1.12.
   * Makefile.am (BUILT_SOURCES): Update iniparse.h to iniparse.hh.
   * iniparse.yy: Ditto.
   * inilex.ll: Ditto.

Go ahead and check in.  Thanks.

cgf


Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-10-09 Thread Corinna Vinschen
On Sep 13 11:26, Christopher Faylor wrote:
 On Wed, Sep 12, 2012 at 10:08:36PM -0600, Eric Blake wrote:
 On 09/12/2012 09:42 PM, Warren Young wrote:
  On 9/12/2012 9:28 PM, Christopher Faylor wrote:
 
  If you're going to do that you really should (re)learn how to submit a
  proper patch.  A patch uses diff -u format and contains a ChangeLog.
  
  It's been a decade since I last used cvs diff.  I forgot that it
  doesn't include -u, since svn diff does it by default.
 
 cvs does it automatically if you supply your ~/.cvsrc with correct
 contents... What I miss is that even with ~/.cvsrc, you still don't get
 the automatic paging that 'git diff' gives by default.
 
 Yes, cygwin is one of the last holdouts still using CVS, making it more
 likely that you don't notice an incomplete ~/.cvsrc on new machines as
 fast.  I'd certainly welcome a conversion to git (and tolerate a
 conversion to svn); especially since I know that newlib recently enabled
 a git mirror.  And there's ways of using git as your frontend to a CVS
 (or svn) repository.
 
 I did spend a lot of time getting a standalone git repository ready for
 Cygwin a while ago.  I didn't do anything with setup though.
 
 Since nothing really relies on cygwin-apps, I wouldn't mind moving it over
 to git as long as Corinna agrees.

Since everybody seem to like git more than CVS, go ahead.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-09-13 Thread Jon TURNEY
On 13/09/2012 03:23, Warren Young wrote:
 5. Several build system files refer to iniparse.h, but on my system,
 iniparse.yy yields iniparse.hh, not .h.  In a fresh CVS checkout, this causes:
 
   $ ./bootstrap.sh
   ...noise noise noise...
   $ make
 GEN  setup_version.c
   make: *** No rule to make target `iniparse.h', needed by `all'.  Stop.
 
 I was able to fix it with:
 
   $ ln -s iniparse.hh iniparse.h
   $ make iniparse.hh
   $ make
 
 If you skip the second step, make(1) yells again, because iniparse.hh hasn't
 been created yet.  You have to force it to create it out of order, since the
 Makefile dependencies are satisfied by the newly-created iniparse.h symlink.
 
 Having done those two things, you don't need to repeat the hack, even after
 make distclean, since that doesn't remove either iniparse.hh or iniparse.h. 
 But, I think the correct fix is to just change all the iniparse.h references
 to iniparse.hh.
 
 That makes me wonder how anyone else has been getting setup.exe to build OOTB
 for the past five years?  (cvs log -r1.1 iniparse.yy)
 
 Do the current setup.exe maintainers have such hack symlinks on their systems
 already, and haven't needed to do any fresh checkouts in all that time?  Or is
 this a recent Bison change?

Having run across this issue on another project, I think this is due to a
recent, and rather annoying change in automake.

automake 1.12 has this behaviour, automake 1.11 and previous made iniparse.h

See the note on a Slightly backward-incompatible change in the section
Changes to Yacc and Lex support in [1]

[1] http://lists.gnu.org/archive/html/automake/2012-04/msg00060.html



Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-09-13 Thread Christopher Faylor
On Wed, Sep 12, 2012 at 10:08:36PM -0600, Eric Blake wrote:
On 09/12/2012 09:42 PM, Warren Young wrote:
 On 9/12/2012 9:28 PM, Christopher Faylor wrote:

 If you're going to do that you really should (re)learn how to submit a
 proper patch.  A patch uses diff -u format and contains a ChangeLog.
 
 It's been a decade since I last used cvs diff.  I forgot that it
 doesn't include -u, since svn diff does it by default.

cvs does it automatically if you supply your ~/.cvsrc with correct
contents... What I miss is that even with ~/.cvsrc, you still don't get
the automatic paging that 'git diff' gives by default.

Yes, cygwin is one of the last holdouts still using CVS, making it more
likely that you don't notice an incomplete ~/.cvsrc on new machines as
fast.  I'd certainly welcome a conversion to git (and tolerate a
conversion to svn); especially since I know that newlib recently enabled
a git mirror.  And there's ways of using git as your frontend to a CVS
(or svn) repository.

I did spend a lot of time getting a standalone git repository ready for
Cygwin a while ago.  I didn't do anything with setup though.

Since nothing really relies on cygwin-apps, I wouldn't mind moving it over
to git as long as Corinna agrees.

cgf


Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-09-13 Thread Warren Young

On 9/13/2012 5:09 AM, Jon TURNEY wrote:

On 13/09/2012 03:23, Warren Young wrote:

5. Several build system files refer to iniparse.h, but on my system,
iniparse.yy yields iniparse.hh, not .h.


See the note on a Slightly backward-incompatible change in the section
Changes to Yacc and Lex support in [1]


Lovely.

I don't see a clean solution short of demanding that everyone be on 
Automake 1.12 then.  Symlink hackery only works when you know which 
versino of Automake you are running.  I guess bootstrap.sh could detect 
Automake 1.11 and below, but ick.


[PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-09-12 Thread Warren Young

It's that time of decade again...time for me to patch setup.exe again.

But oh noes!  The README instructions are wrong, and the program doesn't 
build correctly from a fresh checkout.  Hafta fix that first.


1. The README implies that you need automake 1.9 and libtool 1.5, 
exactly.  I didn't have any trouble building with current versions 
(1.12.3 and 2.4) instead.  Automake 1.9 is still available in the Cygwin 
package repo, but Libtool 1.5 is not.  I don't see that the build system 
actually forces Automake 1.9, and of course it can't force Libtool 1.5 
now.  I think these must be minimums, not exact version requirements.  I 
suggest removing these version numbers from the README.


2. The configure command the README gives as step 2 won't work now that 
-mno-cygwin is gone.  It should now be:


./configure -C --build=i686-pc-mingw32 --host=i686-pc-mingw32 \
CC=i686-pc-mingw32-gcc CXX=i686-pc-mingw32-g++

3. Automake maintainer mode has been controversial since it was created, 
and improvements in the past few years in Automake seem to have made it 
obsolete, too.  I suggest removing all this stuff and using the standard 
Automake rebuild rules.


The attached patch addresses these three issues.

4. configure.in should be renamed configure.ac.  (cvs diff can't do 
that. :) )  Autoconf has been yelling about this for years.


5. Several build system files refer to iniparse.h, but on my system, 
iniparse.yy yields iniparse.hh, not .h.  In a fresh CVS checkout, this 
causes:


  $ ./bootstrap.sh
  ...noise noise noise...
  $ make
GEN  setup_version.c
  make: *** No rule to make target `iniparse.h', needed by `all'.  Stop.

I was able to fix it with:

  $ ln -s iniparse.hh iniparse.h
  $ make iniparse.hh
  $ make

If you skip the second step, make(1) yells again, because iniparse.hh 
hasn't been created yet.  You have to force it to create it out of 
order, since the Makefile dependencies are satisfied by the 
newly-created iniparse.h symlink.


Having done those two things, you don't need to repeat the hack, even 
after make distclean, since that doesn't remove either iniparse.hh or 
iniparse.h.  But, I think the correct fix is to just change all the 
iniparse.h references to iniparse.hh.


That makes me wonder how anyone else has been getting setup.exe to build 
OOTB for the past five years?  (cvs log -r1.1 iniparse.yy)


Do the current setup.exe maintainers have such hack symlinks on their 
systems already, and haven't needed to do any fresh checkouts in all 
that time?  Or is this a recent Bison change?
Index: README
===
RCS file: /cvs/cygwin-apps/setup/README,v
retrieving revision 2.43
diff -r2.43 README
22d21
   - autoconf2.5
24,25c23
   - automake1.9
   - libtool1.5
---
   - libtool
35,38c33,34
$ ./configure -C --disable-shared --host=i686-pc-mingw32 \
--build=i686-pc-cygwin CC=gcc -mno-cygwin CXX=g++ -mno-cygwin
If you plan to do any work on the setup build system, you will
probably want to add --enable-maintainer-mode.
---
$ ./configure -C --build=i686-pc-mingw32 --host=i686-pc-mingw32 \
CC=i686-pc-mingw32-gcc CXX=i686-pc-mingw32-g++
Index: bootstrap.sh
===
RCS file: /cvs/cygwin-apps/setup/bootstrap.sh,v
retrieving revision 2.6
diff -r2.6 bootstrap.sh
64,66c64
 $srcdir/configure -C --enable-maintainer-mode \
 	--build=$build --host=$host CC=$CC CXX=$CXX \
 	$@
---
 $srcdir/configure -C --build=$build --host=$host CC=$CC CXX=$CXX $@
Index: configure.in
===
RCS file: /cvs/cygwin-apps/setup/configure.in,v
retrieving revision 2.28
diff -r2.28 configure.in
25d24
 AM_MAINTAINER_MODE


Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-09-12 Thread Christopher Faylor
On Wed, Sep 12, 2012 at 08:23:58PM -0600, Warren Young wrote:
It's that time of decade again...time for me to patch setup.exe again.

If you're going to do that you really should (re)learn how to submit a
proper patch.  A patch uses diff -u format and contains a ChangeLog.

But, thanks for the heads up.  I'll make appropriate changes.

cgf


Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-09-12 Thread Warren Young

On 9/12/2012 9:28 PM, Christopher Faylor wrote:


If you're going to do that you really should (re)learn how to submit a
proper patch.  A patch uses diff -u format and contains a ChangeLog.


It's been a decade since I last used cvs diff.  I forgot that it 
doesn't include -u, since svn diff does it by default.


Sorry about the lack of a ChangeLog entry.


Re: [PATCH] setup.exe build instructions outdated; build doesn't bootstrap cleanly

2012-09-12 Thread Eric Blake
On 09/12/2012 09:42 PM, Warren Young wrote:
 On 9/12/2012 9:28 PM, Christopher Faylor wrote:

 If you're going to do that you really should (re)learn how to submit a
 proper patch.  A patch uses diff -u format and contains a ChangeLog.
 
 It's been a decade since I last used cvs diff.  I forgot that it
 doesn't include -u, since svn diff does it by default.

cvs does it automatically if you supply your ~/.cvsrc with correct
contents... What I miss is that even with ~/.cvsrc, you still don't get
the automatic paging that 'git diff' gives by default.

Yes, cygwin is one of the last holdouts still using CVS, making it more
likely that you don't notice an incomplete ~/.cvsrc on new machines as
fast.  I'd certainly welcome a conversion to git (and tolerate a
conversion to svn); especially since I know that newlib recently enabled
a git mirror.  And there's ways of using git as your frontend to a CVS
(or svn) repository.

-- 
Eric Blake   ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature