bug-automake
[Top][All Lists]
Advanced

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

Re: Bug in automake parsing of Makefile.am


From: Tom Tromey
Subject: Re: Bug in automake parsing of Makefile.am
Date: 03 Jun 2001 12:49:13 -0600

>>>>> "Roger" == Roger Leigh <address@hidden> writes:

Hi Roger.

Roger> I think I have found a bug in automake:

What version of automake are you using?

Roger> I have the following in configure.in:
Roger> if test x${BUILD_TEST} = xyes ; then
Roger>   TEST_BIN='$(TEST_BIN)'
Roger> fi

Roger> If I have this in Makefile.am it works fine:
Roger> TEST_BIN = testdither escp2-weavetest unprint escp2-unprint pcl-unprint 
bjc-unprint

I'm suprised this works!  Every AC_SUBST gets turned into a Makefile
variable.  So this only works because your redefinition of TEST_BIN
appears later in Makefile.in -- not a good idea.

Roger> AM_CONDITIONAL(BUILD_TEST, test x${BUILD_TEST} = xyes)

I tried to write a test case for this but it worked for me with the
latest automake.

I've appended the code.  Put this into the automake source tree as
tests/conda.test and then run:

    make TESTS=conda.test VERBOSE=t check

Then examine tests/testSubDir/Makefile.in.  When I look at it, it
seems fine to me.

If you aren't using the latest automake, please try it.
Otherwise, if you can help me change this test so that it exhibits the
failure you are seeing, that would be great.

I'm guessing this was fixed at some point, but I can't really be
certain.

Thanks,
Tom


#! /bin/sh

# Test for bug in conditionals.
# From Roger Leigh

. $srcdir/defs || exit 1

cat >> configure.in << 'END'
AM_CONDITIONAL(BUILD_TEST, whatever)
AC_PROG_CC
END

cat > Makefile.am << 'END'
if BUILD_TEST
TEST_BIN = testdither escp2-weavetest unprint escp2-unprint pcl-unprint 
bjc-unprint
else
TEST_BIN =
endif

noinst_PROGRAMS = $(TEST_BIN)
EXTRA_PROGRAMS = escp2-weavetest unprint escp2-unprint pcl-unprint bjc-unprint 
testdither
END

$ACLOCAL || exit 1
$AUTOMAKE



reply via email to

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