Message ID | 1429733516-4466-1-git-send-email-cedric.marie@openmailbox.org |
---|---|
State | Accepted |
Headers | show |
Cédric, All, On 2015-04-22 22:11 +0200, Cédric Marie spake thusly: > With CMake build system, the "make install" command always compiles > before installing, to make sure that everything is up-to-date. > > In Buildroot environment, this is quite useless, because the package > has always already been compiled, either at first build, or when > invoking "make <package>-rebuild". > In all cases, when it comes to staging or target installation step, the > package has just been compiled. > > Using "make install/fast" - in order to skip the compilation step - is > therefore more appropriate, more consistent with what other build > systems do, and saves time when you need to rebuild your package. > > Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org> > --- > package/pkg-cmake.mk | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk > index 2262012..f17a883 100644 > --- a/package/pkg-cmake.mk > +++ b/package/pkg-cmake.mk > @@ -57,8 +57,8 @@ $(2)_MAKE ?= $$(MAKE) > $(2)_MAKE_ENV ?= > $(2)_MAKE_OPTS ?= > $(2)_INSTALL_OPTS ?= install > -$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install > -$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install > +$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install/fast > +$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install/fast Would it also make sense we install cmake itself with this rule, in package/cmake/cmake.mk:47 , too? Regards, Yann E. MORIN. > $(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) > > -- > 2.1.4 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
On 04/22/15 22:11, Cédric Marie wrote: > With CMake build system, the "make install" command always compiles > before installing, to make sure that everything is up-to-date. > > In Buildroot environment, this is quite useless, because the package > has always already been compiled, either at first build, or when > invoking "make <package>-rebuild". > In all cases, when it comes to staging or target installation step, the > package has just been compiled. > > Using "make install/fast" - in order to skip the compilation step - is > therefore more appropriate, more consistent with what other build > systems do, and saves time when you need to rebuild your package. > > Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Doing it for host-cmake itself can be a separate patch. And not very important either, I can't measure the time difference... Regards, Arnout > --- > package/pkg-cmake.mk | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk > index 2262012..f17a883 100644 > --- a/package/pkg-cmake.mk > +++ b/package/pkg-cmake.mk > @@ -57,8 +57,8 @@ $(2)_MAKE ?= $$(MAKE) > $(2)_MAKE_ENV ?= > $(2)_MAKE_OPTS ?= > $(2)_INSTALL_OPTS ?= install > -$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install > -$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install > +$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install/fast > +$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install/fast > > $(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) > >
Hi, > Would it also make sense we install cmake itself with this rule, in > package/cmake/cmake.mk:47 , too? That could make sense, yes. I had not thought about CMake being compiled with CMake generated makefiles. > Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > > Doing it for host-cmake itself can be a separate patch. And not very > important > either, I can't measure the time difference... OK for a separate patch. I agree the time difference is not so big. But it can be several seconds with some packages (it is done twice: staging + target). When you have to rebuild your package regularly, you certainly appreciate saving these few seconds. I do :) In fact, it is a little bit strange that the default behaviour of CMake install is to compile before installing. I understand it can be useful to check that everything is up-to-date, and maybe check if a new installation rule has been added. But outside Buildroot, when installing a CMake package to your computer, it might result in compiling with root privileges (since make install is likely to be called with root privileges). This point is out-of-scope regarding Buildroot, I was just wondering about CMake default behaviour...
Dear Cédric Marie, On Wed, 22 Apr 2015 22:11:56 +0200, Cédric Marie wrote: > With CMake build system, the "make install" command always compiles > before installing, to make sure that everything is up-to-date. > > In Buildroot environment, this is quite useless, because the package > has always already been compiled, either at first build, or when > invoking "make <package>-rebuild". > In all cases, when it comes to staging or target installation step, the > package has just been compiled. > > Using "make install/fast" - in order to skip the compilation step - is > therefore more appropriate, more consistent with what other build > systems do, and saves time when you need to rebuild your package. > > Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org> > --- > package/pkg-cmake.mk | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. Thomas
Le 2015-04-23 09:50, Thomas Petazzoni a écrit :
> Applied, thanks.
Thank you.
Should I provide the patch for host-cmake as well?
Cédric, All, On 2015-04-23 11:06 +0200, Cédric Marie spake thusly: > Le 2015-04-23 09:50, Thomas Petazzoni a écrit : > >Applied, thanks. > > Thank you. > Should I provide the patch for host-cmake as well? Yes, please. :-) Even if the gain in time is not that important, I guess it is good to use the same trick everywhere cmake is used. Regards, Yann E. MORIN.
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk index 2262012..f17a883 100644 --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -57,8 +57,8 @@ $(2)_MAKE ?= $$(MAKE) $(2)_MAKE_ENV ?= $(2)_MAKE_OPTS ?= $(2)_INSTALL_OPTS ?= install -$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install -$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install +$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install/fast +$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install/fast $(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR)
With CMake build system, the "make install" command always compiles before installing, to make sure that everything is up-to-date. In Buildroot environment, this is quite useless, because the package has always already been compiled, either at first build, or when invoking "make <package>-rebuild". In all cases, when it comes to staging or target installation step, the package has just been compiled. Using "make install/fast" - in order to skip the compilation step - is therefore more appropriate, more consistent with what other build systems do, and saves time when you need to rebuild your package. Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org> --- package/pkg-cmake.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)