[PATCH] use more common spelling in diagnostic: s/canonic/canonical/

2009-03-31 Thread Jim Meyering
Just noticed this in a diagnostic...

From 99d6d57d4dadeeafd8fef8f774d26c6e65886d89 Mon Sep 17 00:00:00 2001
From: Jim Meyering meyer...@redhat.com
Date: Tue, 31 Mar 2009 08:30:23 +0200
Subject: [PATCH] use more common spelling in diagnostic: s/canonic/canonical/

* automake.in (check_typos): s/canonic/canonical/
---
 ChangeLog   |5 +
 automake.in |2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 371c868..494f4e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-31  Jim Meyering  meyer...@redhat.com
+
+   use more common spelling in diagnostic: s/canonic/canonical/
+   * automake.in (check_typos): s/canonic/canonical/
+
 2009-03-31  Ralf Wildenhues  ralf.wildenh...@gmx.de

* configure.ac, NEWS: Bump version to 1.10c.
diff --git a/automake.in b/automake.in
index 6165851..472862b 100755
--- a/automake.in
+++ b/automake.in
@@ -3017,7 +3017,7 @@ sub check_typos ()
{
  $varname =~ /^(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
  msg_var ('syntax', $var, variable `$varname' is defined but no
-  .  program or\nlibrary has `$1' as canonic name
+  .  program or\nlibrary has `$1' as canonical name
   .  (possible typo))
unless $var-rdef ($cond)-seen;
}
--
1.6.2.rc1.285.gc5f54




Vala support for automake

2009-03-31 Thread Jürg Billeter
I've updated the Vala support patches initially written by Mathias
Hasselmann to fix a few issues and to conform to the reworked header
file generation in Vala 0.7. It appears to work well with a simple test
project including correct distcheck and maintainer-clean functionality.
I didn't get around yet to test it with larger projects, but I'm not
aware of outstanding issues in the patch.

The Vala support is intended to be used with the upcoming Vala 0.7
release series (git master) and all later versions. Earlier versions may
work with some limitations (e.g., only recursive make). Vala 0.7.0 is
expected to be released this week.

Regards,
Jürg
From e98d9faf34fbb9ab2e719c22beb968e386d06425 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?J=C3=BCrg=20Billeter?= j...@bitron.ch
Date: Tue, 31 Mar 2009 10:08:24 +0200
Subject: [PATCH] Initial support for the Vala programming language.

* automake.in: Add %known_libraries, lang_vala_rewrite,
lang_vala_finish and lang_vala_target_hook to support the Vala
programming language. Register Vala language hooks.
* doc/automake.texi, NEWS: Document Vala support.
* lib/am/vala.am: Empty rules file to prevent creation of depend2
based rules for Vala code.
* lib/am/Makefile.am (dist_am_DATA): Add vala.am.
* m4/vala.m4: Provide AM_PROG_VALAC for detecting the Vala compiler.
* m4/Makefile.am (dist_m4data_DATA): Add vala.m4.
* tests/vala.test: Test Vala support.
* tests/vala1.test: Test .c file generation.
* tests/vala2.test: Test recursive make.
* tests/vala3.test: Test non-recursive make.
* tests/vala4.test: Test AM_PROG_VALAC.
* tests/Makefile.am: Update.
Based on patch by Mathias Hasselmann.
---
 ChangeLog  |   20 ++
 NEWS   |2 +
 automake.in|   99 +++-
 doc/automake.texi  |   52 +++
 lib/am/Makefile.am |1 +
 lib/am/Makefile.in |1 +
 lib/am/vala.am |   17 +
 m4/Makefile.am |3 +-
 m4/Makefile.in |3 +-
 m4/vala.m4 |   29 +++
 tests/Makefile.am  |5 +++
 tests/Makefile.in  |5 +++
 tests/vala.test|   59 +++
 tests/vala1.test   |   58 ++
 tests/vala2.test   |   70 
 tests/vala3.test   |   64 +
 tests/vala4.test   |   61 
 17 files changed, 546 insertions(+), 3 deletions(-)
 create mode 100644 lib/am/vala.am
 create mode 100644 m4/vala.m4
 create mode 100755 tests/vala.test
 create mode 100755 tests/vala1.test
 create mode 100755 tests/vala2.test
 create mode 100755 tests/vala3.test
 create mode 100755 tests/vala4.test

diff --git a/ChangeLog b/ChangeLog
index 3e08fe6..cadf637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2009-03-31  Jürg Billeter  j...@bitron.ch
+
+	Initial support for the Vala programming language.
+	* automake.in: Add %known_libraries, lang_vala_rewrite,
+	lang_vala_finish and lang_vala_target_hook to support the Vala
+	programming language. Register Vala language hooks.
+	* doc/automake.texi, NEWS: Document Vala support.
+	* lib/am/vala.am: Empty rules file to prevent creation of depend2
+	based rules for Vala code.
+	* lib/am/Makefile.am (dist_am_DATA): Add vala.am.
+	* m4/vala.m4: Provide AM_PROG_VALAC for detecting the Vala compiler.
+	* m4/Makefile.am (dist_m4data_DATA): Add vala.m4.
+	* tests/vala.test: Test Vala support.
+	* tests/vala1.test: Test .c file generation.
+	* tests/vala2.test: Test recursive make.
+	* tests/vala3.test: Test non-recursive make.
+	* tests/vala4.test: Test AM_PROG_VALAC.
+	* tests/Makefile.am: Update.
+	Based on patch by Mathias Hasselmann.
+
 2009-03-29  Ralf Wildenhues  ralf.wildenh...@gmx.de
 
 	Rewrite maintainer-check in separate tests, parallelizable.
diff --git a/NEWS b/NEWS
index 6b94a7c..0126a14 100644
--- a/NEWS
+++ b/NEWS
@@ -42,6 +42,8 @@ New in 1.10a:
   - The default source file extension (.c) can be overridden with
 AM_DEFAULT_SOURCE_EXT now.
 
+  - Vala source files are recognized now.
+
 * Miscellaneous changes:
 
   - Automake development is done in a git repository on Savannah now, see
diff --git a/automake.in b/automake.in
index c1321f0..f5d0dac 100755
--- a/automake.in
+++ b/automake.in
@@ -112,7 +112,7 @@ sub finish ($)
   my ($self) = @_;
   if (defined $self-_finish)
 {
-  {$self-_finish} ();
+  {$self-_finish} (@_);
 }
 }
 
@@ -569,6 +569,7 @@ my @dist_targets;
 # Keep track of all programs declared in this Makefile, without
 # $(EXEEXT).  @substitutions@ are not listed.
 my %known_programs;
+my %known_libraries;
 
 # Keys in this hash are the basenames of files which must depend on
 # ansi2knr.  Values are either the empty string, or the directory in
@@ -699,6 +700,7 @@ sub initialize_per_input ()
 @dist_targets = ();
 
 %known_programs = ();
+%known_libraries= ();
 
 %de_ansi_files = ();
 
@@ -802,6 +804,21 @@ register_language 

Re: avoid failure of txinfo18.test due to texi2dvi and my paranoia

2009-03-31 Thread Ralf Wildenhues
Hi Jim,

* Jim Meyering wrote on Mon, Mar 30, 2009 at 08:26:32AM CEST:
 +
 + avoid test failure due to paranoid TAR_OPTIONS envvar setting
 + * tests/txinfo18.test: Don't let a TAR_OPTIONS=--keep-old-files
 + envvar setting cause test failure.  texi2dvi v

Thanks, also for the spelling patch.  I took liberty to finish this
sentence.

Cheers,
Ralf

2009-03-31  Jim Meyering  meyering...

Avoid test failure due to paranoid TAR_OPTIONS envvar setting.
* tests/txinfo18.test: Don't let a TAR_OPTIONS=--keep-old-files
environment variable setting cause test failure.  Fixed in
texi2dvi 4.13.





Re: Vala support for automake

2009-03-31 Thread Ralf Wildenhues
Hello Jürg,

* Jürg Billeter wrote on Tue, Mar 31, 2009 at 01:11:55PM CEST:
 I've updated the Vala support patches initially written by Mathias
 Hasselmann to fix a few issues and to conform to the reworked header
 file generation in Vala 0.7.

Thanks for your work on this.  I see your patch is based on current
Automake git master.  If you like, you can rebase it against the 'next'
branch, which has currently the most recent beta.  Or as a rediff
against the mh-vala-support branch, that would have the aesthetic
advantage of showing which parts were contributed by Mathias and which
parts by you.

Anyway, no need to do either of this.  The rebase to next should be
a trivial merge though, and all that should be fixed up is a 'lder'
entry in the register_language call, so that silent-rules mode works
nicely with valac.

BTW, where can we read about the current semantics of valac?

Where can I get a recent vala compiler to install, and if there isn't an
unofficial Debian package for it yet (and the build-deps have changed
compared to 0.5.7.1), what other packages do I need to install it?
Thanks.

 It appears to work well with a simple test
 project including correct distcheck and maintainer-clean functionality.

We need to work on this.  It is by far the single way to shake out bugs
very quickly.  A list of things that need to be tested listed below.

 The Vala support is intended to be used with the upcoming Vala 0.7
 release series (git master) and all later versions. Earlier versions may
 work with some limitations (e.g., only recursive make). Vala 0.7.0 is
 expected to be released this week.

Should the section about Vala support in the Automake manual (and the
NEWS addition) mention that 0.7 is the earliest Vala version this is
suitable with (if that is indeed the case)?

More comments inline.  Some are rather notes to self, but the more you
can address the better.

 * automake.in: Add %known_libraries, lang_vala_rewrite,
 lang_vala_finish and lang_vala_target_hook to support the Vala
 programming language. Register Vala language hooks.
 * doc/automake.texi, NEWS: Document Vala support.
 * lib/am/vala.am: Empty rules file to prevent creation of depend2
 based rules for Vala code.
 * lib/am/Makefile.am (dist_am_DATA): Add vala.am.
 * m4/vala.m4: Provide AM_PROG_VALAC for detecting the Vala compiler.
 * m4/Makefile.am (dist_m4data_DATA): Add vala.m4.
 * tests/vala.test: Test Vala support.
 * tests/vala1.test: Test .c file generation.
 * tests/vala2.test: Test recursive make.
 * tests/vala3.test: Test non-recursive make.
 * tests/vala4.test: Test AM_PROG_VALAC.
 * tests/Makefile.am: Update.
 Based on patch by Mathias Hasselmann.

I'd like to add Mathias to ChangeLog, and both of you to THANKS before
committing.

 +# Vala
 +register_language ('name' = 'vala',
 +'Name' = 'Vala',
 +'config_vars' = ['VALAC'],
 +'flags' = ['VALAFLAGS'],
 +'compile' = '$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)',
 +'compiler' = 'VALACOMPILE',
 +'extensions' = ['.vala'],
 +'output_extensions' = sub { (my $ext = $_[0]) =~ s/vala$/c/;
 + return ($ext,) },
 +'rule_file' = 'vala',
 +'_finish' = \lang_vala_finish,
 +'_target_hook' = \lang_vala_target_hook,
 +'nodist_specific' = 1);

The nodist_specific setting should be exposed in some test (i.e., after
following recommendations below, there should be a test that fails if
this setting is removed).

 @@ -5646,6 +5676,73 @@ sub lang_c_finish
  }
  }
  
 +sub lang_vala_finish_target ($$)
 +{
 +  my ($self, $name) = @_;
 +
 +  my $derived = canonicalize ($name);
 +  my $varname = $derived . '_SOURCES';
 +  my $var = var ($varname);
 +
 +  if ($var)
 +{
 +  foreach my $file ($var-value_as_list_recursive)
 +{
 +  $output_rules .= $file: ${derived}_vala.stamp ;\n

Hmm.  This doesn't look like one of the approaches mentioned in
  info Automake Multiple Outputs

(should be tested with some non-GNU make).

 +if ($file =~ s/(.*)\.vala$/$1.c/);

The outer parentheses are not necessary here.

The translation here is not correct if per-target flags (VALAFLAGS) are
used.  The Makefile.in generated by vala.test shows this: DIST_COMMON
lists zardoz-zardoz.c and maintainer-clean removes it, but the rule is
only for zardoz.c.

This renaming of outputs is necessary for something like
  bin_PROGRAMS = foo bar
  foo_SOURCES = baz.vala
  bar_SOURCES = baz.vala
  bar_VALAFLAGS = -bla

where the -bla flag causes the .c files for foo and bar to be different.

This should be exposed in the testsuite (as XFAIL if it is not fixed).

 +}
 +}
 +
 +  my $compile = $self-compile;
 +
 +  # Rewrite each occurrence of `AM_$flag' in the compile
 +  # rule into `${derived}_$flag' if it exists.
 +  for my $flag (@{$self-flags})
 +{
 +  my $val =