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

Add ability in Make to build specific platforms #4458

Closed
blueelvis opened this issue Jun 10, 2019 · 5 comments · Fixed by #4579
Closed

Add ability in Make to build specific platforms #4458

blueelvis opened this issue Jun 10, 2019 · 5 comments · Fixed by #4579
Labels
area/build-release priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@blueelvis
Copy link
Contributor

The exact command to reproduce the issue:
make cross

The operating system version:
Windows 10 Enterprise

I am doing development on Windows in addition to Bash for Windows. As of now, running make cross compiles the binaries for every platform i.e. Linux, Mac & Windows. We need to have the ability to build for a targeted platform. For example for me, it doesn't make sense to build the Mac binaries as well while trying to build the Windows binaries to test.

@afbjorklund
Copy link
Collaborator

Did you try make out/minikube-windows-amd64.exe ?

The "cross" target is just a phony target building all of them.

.PHONY: cross
cross: out/minikube-linux-$(GOARCH) out/minikube-darwin-amd64 out/minikube-windows-amd64.exe

@blueelvis
Copy link
Contributor Author

I have not tried out that but what I did is that on my local, I just edited out the required executables in cross and then did compilation.

I was thinking if we could add 2 more targets in addition to cross to build specific platforms only? One for Windows and another one for Mac?

@afbjorklund
Copy link
Collaborator

We have three make targets today:

  • out/minikube-linux-amd64
  • out/minikube-darwin-amd64
  • out/minikube-windows-amd64.exe

Do you need shorter aliases (phony targets, like "cross"), or what is the suggestion made here ?

@blueelvis
Copy link
Contributor Author

@afbjorklund - You got me. I would like to see target specific aliases (phony targets) as well like make windows, make darwin, make linux, make all etc. What do you think? I think it would be much easier while developing on 1 platform.

@afbjorklund
Copy link
Collaborator

The all target already exists (also builds the drivers), and I suppose we could add aliases.

linux: out/minikube-linux-$(GOARCH)
darwin: out/minikube-darwin-amd64
windows: out/minikube-windows-amd64.exe

@afbjorklund afbjorklund added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed triage/discuss Items for discussion labels Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-release priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants