automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch 4: test for --help and --version (take 2)


From: Alexandre Duret-Lutz
Subject: Re: patch 4: test for --help and --version (take 2)
Date: Thu, 13 Jun 2002 20:27:32 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

>>> "Bonzini" == Bonzini  <address@hidden> writes:

[...]

 Bonzini> --help and --version tests, if added to installcheck,
 Bonzini> would also provide a basic test that everything is
 Bonzini> fine WRT shared libraries, @INC and the like.  

I think this is a good point in favor of running check-options
from installcheck (which itself is run during distcheck).
Checking for `--help' and `--version' in itself is not very
interesting (at least I think it's not worth the time spent
in `make check' for doing this).

 Bonzini> But it wouldn't be a minor patch, because all the
 Bonzini> machinery that Automake provides would have to be
 Bonzini> duplicated for installcheck'ing.

Cheer up!  It will be easier and cleaner, precisely because 
you don't have to fiddle with @check_tests and cousins.

You can attach your rule to installcheck-am using the following
line in the `am' file:

.PHONY installcheck-am: check-options

[...]

Just a few comments on your test case:

| + . $srcdir/defs || exit 1
| + 
| + # Fail gracefully if no autoconf.
| + $needs_autoconf
| + # Likewise for some other tools.
| + (gcc -v) > /dev/null 2>&1 || exit 77

Today this should be

  required=gcc
  . $srcdir/defs || exit 1

(We no longer test for autoconf in testcases, 
it's an Automake requirement.)

| + 
| + cat > configure.in << 'END'
| + AC_INIT
| + AC_CONFIG_AUX_DIR([.])
| + AM_INIT_AUTOMAKE(foo, 0.1)
| + PACKAGE=foo
| + VERSION=0.1
| + AC_PROG_MAKE_SET
| + AC_PROG_INSTALL
| + AC_PROG_CC
| + AC_OUTPUT(Makefile)
| + END

Just append what you need to the existing 
configure.in (created by ./defs):

  cat >>configure.in <<'END'
  AC_PROG_CC
  AC_OUTPUT
  END

[...]

| + # Files required by Gnits.
| + : > INSTALL
| + : > NEWS
| + : > README
| + : > COPYING
| + : > AUTHORS
| + : > ChangeLog
| + : > THANKS

If you don't use `Gnits'-mode you shouldn't need this.

[...]

-- 
Alexandre Duret-Lutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]