Le 03/09/2014 12:32, yann jautard a écrit :
Le 02/09/2014 18:24, Wayne Stambaugh a écrit :
I have this on my list of things to look at. It should be possible to
get CMake to generate make files that compare the source repo version
against the version.h file and recreate it as required every time make
is run. Currently, the only time version.h gets updated is when the
CMake files are modified or make rebuild_cache is run.
I checked it right now : I added "make rebuild-dep" to beginning of
the build process in kicad-install.sh. Running it with a kicad install
witj not up to date version info results in rebuilding only
build_version.cpp and relinking all parts that have a user interface.
And then I runt the install script again with the version I've just
updated : Cmake regenerated the files (pretty fast), and then all
steps completed and nothing was compiled. So I think there is no need
to check for current version number before calling make rebuild-dep as
it does not takes more times if not needed.
Well in fact I think nothing was re-compiled because the date was the
same and so files are identical. But as it is *very* unlikely that if
the date as changed the version has not, I still think there is no
need for version checking.
I noticed also that the build step is done twice : the first time when
compiling, then it is done again before installing. Without compiling
anything more of course because it was already done, but that take a lot
of time.
I checked : calling directly make install on source tree with
compilation not done will build then install and the resulting
installation works ok, without unneeded extra steps.
So I wonder why calling build steps twice ? If that is because it is not
ok to build as root (and "make install" should be run as root), then why
the "install" target first check if everything is built ? To make sure
not trying to install something incomplete ?
I modified my kicad-install.sh to add make rebuild-dep and remove the
first make, everything still works OK, and the version info in built
kicad is up to date.
It can sound stupid, but the only computer I have now is a netbook.
So as it's really slow, I'm trying to avoid any unneeded step :P
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp