[Top][All Lists]

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

Re: c file used as a make file

From: Ralf Wildenhues
Subject: Re: c file used as a make file
Date: Fri, 1 Apr 2011 11:14:30 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Paul,

* Paul Elliott wrote on Tue, Mar 22, 2011 at 03:01:49PM CET:
> On Tuesday, March 22, 2011 01:54:33 am Paul Elliott wrote:
> > One .c file is used as a .h file. That is, it is included by another .c
> > file and it should not be itself compiled. Why the author did this I do
> > not know, but I do not want to change the author's source or change or
> > rename any files.
> > 
> > How do I tell auto*tools to treat this file as a .h file? That is, do not
> > try to compile this file itself, and do include it in the files to be
> > distributed.

Instead of
  foo_SOURCES += treat-as-header.c

  EXTRA_DIST += treat-as-header.c

and be done with it.

> Can I write a rule for the .lo that has to be compiled with the wierd
> include that would explictly list the .c file as a dependancy? How would I do 
> that?

Is the .c file generated?  If yes, then try adding it to BUILT_SOURCES,
if not, then the automatic dependency tracking should pick up the
dependency for you when the object is built for the first time.

Hope that helps.


reply via email to

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