automake
[Top][All Lists]
Advanced

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

Automake 1.5 - depcomp not added to DIST_COMMON


From: Pavel Roskin
Subject: Automake 1.5 - depcomp not added to DIST_COMMON
Date: Tue, 28 Aug 2001 02:43:09 -0400 (EDT)

Hello!

It looks like I just found a serious bug in Automake 1.5.  Perhaps the
Automake team should follow the example of Autoconf and concentrate on
making bugfix releases until (almost) everybody is happy.

The problem is that Automake doesn't add depcomp to DIST_COMMON if

1) the sources are in the subdirectory and
2) depcomp doesn't already exist in the top-level directory.

The problem seems to be more generic, i.e. it's not specific to the
"depcomp" script.  The same happens with the "compile" script.  So I put
testing for both into the same test.

The testcase (distcommon2.test) is attached.

Sorry but I couldn't think of anything portable to avoid using that ugly
sed twice.  Maybe pretty printing should be optional or the line length
should be adjustable instead of fixed 71, then it would be simply

automake --line-length=10000 --add-missing
grep "DIST_COMMON.*compile.*depcomp" Makefile.in || exit 1

-- 
Regards,
Pavel Roskin

------------------------------------------------------
#! /bin/sh

# Test to make sure that depcomp and compile are added to DIST_COMMON
# From Pavel Roskin.

. $srcdir/defs || exit 1

cat > configure.in << 'END'
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
PACKAGE=nonesuch
VERSION=nonesuch
AC_PROG_CC
AC_OUTPUT(Makefile subdir/Makefile)
END

cat > Makefile.am << 'END'
SUBDIRS = subdir
END

mkdir subdir
: > subdir/foo.c

cat > subdir/Makefile.am << 'END'
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
foo_CFLAGS = -DBAR
END

rm -f compile depcomp

$ACLOCAL || exit 1
$AUTOMAKE --add-missing || exit 1

test -f compile || exit 1
test -f depcomp || exit 1

sed -n -e '/^DIST_COMMON =.*\\$/ {
   :loop
   p
   n
   /\\$/ b loop
   p
   n
   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile || exit 1

sed -n -e '/^DIST_COMMON =.*\\$/ {
   :loop
   p
   n
   /\\$/ b loop
   p
   n
   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp || exit 1
------------------------------------------------------




reply via email to

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