[OpenWrt-Devel,4/8] tools/coreutils: add cygwin compatibility
diff mbox series

Message ID 20191008010225.8822-4-rosenp@gmail.com
State Rejected
Delegated to: Petr Štetiar
Headers show
Series
  • [OpenWrt-Devel,1/8] ncurses: add cygwin compatibility
Related show

Commit Message

Rosen Penev Oct. 8, 2019, 1:02 a.m. UTC
From: Alexey Loukianov <lx2@lexa2.ru>

Properly handle ".exe" suffix on CYGWIN hosts.

Signed-off-by: Alexey Loukianov <lx2@lexa2.ru>
(rebased)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 tools/coreutils/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile
index e338796053..8de2cb9894 100644
--- a/tools/coreutils/Makefile
+++ b/tools/coreutils/Makefile
@@ -16,7 +16,13 @@  PKG_HASH:=8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b
 
 HOST_BUILD_PARALLEL := 1
 
-BUILD_PROGRAMS = date readlink touch
+ifeq (CYGWIN,$(findstring CYGWIN,$(HOST_OS)))
+EXEC_SUFFIX:=.exe
+else
+EXEC_SUFFIX:=
+endif
+
+BUILD_PROGRAMS = date$(EXEC_SUFFIX) readlink$(EXEC_SUFFIX) touch$(EXEC_SUFFIX)
 
 include $(INCLUDE_DIR)/host-build.mk