From 22f9e544248ad52ffb5756d697b2c3d0be08c630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 14 May 2015 13:53:25 +0300 Subject: Get rid of the autopatch hack for proper --- core/core.mk | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'core/core.mk') diff --git a/core/core.mk b/core/core.mk index 473013f..a2afe0d 100644 --- a/core/core.mk +++ b/core/core.mk @@ -32,6 +32,33 @@ gen_verbose = $(gen_verbose_$(V)) ERL = erl +A0 -noinput -boot start_clean +# Platform detection. +# @todo Add Windows/Cygwin detection eventually. + +ifeq ($(PLATFORM),) +UNAME_S := $(shell uname -s) + +ifeq ($(UNAME_S),Linux) +PLATFORM = linux +else ifeq ($(UNAME_S),Darwin) +PLATFORM = darwin +else ifeq ($(UNAME_S),SunOS) +PLATFORM = solaris +else ifeq ($(UNAME_S),GNU) +PLATFORM = gnu +else ifeq ($(UNAME_S),FreeBSD) +PLATFORM = freebsd +else ifeq ($(UNAME_S),NetBSD) +PLATFORM = netbsd +else ifeq ($(UNAME_S),OpenBSD) +PLATFORM = openbsd +else +$(error Unable to detect platform. Please open a ticket with the output of uname -a.) +endif + +export PLATFORM +endif + # Core targets. ifneq ($(words $(MAKECMDGOALS)),1) -- cgit v1.2.3