OpenWrt Forum Archive

Topic: How to disable compilation of dependencies

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Whenever I tried to compile a package, buildroot goes through the process to re-compile all the dependencies (which already had been successfully compiled in previous compilation a few minutes ago) that take along time before starting to compile the package I intend to compile. Is there a way to disable this?

You can't "switch off" compilation of dependencies per se. The particular case really depends on the package you're trying to compile and the way the makefile of the package and the dependency has been constructed by the author.

If the makefile of the package you're building has PKG_BUILD_DEPENDS defined, then the build of the package is dependent on having the dependency built first. The dependency package may then, for example, call an autogen.sh and/or a configure, which would change the makefile and force the dependency to be rebuilt. In this case, there's very little you can do to avoid this.

If the makefile doesn't have PKG_BUILD_DEPENDS defined (ie, there's just a dependecy defined), it shouldn't necessarily recompile the dependency. In this case, a "make package/<package name>/{compile,install} V=s"  should just recompile the package.

What's the particular package you're referring to?

dl12345 wrote:

You can't "switch off" compilation of dependencies per se. The particular case really depends on the package you're trying to compile and the way the makefile of the package and the dependency has been constructed by the author.

If the makefile of the package you're building has PKG_BUILD_DEPENDS defined, then the build of the package is dependent on having the dependency built first. The dependency package may then, for example, call an autogen.sh and/or a configure, which would change the makefile and force the dependency to be rebuilt. In this case, there's very little you can do to avoid this.

If the makefile doesn't have PKG_BUILD_DEPENDS defined (ie, there's just a dependecy defined), it shouldn't necessarily recompile the dependency. In this case, a "make package/<package name>/{compile,install} V=s"  should just recompile the package.

What's the particular package you're referring to?

I don't remember which package that gave me that problem. However, I will watch shall this issue arise again, especially if the OpenWRT's Makefile for the package contains the PKG_BUILD_DEPENDS recipe.

The discussion might have continued from here.