[Top][All Lists]

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

Problem using same .y file in multiple libs and AM_YFLAGS=-d

From: Sander Niemeijer
Subject: Problem using same .y file in multiple libs and AM_YFLAGS=-d
Date: Wed, 17 Sep 2003 12:12:35 +0200

Hi all,

I am using a yacc/bison source file in a libtool library, but I create both an installable static/shared version of the library as well as an internal convenience library (so I can later on link the PIC objects directly into another shared library). Since I need the header file with the parser definitions I use the "AM_YFLAGS = -d" option to have automake do this for me.

The problem is that automake (1.7.7) doesn't see that the .y source files in the _SOURCES definitions of two libraries (the installable one and the internal convenience one) are actually the same and thus, because of the AM_YFLAGS definition, creates two identical rules in the final Makefile for the .h file. This is something the make program obviously doesn't like and I therefore receive a 'warning: overriding commands for target' warning.

A simple example that shows this behavior is:



libfoo_la_SOURCES = foo.y
libfoo_la_LDFLAGS = -version-info 0:0:0

libfoo_internal_la_SOURCES = foo.y

Does anybody know how I can get rid of the make warnings (and, just out of interest, will these warnings stay warnings when I use a different make program instead of GNU make, or might other make programs see the double .h rule definition as an error)?

P.S. I also have, for anyone who is interested, a small example package available with just a single .y file that reproduces the problem.

Sander Niemeijer

reply via email to

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