automake
[Top][All Lists]
Advanced

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

Re: special dependencies


From: Ralf Wildenhues
Subject: Re: special dependencies
Date: Wed, 23 Dec 2009 08:11:33 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hello Martin,

* Martin Kalbfuß wrote on Wed, Dec 23, 2009 at 04:42:18AM CET:
> sklib_LIBRARIES = libsk.a
> 
> libsk_a_SOURCES = \
>         SKGeneral.mod \
>         SKVideo.mod \
>         SKVersion.mod \
>         SKTime.mod
> 
> sklib_HEADERS = \
>         GeneralBase.def \
>         SKGeneral.def \
>         SKVersion.def \
>         VideoBase.def \
>         SKVideo.def \
>         TimeBase.def \
>         SKTime.def
> 
> SKTime.mod : SKGeneral.def TimeBase.def
> SKVideo.mod : SKGeneral.def VideoBase.def
> SKGeneral.mod : GeneralBase.def
> 
> .mod.o:
>         $(M2C) -c $(M2CFLAGS) $<
> 
> MAINTAINERCLEANFILES = *~
> 
> It runs fine. Like it would with C sources. The problem is, that defs
> aren't headers. They aren't included in the sources. If I change a
> definition file, the change isn't recognized by make. Is there a way to
> set the definitions as dependencies to sklib.a?
> 
> I have these extra dependencies:
> 
> SKTime.mod : SKGeneral.def TimeBase.def
> SKVideo.mod : SKGeneral.def VideoBase.def
> SKGeneral.mod : GeneralBase.def

This doesn't make sense.  Your Makefile.am doesn't have a rule to
regenerate .mod files from .def files.  I suppose you mean that .o files
depend not only upon their .mod files but also on some .def files?

You can either add them to your Makefile.am manually:
  SKTime.o : SKGeneral.def TimeBase.def
  SKVideo.o : SKGeneral.def VideoBase.def
  SKGeneral.o : GeneralBase.def

Alternatively, if there is some way to get the $(M2C) compiler to output
these lines, ideally as by-product of compilation, you can try to
arrange things so that these dependency statements are put in makefile
snippets and included from the main makefile.  The technique employed
by Automake (for C and C++) is fairly complex, the manual has some
history on this.

Hope that helps.

Cheers,
Ralf




reply via email to

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