From: Andreas L. <no...@sb...> - 2001-10-21 23:21:43
|
On Mon, 2001-10-22 at 00:36, Eric Bezault wrote: > Andreas Leitner wrote: > > > > Yes, but this design assumes we do not get another option. For example > > the xml examples can be compiled with or without expat. Other such > > options will surely come with time. Now do I need for each option touch > > misc/eiffel.eant and add rules (which would clutter it up) that only > > make sense for some projects. > > No, don't add anything to misc/eiffel.eant, just add a new > .eant file in misc (say misc/cc.eant) that inherits from > misc/eiffel.eant and adds the various C compilation rules > parameterized with geant's local variables (in the same way > the 'compile_<compiler>' targets in misc/eiffel.eant are > parameterized). Sure, but let's stick with the xml example build.eant files. You can compile the examples with or without the expat backend enabled. You can decide this on a per example per compile basis. And take into account that more such options are thinkable. For each new (boolean) option I have to double the "compile_" tasks. This does not look attractive to me. So if we start with: compile_ise compile_se compile_hact compile_ve then we want debug builds as well so we double: compile_ise compile_se compile_hact compile_ve compile_ise_debug compile_se_debug compile_hact_debug compile_ve_debug then we want to compile with expat: compile_ise compile_se compile_hact compile_ve compile_ise_debug compile_se_debug compile_hact_debug compile_ve_debug compile_ise_expat compile_se_expat compile_hact_expat compile_ve_expat compile_ise_debug_expat compile_se_debug_expat compile_hact_debug_expat compile_ve_debug_expat then we would like to link against the posix libraries: compile_ise compile_se compile_hact compile_ve compile_ise_debug compile_se_debug compile_hact_debug compile_ve_debug compile_ise_expat compile_se_expat compile_hact_expat compile_ve_expat compile_ise_debug_expat compile_se_debug_expat compile_hact_debug_expat compile_ve_debug_expat compile_ise_posix compile_se_posix compile_hact_posix compile_ve_posix compile_ise_debug_posix compile_se_debug_posix compile_hact_debug_posix compile_ve_debug_posix compile_ise_expat_posix compile_se_expat_posix compile_hact_expat_posix compile_ve_expat_posix compile_ise_debug_expat_posix compile_se_debug_expat_posix compile_hact_debug_expat_posix compile_ve_debug_expat_posix Actually I think the autoconf/autobuild people have a better approach here. They seperate the task of configuring and building a project into two tasks. In the first task you call: ./configure --with-expat --debug --my-other-option and then do a simple make We could do something similar: Have a configure.eant file that stores configuration options. A configure.eant file (that would grows linearly only) could look like this: <configure> <var name="expat" value="true"/> <var name="debug" value="true"/> <var name="posix" value="true"/> </configure> This also much more reflects the usage. I do not switch from debug builds to release builds on every compile. Rather I am doing some work with debug options enabled, then reconfigure, and then I try some stuff in release mode. Some goes for expat, etc. Btw, I think the build options in GOBO will increase as we add components that do not make sense / are not available on every setup. A low-maintainace solution to add/remove options will help here. geant would still work without a configure.eant file. It would just assume the default values. We could also add some tool that manipulates the configure.eant file just like ./configure - if we don't want users to launch their editors. Such a tool could even run in autodectect mode and for example set expat only if it can find the library (similar to what ./configure does). > > That was my first approach, meanwhile I put this clause out again, > > because IMO it is a little ugly. So I added a remark to put a symlink > > from "studio" to "bench". > > It's your point of view, but I find my solution less ugly, > and no need to modify the ISE installation (remember that > Gobo should ideally work out of the box). Well, but you assume that all linux users have the latest beta. Earlier versions do have the old path. Again a ./configure pendant could autodetect such things. Andreas |