[Top][All Lists]

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

Re: automake error with filenames

From: Ralf Wildenhues
Subject: Re: automake error with filenames
Date: Tue, 21 Jul 2009 20:11:10 +0200
User-agent: Mutt/1.5.20 (2009-06-15)

Hello Murray,

* Murray S. Kucherawy wrote on Tue, Jul 21, 2009 at 05:44:48PM CEST:
> sbin_PROGRAMS = openfoo openfoo-util1 openfoo-util2
> One of the source files for "openfoo" is a file called "stats.c".

> if STATS
> sbin_PROGRAMS += openfoo-stats
> openfoo_stats_SOURCES = openfoo-db.c openfoo-stats.c
> endif
> There are indeed two different source files in the package, one called
> "openfoo-stats.c" (used by openfoo-stats) and one called "stats.c"
> (used by openfoo).
> Running "automake" causes this complaint:
> openfoo/ object `openfoo-stats.$(OBJEXT)' created by 
> `openfoo-stats.c' and `stats.c'
> I thought maybe this has to do with filename similarity.  Indeed
> renaming the files, even by removing the hyphens, solves the problem.

The reason for this can be found in
  info Automake "Per-Object Flags"

and the previous node.

> Is this something I can mitigate without renaming files in my package?

You can add something like
  openfoo_stats_CPPFLAGS = $(AM_CPPFLAGS)

as described for a related issue in
  info Automake "Objects created both with libtool and without"

> Also, just to confirm, this is something I can safely ignore, correct?:

That would only be correct if you never intend to have your package
built with a compiler that does not grok the flags "-c -o" together.
These are primarily found on older platforms, and with some MSVC
uses on w32 (I recommend using a wrapper that avoids this issue).

> libfoo/ compiling `foo.c' with per-target flags requires 
> `AM_PROG_CC_C_O' in `'
> Adding that to my "" as it suggests doesn't make the problem go 
> away.

It should, after you have regenerated all autotools files afterwards.


reply via email to

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