From 586b31abc523ffa07368402cda36aa01aab1ea3a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 10 Jan 2016 13:38:41 -0600 Subject: [PATCH] tools/cnvwindeps.c: Need to build this tool even on non-Cygwin platforms (either that or rethink the dependencies). --- Documentation | 2 +- Makefile.unix | 2 -- configs | 2 +- tools/Makefile.host | 7 ++----- tools/cnvwindeps.c | 13 +++++++++++++ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Documentation b/Documentation index 8830f8f638..e3d982b2f1 160000 --- a/Documentation +++ b/Documentation @@ -1 +1 @@ -Subproject commit 8830f8f6387b287a480b849e02569b881e5cd413 +Subproject commit e3d982b2f1c179747551a015d5a4c11132dbfe47 diff --git a/Makefile.unix b/Makefile.unix index 2aca0beb09..b1147390ae 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -272,9 +272,7 @@ tools/mkdeps$(HOSTEXEEXT): $(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT): -ifeq ($(CONFIG_WINDOWS_CYGWIN),y) $(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" cnvwindeps$(HOSTEXEEXT) -endif # dirlinks, and helpers # diff --git a/configs b/configs index 57c7e67c4d..097e95b685 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit 57c7e67c4d5374ed87a94091deee8ae65eccde64 +Subproject commit 097e95b68591dbbb53cba593a041e830f051c758 diff --git a/tools/Makefile.host b/tools/Makefile.host index 9bd3c2ef3e..fa165f5e08 100644 --- a/tools/Makefile.host +++ b/tools/Makefile.host @@ -40,6 +40,8 @@ include ${TOPDIR}/tools/Config.mk # Define HOSTCC on the make command line if it differs from these defaults # Define HOSTCFLAGS with -g on the make command line to build debug versions +HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} + ifeq ($(CONFIG_WINDOWS_NATIVE),y) # In the Windows native environment, the MinGW GCC compiler is assumed @@ -57,7 +59,6 @@ HOSTCC ?= gcc HOSTCFLAGS ?= -O2 -Wall -Wstrict-prototypes -Wshadow -I. HOSTCFLAGS += -DHAVE_STRTOK_C=1 -HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(HOSTOS),Cygwin) HOSTCFLAGS += -DHOST_CYGWIN=1 HOSTEXEEXT ?= .exe @@ -171,12 +172,8 @@ endif # cnvwindeps - Convert dependences generated by a Windows native toolchain # for use in a Cygwin/POSIX build environment -ifeq ($(CONFIG_WINDOWS_CYGWIN),y) cnvwindeps$(HOSTEXEEXT): cnvwindeps.c $(Q) $(HOSTCC) $(HOSTCFLAGS) -o cnvwindeps$(HOSTEXEEXT) cnvwindeps.c -else -cnvwindeps$(HOSTEXEEXT): -endif ifdef HOSTEXEEXT cnvwindeps: cnvwindeps$(HOSTEXEEXT) diff --git a/tools/cnvwindeps.c b/tools/cnvwindeps.c index 81fab6953b..7c13b314d4 100644 --- a/tools/cnvwindeps.c +++ b/tools/cnvwindeps.c @@ -44,6 +44,8 @@ #include #include +#ifdef HOST_CYGWIN + #include /**************************************************************************** @@ -263,3 +265,14 @@ int main(int argc, char **argv, char **envp) fclose(stream); return 0; } + +#else /* HOST_CYGWIN */ + +int main(int argc, char **argv, char **envp) +{ + fprintf(stderr, "ERROR: This tool is only available under Cywgin\n"); + return EXIT_FAILURE; +} + +#endif /* HOST_CYGWIN */ +