From: Gustavo S. B. <bar...@gm...> - 2007-07-04 16:32:36
|
On 7/4/07, Caio Marcelo <cma...@gm...> wrote: > On 7/3/07, Michael Jennings <e-...@ka...> wrote: > > > AFAIK, autotools doesn't support these things, maybe CMake but I'm not > > > sure, do you know any build infrastructure that supports this? I'd > > > really like to have this setup so we could use GCC better, for systems > > > like Nokia N800 and OpenMoko, this makes a big difference. > > > > Nothing in the "build infrastructure" is preventing anyone from adding > > an extra target in the Makefile.am for his own special needs. > > (Just expanding the idea a little more...) > > We could add a configure.sh option to enable "final" or "production" build. > This would set a var to be used in Makefile.am that could override the default > rule for building the library (or executable), something like this: > > # appending to evas/src/lib/canvas/Makefile.am > > if FINAL > libevas_canvas.la: $(libevas_canvas_la_SOURCES) > $(libevas_canvas_la_DEPENDENCIES) > # insert gcc special call here, it would be useful to see > # the default rule generated by Automake (in the generated > # Makefile.in) to see what useful vars are available, > # like: libevas_canvas_la_LDFLAGS, etc. > endif > > I'm not sure whether the rule that Automake generates is portable or it > generate a different rule for different machines, so we may have to deal > with different "final" rules. However, since it's an extra optimization, > at first won't be a problem. > > AFAIK, to use CMake a similar solution would have to be used. The version I > looked even had custom rules for dealing with "FINAL" compilation for > KDE3-related sources, but simply by creating a new source which #include'd all > the others and compiling it. we cannot use this cat *.c > final.c, and adding an special rule for each lib or binary is not a good option IMHO, we should find out a way to have automake (or cmake, scons, ...) to generate it for us. I'll try to investigate it further. -- Gustavo Sverzut Barbieri -------------------------------------- Jabber: bar...@gm... MSN: bar...@gm... ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 |