pkg-cmake: Skip compilation in installation step
PATCH 1/1 pkg-cmake: Skip compilation in installation step
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.
--- package/pkg-cmake.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-cmake.mk +2 -2
@@ -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)
Signature · 1 line
2.1.4
PATCH 1/1 pkg-cmake: Skip compilation in installation step
C?dric, All,
On 2015-04-22 22:11 +0200, C?dric Marie spake thusly:
Quoted 23 lines
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 <[email protected]>--- package/pkg-cmake.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/pkg-cmake.mk +0
-0
package/pkg-cmake.mk $(2)_MAKE ?= $$(MAKE) · line 61
Quoted 7 lines
package/pkg-cmake.mk +2
-2@@ -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.
Quoted 9 lines
package/pkg-cmake.mk +0
-0$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR)Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 pkg-cmake: Skip compilation in installation step
In reply to Cédric MarieQuoted 9 lines · C?dric Marie
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.
Quoted 5 lines
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 <[email protected]>
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
Quoted 20 lines
--- package/pkg-cmake.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/pkg-cmake.mk +2
-2@@ -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)
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 pkg-cmake: Skip compilation in installation step
Hi,
Quoted 2 lines
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.
Quoted 6 lines
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...
Signature · 1 line
C?dric
Thomas Petazzoni
AppliedPATCH 1/1 pkg-cmake: Skip compilation in installation step
In reply to Cédric MarieDear C?dric Marie,
Quoted 9 lines · C?dric Marie
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.
Quoted 8 lines
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 <[email protected]>--- package/pkg-cmake.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 pkg-cmake: Skip compilation in installation step
Le 2015-04-23 09:50, Thomas Petazzoni a ?crit?:
Quoted 1 line
Applied, thanks.
Thank you.
Should I provide the patch for host-cmake as well?
Signature · 1 line
C?dric
PATCH 1/1 pkg-cmake: Skip compilation in installation step
C?dric, All,
On 2015-04-23 11:06 +0200, C?dric Marie spake thusly:
Quoted 5 lines
Le 2015-04-23 09:50, Thomas Petazzoni a ?crit?:
Quoted 1 line
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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'