diff --git a/ChangeLog b/ChangeLog index a0535b5f9f..e4296dc8fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Sun Sep 20 09:52:39 1998 Owen Taylor + + * HACKING: indent other than GNU indent should be OK + now. + + * gtk/genmarshal.pl gtk/Makefile.am: Call indent on file + instead of piping through indent. If indent wasn't + found in ./configure don't bother indenting at + all. + Fri Sep 18 19:11:10 1998 Owen Taylor * gdk/gdk.h: Add names to prototype for gdk_image_new_bitmap. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a0535b5f9f..e4296dc8fc 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Sun Sep 20 09:52:39 1998 Owen Taylor + + * HACKING: indent other than GNU indent should be OK + now. + + * gtk/genmarshal.pl gtk/Makefile.am: Call indent on file + instead of piping through indent. If indent wasn't + found in ./configure don't bother indenting at + all. + Fri Sep 18 19:11:10 1998 Owen Taylor * gdk/gdk.h: Add names to prototype for gdk_image_new_bitmap. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a0535b5f9f..e4296dc8fc 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Sun Sep 20 09:52:39 1998 Owen Taylor + + * HACKING: indent other than GNU indent should be OK + now. + + * gtk/genmarshal.pl gtk/Makefile.am: Call indent on file + instead of piping through indent. If indent wasn't + found in ./configure don't bother indenting at + all. + Fri Sep 18 19:11:10 1998 Owen Taylor * gdk/gdk.h: Add names to prototype for gdk_image_new_bitmap. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a0535b5f9f..e4296dc8fc 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Sun Sep 20 09:52:39 1998 Owen Taylor + + * HACKING: indent other than GNU indent should be OK + now. + + * gtk/genmarshal.pl gtk/Makefile.am: Call indent on file + instead of piping through indent. If indent wasn't + found in ./configure don't bother indenting at + all. + Fri Sep 18 19:11:10 1998 Owen Taylor * gdk/gdk.h: Add names to prototype for gdk_image_new_bitmap. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a0535b5f9f..e4296dc8fc 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Sun Sep 20 09:52:39 1998 Owen Taylor + + * HACKING: indent other than GNU indent should be OK + now. + + * gtk/genmarshal.pl gtk/Makefile.am: Call indent on file + instead of piping through indent. If indent wasn't + found in ./configure don't bother indenting at + all. + Fri Sep 18 19:11:10 1998 Owen Taylor * gdk/gdk.h: Add names to prototype for gdk_image_new_bitmap. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a0535b5f9f..e4296dc8fc 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Sun Sep 20 09:52:39 1998 Owen Taylor + + * HACKING: indent other than GNU indent should be OK + now. + + * gtk/genmarshal.pl gtk/Makefile.am: Call indent on file + instead of piping through indent. If indent wasn't + found in ./configure don't bother indenting at + all. + Fri Sep 18 19:11:10 1998 Owen Taylor * gdk/gdk.h: Add names to prototype for gdk_image_new_bitmap. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a0535b5f9f..e4296dc8fc 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Sun Sep 20 09:52:39 1998 Owen Taylor + + * HACKING: indent other than GNU indent should be OK + now. + + * gtk/genmarshal.pl gtk/Makefile.am: Call indent on file + instead of piping through indent. If indent wasn't + found in ./configure don't bother indenting at + all. + Fri Sep 18 19:11:10 1998 Owen Taylor * gdk/gdk.h: Add names to prototype for gdk_image_new_bitmap. diff --git a/HACKING b/HACKING index cd780c7266..5b90b08635 100644 --- a/HACKING +++ b/HACKING @@ -5,7 +5,7 @@ to have the following packages installed: - GNU automake 1.3 (Beta releases are at ftp://ftp.cygnus.com/pub/tromey) - GNU libtool 1.2 - - GNU indent (1.9.1 is known good) + - indent (GNU indent 1.9.1 is known good) These should be available by ftp from ftp.gnu.org or any of the fine GNU mirrors. Beta software can be found at alpha.gnu.org. diff --git a/configure.in b/configure.in index 15fb9cfe80..2097b33ea7 100644 --- a/configure.in +++ b/configure.in @@ -113,6 +113,9 @@ fi AC_PROG_AWK AC_CHECK_PROGS(PERL, perl5 perl) +# We would like indent, but don't require it. +AC_CHECK_PROG(INDENT, indent, indent) + REBUILD=\# if test -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then if test -n "$AWK" ; then @@ -120,7 +123,7 @@ if test -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then fi fi AC_SUBST(REBUILD) - + dnl The DU4 header files don't provide library prototypes unless dnl -std1 is given to the native cc. AC_MSG_CHECKING([for extra flags to get ANSI library prototypes]) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 899ecfd435..a32348fe69 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -262,7 +262,7 @@ gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl gtk.defs && mv s-gtbe gtktypebuiltins_evals.c gtkmarshal.c gtkmarshal.h: @REBUILD@ gtkmarshal.list genmarshal.pl - srcdir=$(srcdir) perl $(srcdir)/genmarshal.pl + srcdir=$(srcdir) INDENT=$(INDENT) perl $(srcdir)/genmarshal.pl # ??? # special remake rules diff --git a/gtk/genmarshal.pl b/gtk/genmarshal.pl index 23c0e4a942..475e4b456b 100755 --- a/gtk/genmarshal.pl +++ b/gtk/genmarshal.pl @@ -21,10 +21,20 @@ ); $srcdir = $ENV{'srcdir'} || '.'; +$indent = $ENV{'INDENT'}; + +sub indent { + my $filename = shift; + if (defined($indent) && $indent ne "") { + system($indent, $filename); + # we try the most likely names for backup files + system("rm", "-f", "$filename.bak", "$filename~"); + } +} open(IL, "<$srcdir/gtkmarshal.list") || die("Open failed: $!"); -open(OH, "|indent > $srcdir/gtkmarshal.h") || die("Open failed: $!"); -open(OS, "|indent > $srcdir/gtkmarshal.c") || die("Open failed: $!"); +open(OH, ">$srcdir/gtkmarshal.h") || die("Open failed: $!"); +open(OS, ">$srcdir/gtkmarshal.c") || die("Open failed: $!"); print OH <)) { +while (defined($aline = )) { + chomp $aline; ($retval, $paramlist) = split(/:/, $aline, 2); @params = split(/\s*,\s*/, $paramlist); @@ -190,3 +201,6 @@ print OH <