From 85dea1303014e1e7d15f92024e4350114b82e5d3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 23 Jan 2014 07:37:14 -0600 Subject: [PATCH] Config.mk: If WINTOOL is set, COMPILE definition should convert path generated by Cygwin make to a proper Windows path. From Richard Cochran (2014-1-23). --- ChangeLog | 7 ++++--- tools/Config.mk | 12 +++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6055e4ed85..1549a87b4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6494,6 +6494,7 @@ detect. (2014-1-21). * configs/16z: Add basic support for the 16z board. The 16z board is based on the ZiLOG ZNEOZ16F2811AL20EG part. See - https://github.com/toyaga/16z (2014-1-22) - -for further information. + https://github.com/toyaga/16z for further information (2014-1-22), + * tools/Config.mk: 'cypath' must be called if we are using a Windows + native toolchain with the Cygwin 'make' to convert paths to proper + Windows paths. From Richard Cochran (2014-1-23). diff --git a/tools/Config.mk b/tools/Config.mk index 1cb5296b55..45c7852817 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -2,7 +2,7 @@ # Config.mk # Global build rules and macros. # -# Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved. # Author: Richard Cochran # Gregory Nutt # @@ -111,11 +111,21 @@ endef # # CC - The command to invoke the C compiler # CFLAGS - Options to pass to the C compiler +# WINTOOL - Set to "y" if this is a Windows cygwin build using a +# Windows native toolchain. In that case, paths created by the +# Cygwin makeifle must be converted to Windows paths for the tool. +ifeq ($(WINTOOL),y) +define COMPILE + @echo "CC: $1" + $(Q) $(CC) -c $(CFLAGS) "${shell cygpath -w $1}" -o $2 +endef +else define COMPILE @echo "CC: $1" $(Q) $(CC) -c $(CFLAGS) $1 -o $2 endef +endif # COMPILEXX - Default macro to compile one C++ file # Example: $(call COMPILEXX, in-file, out-file)