kmesh icon indicating copy to clipboard operation
kmesh copied to clipboard

`make build` supports selectively compiling some of the binaries

Open YaoZengzeng opened this issue 1 year ago • 6 comments

Task description:

Now we have 4 binaries in Kmesh project:

  1. kmesh-daemon
  2. mdacore
  3. kmesh-cni
  4. kmeshctl

ref: https://github.com/kmesh-net/kmesh/blob/main/Makefile#L45

It would be better if we could selectively compile some of the binaries, which would be very beneficial to improving our development efficiency.

Solution:

We need to adjust the Makefile structure and then we can pass parameters to make build, for example, BINARIES=kmeshctl make build, so that only kmeshctl is compiled.

Who can join or take the task:

The good first issue is intended for first-time contributors to get started on his/her contributor journey.

After a contributor has successfully completed 1-2 good first issue's, they should be ready to move on to help wanted items, saving the remaining good first issue for other new contributors.

How to join or take the task:

Just reply on the issue with the message /assign in a separate line.

Then, the issue will be assigned to you.

How to ask for help:

If you need help or have questions, please feel free to ask on this issue. The issue author or other members of the community will guide you through the contribution process.

YaoZengzeng avatar Sep 25 '24 06:09 YaoZengzeng

/assign

SpongeBob0318 avatar Sep 25 '24 10:09 SpongeBob0318

After thinking about it, the “build” command actually runs kmesh_compile.sh. So the expected command is actually “BINARIES=kmeshctl make all”?

SpongeBob0318 avatar Sep 25 '24 14:09 SpongeBob0318

Actullay you can't execute make all direclty, it need some prepration.

We usually use make build or make docker to compile, AFAIK, finally they will call make which is actually make all.

So you could try passing the BINARIES into kmesh_compile.sh and have it take effect somewhere. Perhaps some refactor is needed.

YaoZengzeng avatar Sep 26 '24 01:09 YaoZengzeng

ping @SpongeBob0318

hzxuzhonghu avatar Oct 10 '24 03:10 hzxuzhonghu

ping @SpongeBob0318

i'm here, i'm trying, sorry for delay

SpongeBob0318 avatar Oct 10 '24 10:10 SpongeBob0318

Great, not urgent, just confirm you are on this issue

hzxuzhonghu avatar Oct 10 '24 12:10 hzxuzhonghu