Makefile: disallow running 'make install' on windows systems (including cygwin/msys etc)

pull/1500/head
philsmd 6 years ago
parent 0b79d65682
commit caa5c052ec
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

@ -334,6 +334,19 @@ win64: hashcat64.exe
## How to make /usr/bin/install doing recursive??
##
# allow (whitelist) "make install" only on unix-based systems (also disallow cygwin/msys)
ifneq ($(findstring install,$(MAKECMDGOALS)),)
ifeq (,$(filter $(UNAME),Linux FreeBSD Darwin))
define ERROR_INSTALL_DISALLOWED
! The 'install' target is not allowed on this operating system ($(UNAME)). \
Only Linux, FreeBSD and Darwin can use the 'install' target
endef
$(error $(ERROR_INSTALL_DISALLOWED))
endif
endif
ifeq ($(SHARED),1)
install: install_docs install_shared install_include install_library install_hashcat
else

Loading…
Cancel
Save