automake
[Top][All Lists]
Advanced

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

Re: compiling in the build time


From: Stepan Kasal
Subject: Re: compiling in the build time
Date: Fri, 4 Nov 2005 11:47:49 +0100
User-agent: Mutt/1.4.1i

Hello,

On Thu, Nov 03, 2005 at 10:40:35AM -0800, David Byron wrote:
> geoidx: $(OBJS)
>   <generate builddate.c -- the three echo lines from above>
>   <compile buliddate.c>
>   <link geoidx with $(OBJS) and builddate.o>
> 
> But I'm not sure how to get automake to generate a Makefile like this.

one idea:
1) add a dependecy:

geoidx_DEPENDENCIES = builddate-stamp

(Look at the generated Makefile.in, if geoidx_DEPENDENCIES is there, be
sure to add it here, too.)

Rule for the stamp:

builddate-stamp: $(geoidx_OBJECTS)
        generate builddate.c
        compile builddate.o
        then touch builddate-stamp

Yes, with a normal one-time build, builddate.c will be generated and
compiled twice.  But I guess it doesn't hurt too much.

Have a nice day,
        Stepan Kasal




reply via email to

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