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

Makefile is not currently Windows GNU Make compatible, so requires Cygwin/MinGW #71

Open
dragon788 opened this issue May 23, 2016 · 5 comments
Labels
wontfix This issue is contrary to the goals of the project and will likely not be fixed

Comments

@dragon788
Copy link
Contributor

It would be great for those in more restrictive environments that don't allow arbitrary tools like Cygwin on their systems to use "authorized" tools like Visual Studio with NMake to build these VMs. There probably isn't a good way to make the Makefile directly cross platform for NMake and Linux make, but perhaps CMake would be an acceptable middle ground?

https://cognitivewaves.wordpress.com/makefiles-windows/

@annawake
Copy link
Contributor

I think CMake is overkill (and yet another tool to install), and I'm not sure how much code could be shared between a Windows-specific Makefile and a non-Windows specific Makefile. The Makefile structure should be really simple - there's been a lot of work in the other templates to reduce it down to "box build && box assure && box deploy". The hope would be that it could be just as simple on Windows, moving most of the logic in the Makefile out to a supporting script/cli app.

I do think it is perfectly acceptable to have another Makefile for those building on Windows. The current structure came about just because when the original author worked at Chef, the build farm was all Macs, so a GNU Makefile made sense.

Perhaps it makes more sense to standardize around MSBuild instead of NMake for the Windows-specific build driver?

@rasa
Copy link
Member

rasa commented May 26, 2016

MingW/msys has make, so you don't need to install Cygwin. I would prefer we make our Makefile MingW compatible (if it's not already) then create a separate NMake compatible Makefile, but would accept a PR containing one.

@dragon788
Copy link
Contributor Author

I'm actually working a bit on "porting" the Makefile to PowerShell, as that is available out of the box in Windows 7 and up, with packages available back to XP I think, but at least all currently "supported" Microsoft operating systems have it. I'll have some more code pushed to my fork in the next couple of days, and then might open a PR for comments and concerns.

@dragon788
Copy link
Contributor Author

dragon788 commented Jun 21, 2016

I've looked at this a little more. There is a GNU make for Windows, and it can be run from cmd/PowerShell without requiring a complete rewrite of the Makefile.

The things it seems to be getting hung up on to start with are the calls to shell $(shell cat VERSION) which on Windows would be COMSPEC aka cmd.exe. There is a way to detect this pretty easily and use an alternate call (like $(shell type VERSION)) from the write-up provided this blog or the alternate option from StackOverflow

I'm working on it in my spare time, but haven't found a lot of time to devote as I'm trying to get a working box as part of my yak shaving for another project and so I have been working around the issue using a few other tricks. Also the Makefile is amazing and staggering in its scope and options, which I'm assuming means it was originally generated via Autotools or something like that.

@dragon788 dragon788 changed the title Makefile is not NMake compatible, requires Cygwin/MinGW Makefile is not currently Windows GNU Make compatible, so requires Cygwin/MinGW Jun 21, 2016
@annawake
Copy link
Contributor

The Makefile was generated by hand actually, but it does make use of some pretty obscure GNU Makefile constructs to dynamically generate tasks on-the-fly. And indeed not trivial to port to NMake.

For the other platforms great effort has been made to simplify the Makefile by pushing more functionality out to external programs (like 'box build"). The Windows Makefile should follow the same direction, and that will make it much easier to have different flavours of Makefile.

Sent from my thought matrix via the nexus

On Jun 21, 2016, at 12:40, dragon788 [email protected] wrote:

I've looked at this a little more. There is a GNU make for Windows, and it can be run from cmd/PowerShell without requiring a complete rewrite of the Makefile. The things it seems to be getting hung up on to start with are the calls to shell $(shell cat VERSION) which on Windows would be COMSPEC aka cmd.exe. There is a way to detect this pretty easily and use an alternate call (like $(shell type VERSION)) from the write-up provided this blog or the alternate option from StackOverflow

I'm working on it in my spare time, but haven't found a lot of time to devote as I'm trying to get a working box as part of my yak shaving for another project and so I have been working around the issue using a few other tricks. Also the Makefile is amazing and staggering in its scope and options, which I'm assuming means it was originally generated via Autotools or something like that.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@arizvisa arizvisa added the wontfix This issue is contrary to the goals of the project and will likely not be fixed label Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This issue is contrary to the goals of the project and will likely not be fixed
Projects
None yet
Development

No branches or pull requests

4 participants