[Top][All Lists]

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

Re: release and test targets

From: Ralf Corsepius
Subject: Re: release and test targets
Date: Sat, 10 Dec 2005 09:22:12 +0100

On Fri, 2005-12-09 at 22:45 +0100, Baurzhan Ismagulov wrote:
> Hello Brendan,
> On Fri, Dec 09, 2005 at 04:18:10PM -0500, Jacobs, Brendan D. wrote:
> > We'd like to be able to do "make test" and
> > "make release", and have automake just make the make release libraries
> > and programs versus using test programs, respectively.  Is there any
> > support for user-specified targets?  Or, can you recommend another way
> > to accomplish this w/ the current 1.92 version of automake?   
> It depends on the difference between test and release. For us, it is
> compiler and configure options. I usually "./configure CFLAGS=-O0". For
> test, I "make". For release, I could "make CFLAGS=-O2 prefix=/usr
> sysconfdir=/etc localstatedir=/var" (although I don't, since the release
> is for another architecture and is packaged). If this suits your needs,
> you could add something like the following to your
> release:
>         $(MAKE) CFLAGS=-O2 prefix=/usr sysconfdir=/etc localstatedir=/var
You are miss interpreting automake's tasks. Packaging is not of
automake's business.

Your approach isn't much more but a short-cut to your personal and local
practice and setup. It is wrong and therefore inapplicable almost
anywhere else.

I.e. makefiles are not the appropriate place to implement this. Writing
a local shell script or encapsulating this into the config files of the
packaging system you are using (e.g. rpm.specs) would be the appropriate

> > By the way, beside release builds, we're after a decrease in build time.
> > We'd really like the "make release" to shorten our build time by only
> > building the non-test directories.  
Same as above. It depends on what you consider to be a "release".
Packaging binaries is not of automake's business, it's your task.

To conditionally not compile/execute parts of your package, you normally
compile/execute as part of your development process, you could implement
a --enable-* (e.g. --enable-tests) configuration option and set up
corresponding AM_CONDITIONALS in your Makefile.ams. This way, for
ordinary users, which don't want to perform the tests, "make all" would
not execute your tests.


reply via email to

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