bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: automake/autoconf bug


From: Andrew D Jewell
Subject: Re: automake/autoconf bug
Date: Tue, 11 Jun 2002 13:58:09 -0400

Here I am, answering my own question.

Properly phrased, my bug report should have complained of problems when changing the file extensions between .c and .cc

The trouble lies in the secret hidden ".deps" directory that is made in the process. If you have foo.c, it writes down "foo.o: foo.c". If later you change foo.c to foo.cc, the "foo.o: foo.c" line remains, and confuses everything.

My a_ filename problems were a red herring, and only seemed like a problem because they were always listed first, and also tended to be the files that got their extensions changed.

Anyway, the .deps problem exists, and should be looked into one day.

adj

At 9:39 PM -0400 6/10/02, Andrew D Jewell wrote:
Or perhaps just a documentation oversight, if this is supposed to happen. Or perhaps I'm missing something obvious.

It seems that mixing .c and .cc files in certain ways confuses things.

For example, take the Makefile.am

noinst_LIBRARIES = libfoo.a
libfoo_a_SOURCES = foo.c

this results in the error :

gmake[2]: *** No rule to make target `foo.cc', needed by `foo.o'.  Stop.

In another iteration, I had a_bin_search.cc in the SOURCES definition, and got an error that a_bin_search.c couldn't be made. The weird part there is that I changed the name to abinsearch.cc and the problem went away.

The configure.ac was about as simple as it could be :

dnl Process this file with autoconf to produce a configure script. -*-m4-*-
AC_INIT(foo, 1.2, address@hidden)

AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h:config.hin)
AC_CANONICAL_HOST

AM_INIT_AUTOMAKE

dnl Checks for programs.

AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_GCC_TRADITIONAL
AC_PROG_RANLIB

AC_CONFIG_FILES(
  Makefile
  lib/Makefile
  )
AC_OUTPUT

Any help or guesses would be most appreciated.

autoconf (GNU Autoconf) 2.53
automake (GNU automake) 1.6.1
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Linux arc132.alexa.com 2.4.17-2v3 #1 Sun Apr 14 22:15:52 PDT 2002 i686 unknown

thanks,
adj


_______________________________________________
Bug-gnu-utils mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-gnu-utils




reply via email to

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