From 0020ab7a128ddbe020115d89e51274d9a85aa4d3 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 25 Nov 2015 10:29:31 +0000 Subject: [PATCH] LP-187 MSYS2: add system_path make function --- Makefile | 9 --------- make/functions.mk | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8c523eb7e..c1ddac086 100644 --- a/Makefile +++ b/Makefile @@ -130,15 +130,6 @@ else ifeq ($(V), 0) else ifeq ($(V), 1) endif -# Make sure we know few things about the architecture before including -# the tools.mk to ensure that we download/install the right tools. -UNAME := $(shell uname) -ARCH := $(shell uname -m) -# Here and everywhere if not Linux or Mac then assume Windows -ifeq ($(filter Linux Darwin, $(UNAME)), ) - UNAME := Windows -endif - # Include tools installers include $(ROOT_DIR)/make/tools.mk diff --git a/make/functions.mk b/make/functions.mk index 5b39e23b5..ab3d3eba2 100644 --- a/make/functions.mk +++ b/make/functions.mk @@ -16,6 +16,21 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# Make sure we know few things about the architecture before including +# the tools.mk to ensure that we download/install the right tools. +UNAME := $(shell uname) +ARCH := $(shell uname -m) +# Here and everywhere if not Linux or Mac then assume Windows +ifeq ($(filter Linux Darwin, $(UNAME)), ) + UNAME := Windows +endif + +ifeq ($(UNAME),Windows) + system_path = $(shell cygpath -w $(1)) +else + system_path = $(1) +endif + # Function for converting Windows style slashes into Unix style slashfix = $(subst \,/,$(1))