Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Split Makefile #878

Closed
kuritka opened this issue Apr 26, 2022 · 3 comments
Closed

Question: Split Makefile #878

kuritka opened this issue Apr 26, 2022 · 3 comments
Labels
question Further information is requested
Milestone

Comments

@kuritka
Copy link
Collaborator

kuritka commented Apr 26, 2022

I can split makefile into multiple files using include keyword.
This way the split Makefile will still behave as one monolithic Makefile (the declared variable is visible from each Makefile, If I press tab in the commandline the autocomplete will work as expected).

Makefile is quite robust, do you think it makes sense to split it?

Example:

# Makefile

###############################################################################
# Target: codegen #
################################################################################
include tools/Makefile
################################################################################
# Target: docker #
################################################################################
include docker/Makefile
################################################################################
# Target: tests #
################################################################################
include tests/Makefile
```
@kuritka kuritka added the question Further information is requested label Apr 26, 2022
@jkremser
Copy link
Member

jkremser commented Apr 26, 2022

true, it's pretty complex. Crossplane folks have a standalone repo that they include as a git submodule - https://github.com/upbound/build But we are more a mono-repo project so not sure if it's not an overkill for us. So sub directories could work. I'd rather put all the makefile stuff into 1 directory rather than splitting them to {tools,docker,tests}/Makefile Perhaps something like build/Makefile.{tests,container,general,observability,playground..} ?

There is also that hack directory that was created by kubebuilder and that has only 1 file there, so it could go also there.

@kuritka
Copy link
Collaborator Author

kuritka commented Apr 26, 2022

Basically, the reason for moving Makefiles under individual folders was so that we could see only things related to tests in /test.

Although the idea of leaving everything in one folder is even better, especially more convenient for maintenance. So I'm in favor of leaving everything in /hack as you propose. 💯

Perhaps we can keep the master Makefile in root - containing include.

@ytsarev
Copy link
Member

ytsarev commented Jul 20, 2024

let's NOT do it until it's really necessary.

@ytsarev ytsarev closed this as completed Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

4 participants