automake
[Top][All Lists]
Advanced

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

Re: How do I configure Makefile.am to run a program?


From: Jim Lynch
Subject: Re: How do I configure Makefile.am to run a program?
Date: Sat, 22 Mar 2008 09:43:54 -0400

On Fri, Mar 21, 2008 at 3:28 PM, John Calcote <address@hidden>
wrote:

> Jim,
>
>
> Don't use make to do this - just use autoconf, and let your configure
> script deal with it:
>
> configure.ac
> ------------
> AC_INIT(...)
> ...
> svnrev=`svnversion .`
> AC_SUBST(svnrev)
> ...
> AC_CONFIG_FILES([Makefile ... poll.spec)
> AC_OUTPUT
> ------------
>
> Now create a file called poll.spec.in that contains an exact copy of your
> existing poll.spec, but add the autoconf substitution variable, @svnrev@
> where it make sense.
>
> In a Makefile.am in the directory containing your poll.spec file, add
>
> EXTRA_DIST = ... poll.spec
>
> I use this trick all the time and it works great! In fact, I generate most
> of my rpm and debian build scripts this way.
>
> Regards,
> John
>
> Hi John,

Thanks, but the problem with this solution is that I would have to rerun the
.configure step each time.  Forgetting to do that is as as easy as
forgetting to edit the spec file.

Jim.


reply via email to

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