|
From: Francesco M. <f18...@ya...> - 2004-10-03 15:14:25
|
Hi,
> First of all each component is free to choose its own build system.
I'm just proposing to put a bakefile in a folder like wxCode/build to
give to the programmers of wxCode the *possibility* to use bakefile:
it wouldn't be required, just an option to make "standardized" the
compilation & packaging of a wxCode's component.
Each programmer could decide to use its old build system
(tipically a makefile) or bakefile or both.
> Second it's not easy possible to create a build system for all
> components since if one doesn't build it may stop the others from
> building.
well, I did not mean to create a super-makefile/bakefile which allows
the compilation of all components with one command.
I'm just proposing to give to all the components whose mantainers approve
this build
system the same targets in bakefile-generated makefiles: they could be
- ALL: docs + samples + lib + tarball + others
- LIB: creates a (small) library using the sources of the component (if it
makes sense for
the component to be packaged in a library)
- TARBALL: creates a tar.gz archive containing the sources of the component,
to provide
1) the release of the component, ready to be uploaded at SF.net
2) an easy-to-use system for the component's mantainer to provide
the sources
of its component to others.
- DOCS: creates the documentation for the component, if it support some sort
of doc-generation
(like doxygen)
- SAMPLES: builds all the samples of the component
In this way, a programmer who wants to use a component can decide if he
wants to
use it as an external library (and thus compiling the component with the LIB
target)
or to integrate the component's sources in its project (downloading for
example the tarball)....
> Of course you are free to create as system which can handle a
> changing set of components. Anyway it doesn't make much sense to create
> a build system for wxCode as long as it isn't supported by wxWidgets.
such a system could be easily integrated in the future in wxWidgets build
system
since bakefiles are quite flexible and they are used everywhere in
wxWidgets.
> Third I don't think Bakefile is needed for anything else except the
> _main_ wxWidgets libraries. The _only_ solution is to use wx-config all
> the time since wx-config contains _every_ build information on any
> system. BTW IMO even the main libraries could be built with wx-config
> without Bakefile not to speak of all the contribs, demos, samples,
> utilities, etc.
wx-config program is wonderful but it can be used only with those systems
supporting autoconf: on win32 you cannot use wx-config (at least, not with
all compilers !).
if you see my components, you will see that in the BUILD folder, there
are always two bakefiles: wxbase.bkl and wxscript/keybinder/....
wxbase.bkl is a bakefile I modified from the original version created by
Ryan Norton and which I put at wxwiki: it allows the creation of perfectly
working win32 makefiles and the use of autoconf on platform supporting it.
Precisely, using wxbase.bkl you can produce "Makefile.in" files containing
the following CXXFLAGS:
MATHCORE_CXXFLAGS = $(__mathcore_PCH_INC) $(MCDEBUG_DEFINE)
$(MCINCLUDE_PATHS) \
-I../../include `wx-config --cxxflags` -Wall $(CPPFLAGS) $(CXXFLAGS)
as you see, bakefile allows without any problem the usage of "wxconfig"
(with the compilers that support it)
> Bakefile has its use for creating base make/project files for all the
> different platform but it shouldn't be used for more. Just look at the
> Makefile of treelisttest and compare it with the Makefile of wyoEditor.
> You can easily copy this Makefile and just exchange the source files and
> maybe the libraries. With the use of wx-config nothing else is needed
> while it works everywhere.
also on win32 ?
As far as I know, only the mingw compiler (& cygwin suite) supports the use
of wx-config on win32....
As you said, GCC makefiles can be easily re-used (in fact, my components
are actually using bakefile only to generate win32 makefiles) and I often
copy them just changing the source file lists, too.
Anyway, hybrid solutions can be easily supported, too: the mantainer would
be free to choose what he likes most.
Let me know,
Francesco Montorsi
|