summaryrefslogtreecommitdiffstats
path: root/tools/coreutils/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/coreutils/Makefile')
-rw-r--r--tools/coreutils/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile
index f799e83c5b..233ab1585d 100644
--- a/tools/coreutils/Makefile
+++ b/tools/coreutils/Makefile
@@ -20,15 +20,42 @@ BUILD_PROGRAMS = date readlink touch ln chown ginstall
include $(INCLUDE_DIR)/host-build.mk
+export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
+
BUILD_BINS = $(patsubst %,src/%,$(BUILD_PROGRAMS))
HOST_CONFIGURE_ARGS += \
--enable-install-program=$(subst $(space),$(comma),$(strip $(BUILD_PROGRAMS)))
HOST_MAKE_FLAGS += \
+ $(AM_TOOL_PATHS_FAKE) \
PROGRAMS="$(BUILD_BINS)" \
LIBRARIES= MANS= SUBDIRS=.
+define Host/Bootstrap
+ ( \
+ cd $(HOST_BUILD_DIR); \
+ $(AM_TOOL_PATHS_FAKE) \
+ ./bootstrap \
+ --bootstrap-sync \
+ --force \
+ --no-git \
+ --skip-po \
+ --gnulib-srcdir=$(GNULIB_SRCDIR) \
+ )
+endef
+
+define Host/Prepare
+ $(call Host/Prepare/Default)
+ $(if $(QUILT),,$(call Host/Bootstrap))
+endef
+
+define Host/Configure
+ $(if $(QUILT),$(call Host/Bootstrap))
+ -$(CP) $(HOST_BUILD_DIR)/lib/time.in.h~ $(HOST_BUILD_DIR)/lib/time.in.h # @GNULIB_TIME@ not defined
+ $(call Host/Configure/Default)
+endef
+
define Host/Install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(patsubst %,$(HOST_BUILD_DIR)/%,$(BUILD_BINS)) $(1)/bin/