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

Makefiles not compatible with Cmder (a Windows console emulator) #1102

Closed
tdesveauxPKFX opened this issue May 30, 2018 · 5 comments
Closed

Comments

@tdesveauxPKFX
Copy link
Contributor

From #1091, Makefiles generated with Premake uses wrong mkdir command due to mis-identification of shell.

Here is a snippet that could replace the current identification that works with cmd.exe, Powershell, Cmder and Mingw.

SHELLTYPE := posix
ifeq (.exe,$(findstring .exe,$(ComSpec)))
  SHELLTYPE := msdos
endif

which would replace this:

function gmake2.shellType()
_p('SHELLTYPE := msdos')
_p('ifeq (,$(ComSpec)$(COMSPEC))')
_p(' SHELLTYPE := posix')
_p('endif')
_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')
_p(' SHELLTYPE := posix')
_p('endif')
_p('')
end

Just checking I'm not missing something before submitting a PR.

@samsinsane
Copy link
Member

The Cmder website says:

you will have all Unix commands

The Unix mkdir supports -p, so this sounds like a bug in Cmder not Premake.

@tdesveauxPKFX
Copy link
Contributor Author

Well, you have access to all Unix commands but as mkdir is present in both Unix and msdos, the behavior is to use msdos mkdir.
As an example, you can both use del and rm in Cmder.

@samsinsane
Copy link
Member

I don't see how you can have access to all Unix commands if mkdir isn't the Unix version. Anyway, as long as your change doesn't break Git Bash, it doesn't really bother me. 👍

@tdesveauxPKFX
Copy link
Contributor Author

It's not that you don't have access to it but since there is a "conflict" due to the same name, the msdos command take priority.

It doesn't break Git Bash and shouldn't break Linux nor Unix in general.
I will submit a PR for this later.

@tdesveauxPKFX
Copy link
Contributor Author

Fixed by #1103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants