autoconf
[Top][All Lists]
Advanced

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

Problem with "unused" AC function


From: Sebastian Huber
Subject: Problem with "unused" AC function
Date: Wed, 25 Sep 2002 21:55:07 -0700

Hello,
my configure.in looks like:
AC_INIT(test-automake, 0.0.0, address@hidden)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.in)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
TEST_AUTOMAKE_USED
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_CONFIG_FILES(Makefile src/Makefile lib/Makefile)
AC_OUTPUT

and my acinclude.m4:
AC_DEFUN(TEST_AUTOMAKE_UNUSED,[
        AM_CONFIG_HEADER(config.h)
])

AC_DEFUN(TEST_AUTOMAKE_USED,[
        echo "TEST_USED"
])

This is the output of the project initialization:

test -d config || mkdir config
libtoolize --copy --force --automake
aclocal
autoheader
autoheader: `config.h.in' is created
automake --add-missing --copy --include-deps --foreign
configure.in: installing `config/install-sh'
configure.in: installing `config/mkinstalldirs'
configure.in: installing `config/missing'
lib/Makefile.am: installing `config/depcomp'
autoconf
./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
TEST_USED
[...]
creating libtool
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating lib/Makefile
config.status: creating config.h
config.status: executing depfiles commands
make
make[1]: Entering directory `/home/huber/tmp/test-automake'
Makefile:140: warning: overriding commands for target `config.h'
Makefile:126: warning: ignoring old commands for target `config.h'
Makefile:150: warning: overriding commands for target `config.h.in'
Makefile:136: warning: ignoring old commands for target `config.h.in'
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[2]: Entering directory `/home/huber/tmp/test-automake'
Makefile:140: warning: overriding commands for target `config.h'
Makefile:126: warning: ignoring old commands for target `config.h'
Makefile:150: warning: overriding commands for target `config.h.in'
Makefile:136: warning: ignoring old commands for target `config.h.in'
Making all in src
[...]
make[3]: Entering directory `/home/huber/tmp/test-automake'
Makefile:140: warning: overriding commands for target `config.h'
Makefile:126: warning: ignoring old commands for target `config.h'
Makefile:150: warning: overriding commands for target `config.h.in'
Makefile:136: warning: ignoring old commands for target `config.h.in'
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make[3]: Leaving directory `/home/huber/tmp/test-automake'
make[2]: Leaving directory `/home/huber/tmp/test-automake'
make[1]: Leaving directory `/home/huber/tmp/test-automake'

I think that the TEST_AUTOMAKE_UNUSED is not used because it is not
invoked in the 'configure.in', but the
AM_CONFIG_HEADER(config.h)
statement has an effect. It creates a second config.h entry in the Makefile.
It seems to me that this is a bug, or did I something wrong?

Ciao
        Sebastian

Attachment: test-automake.tar.gz
Description: application/tgz


reply via email to

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