cons-discuss
[Top][All Lists]
Advanced

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

Re: cons for modular packages


From: Axel Hecht
Subject: Re: cons for modular packages
Date: Mon, 04 Dec 2000 15:54:17 +0100
User-agent: Mozilla/5.0 (X11; U; SunOS 5.7 sun4u; en-US; m18) Gecko/20001127

Gary Oberbrunner wrote:

"SK" == Steven Knight <address@hidden> writes:


  SK> On Sat, 2 Dec 2000, Axel Hecht wrote:
>> 5) how about support for configure like feature tests?
  SK> There isn't any special support for testing, but Cons can be
  SK> used very easily for executing tests.

I think Axel's talking about the kinds of "system feature tests" that
GNU configure runs on your system to see what it supports (word size,
what's the return type from malloc, does it have memcpy or bcopy,
etc. etc.) before building a package.  It generates a 'config.h' and
all your Makefiles, and then runs make.

Cons doesn't have anything like this built-in, but the beauty of it is
it doesn't *need* to because it's just perl!  You could easily run a
bunch of these tests from the Construct just like configure does (even
easier in fact, because configure has to use minimal 'sh' features and
we have all of perl), then write out a 'config.h' or whatever with
those results, then just continue on with regular cons stuff.  Cons's
dependency analysis stuff will just work like magic.  (You might have
to write a config-tmp.h, compare it with the old one, and mv
config-tmp.h config.h if it's different, to make sure the timestamp
difference doesn't cause spurious rebuilds.)


Hi Gary, thanx for your response.

I was exactly looking for the feature tests, and it would be great to have some pretty setup for this. In autoconf there are alot of useful macros to generate these feature tests, and cons
might want to have such a convenience as well.
This may go so far as to whether the compiler accepts a definition file or does not (a neat
feature in the mozilla build system).

Most important, autoconf has a great deal of ready to use macros, and getting people to change might be easier with a smooth path to do so. All those packages (gtk, gnome, libidl..) with foo_config to determine compile and link options might be worth a way to support in cons as
well.

Axel

PS: I hope I got the reply method right, I just replied to the list, hope this time I will be regarded
as subscribed




reply via email to

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