Source: genders
Version: 1.17-2
Severity: important
Justification: future ftbfs
Tags: upstream patch

Hi,

dash recently gained $LINENO support (see [1]), so autoconf now
considers it a suitable shell to run its configure scripts.  The
relevant versions of dash are in experimental for now; if you want
to test in sid, you can do

        CONFIG_SHELL=/bin/dash debian/rules build

with the same effect.

Anyway, when I try this, it stumbles on various uses of "test -a".
The ksh manual says:

        -a file
                Same as -e below.  This is obsolete.

POSIX says concerning the -e operator:

        ... An early proposal
        used the KornShell −a primary (with the same meaning), but
        this was changed to −e because there were concerns about the
        high probability of humans confusing the −a primary with the
        −a binary operator.

The patch below the perforation below fixes it for me.  I ran
"autoreconf" before testing, after applying

  --- a/Makefile.am
  +++ b/Makefile.am
  @@ -6,6 +6,8 @@
   
   DISTCHECK_CONFIGURE_FLAGS = --with-perl-destdir=$$dc_install_base
   
  +ACLOCAL_AMFLAGS = -I config --install
  +
   SUBDIRS = \
           src \
           compat \
  diff --git a/configure.ac b/configure.ac
  index e881312..48e4a92 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -63,6 +63,7 @@ AC_SUBST([PYTHONGENDERS_VERSION])
   # Checks for programs.
   ##
   AC_PROG_CC
  +AM_PROG_CC_C_O
   AC_PROG_CXX
   AC_PROG_LIBTOOL
   AC_PROG_MAKE_SET

so "autoreconf -s" could run without complaint.

Thoughts?
Jonathan

[1] http://bugs.debian.org/582952

-- >8 --
Subject: */Makefile.am: avoid ancient ksh-ism "test -a"

The "test" builtin in some shells such as dash do not implement
"test -a" and even more shells do not document it.  The POSIX way to
ask if a file exists is "test -e".

Probably this was not noticed until recently because autoconf would
fall back to bash because dash lacked support for the $LINENO
variable.

Signed-off-by: Jonathan Nieder <jrnie...@gmail.com>
---
 src/extensions/perl/Genders/Makefile.am    |    2 +-
 src/extensions/perl/Libgenders/Makefile.am |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/extensions/perl/Genders/Makefile.am 
b/src/extensions/perl/Genders/Makefile.am
index 42e641a..909ebca 100644
--- a/src/extensions/perl/Genders/Makefile.am
+++ b/src/extensions/perl/Genders/Makefile.am
@@ -15,7 +15,7 @@ GENDERSPMFILES_DATA = $(GENDERSPMFILES)
 
 Genders.$(PERLMAN3EXT):
 # Hacks to make distcheck work
-       if ! test -a Genders.pm; then \
+       if ! test -e Genders.pm; then \
                cp $(srcdir)/Genders.pm .; \
        fi
        $(POD2MAN) Genders.pm Genders.$(PERLMAN3EXT)
diff --git a/src/extensions/perl/Libgenders/Makefile.am 
b/src/extensions/perl/Libgenders/Makefile.am
index c544df2..2b40447 100644
--- a/src/extensions/perl/Libgenders/Makefile.am
+++ b/src/extensions/perl/Libgenders/Makefile.am
@@ -32,16 +32,16 @@ all: Makefile.xs
 
 Makefile.xs: Makefile.PL Libgenders.xs Libgenders.pm
 # Hacks to make distcheck work
-       if ! test -a Makefile.PL; then \
+       if ! test -e Makefile.PL; then \
                cp $(srcdir)/Makefile.PL .; \
        fi
-       if ! test -a typemap; then \
+       if ! test -e typemap; then \
                cp $(srcdir)/typemap .; \
        fi
-       if ! test -a Libgenders.pm; then \
+       if ! test -e Libgenders.pm; then \
                cp $(srcdir)/Libgenders.pm .; \
        fi
-       if ! test -a Libgenders.xs; then \
+       if ! test -e Libgenders.xs; then \
                cp $(srcdir)/Libgenders.xs .; \
        fi
        $(PERL) Makefile.PL $(MAKEMAKERFLAGS)
@@ -62,7 +62,7 @@ uninstall:
        $(MAKE) -f Makefile.xs uninstall
 
 clean: 
-       if test -a Makefile.xs; then \
+       if test -e Makefile.xs; then \
                $(MAKE) -f Makefile.xs clean; \
        fi
        rm -f *.c
-- 
1.7.5.rc3




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to