From: Andreas L. <no...@sb...> - 2001-10-21 22:21:03
|
On Mon, 2001-10-22 at 00:03, Eric Bezault wrote: > Andreas Leitner wrote: > > > > *) I need to compile for a special Eiffel compiler / C compiler > > combination. The geant compile_ise_cl approach seems a bit to > > less powerfull as we would need so many rules (n*m). > > A good combination of generic rules in a build file in > $GOBO/misc with a smart use of geant's variables should > make it possible to write these n*m rules once and for > all. For example have look at the file '$GOBO/misc/eiffel.eant' > and the files 'build.eant' in '$GOBO/src/*', or the file > '$GOBO/misc/test.eant' and the file 'build.eant' in > '$GOBO/test/kernel' or those in '$GOBO/example/test/*'. > These are good examples of how code in build files can > be refactored thanks to geant's inheritance mechanism. 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. Or I end up adding an endless number of rules in the example itself. I could make a special eiffel.eant for xml project that inherits from misc/eiffel.eant and let my examples inherit from the new eiffel.eant. But still the coupling between the options is to tight. There must be a better way. > > *) The latest ISE Eiffel beta for linux uses > > ${ISE_EIFFEL}/studio/spec/${PLATFORM}/include, on windows > > there is ${ISE_EIFFEL}/bench/spec/${PLATFORM}/include. > > We need some way to check for the existance of a dir and > > set a variable depending on the result. Maybe we should > > come up with some autoconf stuff to overcome all our > > default-value problems ? > > First we can hope that in the next beta versions for Windows > the path will also be named '${ISE_EIFFEL}/studio/...', but > in the meantime here again a smart use of geant's local > variables should do the trick: > > <target name="toto" depend="init"> > <foo bar="${ISE_EIFFEL}/${studio}/spec/${PLATFORM}/include"/> > </target> > > <target name="init"> > <geant target="init_os"/> > ... > </target> > > <target name="init_os"> > <geant target="init_windows"/> > <geant target="init_unix"/> > </target> > > <target name="init_windows" if="${GOBO_OS}=windows"> > <set name="studio" value="bench"/> > ... > </target> > > <target name="init_unix" unless="${GOBO_OS}=windows"> > <set name="studio" value="studio"/> > ... > </target> 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". > As a reminder, note that $GOBO_OS is automatically set > by 'geant'. > > > As for Berends makelib. That looks promising as well. With a > > geant only file we currently have no partial compilation for example. > > What do you mean by "partial compilation"? Aehm, sorry, that was a little unclear. What I meant to say was that makefiles do only tasks they have to do. Based on dependency analysis - using timestamp checks etc. Andreas |