1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-23 00:28:11 +00:00

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

This commit is contained in:
philsmd 2018-01-26 08:20:12 +01:00
parent 0b79d65682
commit caa5c052ec
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

View File

@ -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