Use name, not CONFIG_ settings, to determine host OS; Fix errors in help text.

This commit is contained in:
Gregory Nutt
2016-01-10 13:09:10 -06:00
parent a6da474a69
commit 61e0eb8006
2 changed files with 5 additions and 4 deletions

View File

@@ -57,8 +57,10 @@ HOSTCC ?= gcc
HOSTCFLAGS ?= -O2 -Wall -Wstrict-prototypes -Wshadow -I.
HOSTCFLAGS += -DHAVE_STRTOK_C=1
ifeq ($(CONFIG_WINDOWS_CYGWIN),y)
HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"}
ifeq ($(HOSTOS),Cygwin)
HOSTCFLAGS += -DHOST_CYGWIN=1
HOSTEXEEXT ?= .exe
endif
endif

View File

@@ -267,11 +267,10 @@ static void show_usage(const char *progname, const char *msg, int exitcode)
fprintf(stderr, " By default, a POSIX-style environment is assumed (e.g., Linux, Cygwin, etc.) This option is\n");
fprintf(stderr, " inform the tool that is working in a pure Windows native environment.\n");
#ifdef HOST_CYGWIN
fprintf(stderr, " --winpaths <TOPDIR>\n");
fprintf(stderr, " --winpaths\n");
fprintf(stderr, " This option is useful when using a Windows native toolchain in a POSIX environment (such\n");
fprintf(stderr, " such as Cygwin). In this case, will CC generates dependency lists using Windows paths\n");
fprintf(stderr, " (e.g., C:\\blablah\\blabla). This switch instructs the script to use 'cygpath' to convert\n");
fprintf(stderr, " the Windows paths to Cygwin POSIXE paths.\n");
fprintf(stderr, " (e.g., C:\\blablah\\blabla).\n");
#endif
fprintf(stderr, " --help\n");
fprintf(stderr, " Shows this message and exits\n");