automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] New tests on obsoleted usages of automake/autoconf macros.


From: Ralf Wildenhues
Subject: Re: [PATCH] New tests on obsoleted usages of automake/autoconf macros.
Date: Fri, 12 Nov 2010 20:17:37 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Stefano,

* Stefano Lattarini wrote on Wed, Nov 03, 2010 at 07:12:27PM CET:
>  <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00003.html>
[...]
> --- /dev/null
> +++ b/tests/backcompat6.test
> @@ -0,0 +1,105 @@

> +# Backward-compatibility test: try to build and distribute a package
> +# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
> +# This script can also serve as mild stress-testing for Automke.
> +# See also the similar test `backcompat5.test'.

> +cat >> Makefile.am <<'END'
> +bin_PROGRAMS = foo
> +foo_SOURCES = quux.c
> +DISTCLEANFILES = *.tmp
> +check-local:
> +     rm -f exp got
> +     echo 'PACKAGE = nonesuch-zardoz' > exp.tmp
> +     echo 'VERSION = nonesuch-0.1' >> exp.tmp
> +     echo 'PACKAGE = $(PACKAGE)' > got1.tmp
> +     echo 'VERSION = $(VERSION)' >> got1.tmp
> +     ./foo > got2.tmp
> +     cat exp.tmp
> +     cat got1.tmp
> +     cat got2.tmp
> +     diff exp.tmp got1.tmp
> +     diff exp.tmp got2.tmp
> +END
> +
> +cat > quux.c <<'END'
> +#include <config.h>
> +#include <stdio.h>
> +int main (void)
> +{
> +  printf("PACKAGE = %s\nVERSION = %s\n", PACKAGE, VERSION);
> +  return 0;
> +}
> +END

The diff between exp.tmp and got2.tmp fails on MinGW/MSYS because the
foo program uses w32-style CRLF newlines whereas the shell prints LF
only.

The easiest fix would be to grep for the lines in question, I guess.

Thanks,
Ralf



reply via email to

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