user4117880
user4117880

Reputation: 135

Buildroot add build dependency in the makefiles

We are using buildroot to build the kernel and root file system. The package A has the dependency on package B. I used the "select" keyword in Config.in to select the package B while selecting package A. How can I change the makefiles to build package B before building package A?

Upvotes: 1

Views: 6294

Answers (2)

Thomas Petazzoni
Thomas Petazzoni

Reputation: 5956

The answer from Ashok is partially incorrect: his second suggestion is wrong. The only correct way is to use:

<pkg1>_DEPENDENCIES += pkg2

To have pkg2 built before pkg1.

See the Buildroot manual at http://buildroot.org/downloads/manual/manual.html#adding-packages for all the details about adding new packages in Buildroot.

Upvotes: 2

Ashok Vairavan
Ashok Vairavan

Reputation: 1962

Explicit dependency needs to be specified in the makefile targets to build package B before building package A.

PACKAGE_A_DEPENDENCIES += PACKAGE_B

PACKAGE_A_TARGET: $(PACKAGE_A_DEPENDENCIES)

In the above case, the package B will be built before building package A.

Upvotes: 1

Related Questions