Building ex_doc on Windows with MSVC#131
Building ex_doc on Windows with MSVC#131chyndman wants to merge 4 commits intoelixir-lang:masterfrom chyndman:win-nmake-new-makefile
Conversation
There was a problem hiding this comment.
We need to detect the erts path dynamically, no? Like we do in the other makefile?
There was a problem hiding this comment.
Yes we do. Nmake doesn't support setting variables to outputs of commands, and it was more important to see that the NIF itself compiles. I'm working on a dynamic path to the erts headers next.
|
Thanks, I have added one tiny comment! |
|
In these commits, we handle the dynamic paths by having Mix emit another makefile which defines macros that get used in the main makefile. Currently we just write the one necessary line when calling |
There was a problem hiding this comment.
Can't you make something like the following:
- Check if the
Makefile.mix.win32is available - If not, you generate one, in the Makefile itself and call
exec make priv\markdown.dll
I am not sure exec would work on windows but windows must have an equivalent, no? It basically replaces the current process by the one that will run the given command.
There was a problem hiding this comment.
Let me try something like that using the equivalent start.
|
Alright, I've rebased on master to remove the |
|
@chyndman I will push the changes that makes ex_doc depend on https://github.com/devinus/markdown today. I think this patch looks great as it is, we just need to move it over and add some docs, maybe to the README, with instructions on requirements for windows. I will ping and close this issue as soon as we move things to the new repo. |
|
We are closing this one! @chyndman, please send the PR to https://github.com/devinus/markdown! |
|
❤️ |
These commits allow for a successful build on Windows using Visual Studio's MSVC distribution (bar one snag, detailed later) by following these steps:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" _ARCH_, where_ARCH_is eitherx86(if you installed 32-bit Erlang) oramd64(64-bit Erlang).mix compile.Currently, (5) will throw a "permission denied" error. For now, just run
mix compileagain and all will go well. Similarly runmix testtwice, and all tests should pass.Closes #44