oxnas: drop target
[openwrt/openwrt.git] / tools / coreutils / Makefile
1 #
2 # Copyright (C) 2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=coreutils
10 PKG_CPE_ID:=cpe:/a:gnu:coreutils
11 PKG_VERSION:=9.3
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=@GNU/coreutils
15 PKG_HASH:=a33d2c0bc49be3c79a4794944dcd87103bf497b53a14bafcd431c8ca53975252
16
17 HOST_BUILD_PARALLEL := 1
18
19 PKG_PROGRAMS:=date readlink touch ln chown ginstall
20
21 include $(INCLUDE_DIR)/host-build.mk
22
23 export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
24
25 HOST_CONFIGURE_ARGS += \
26 --enable-install-program=$(subst $(space),$(comma),$(strip $(PKG_PROGRAMS)))
27
28 HOST_MAKE_FLAGS += \
29 $(AM_TOOL_PATHS_FAKE) \
30 PROGRAMS="$(patsubst %,src/%,$(PKG_PROGRAMS))" \
31 LIBRARIES= MANS= SUBDIRS=.
32
33 define Host/Bootstrap
34 ( \
35 cd $(HOST_BUILD_DIR); \
36 $(AM_TOOL_PATHS_FAKE) \
37 ./bootstrap \
38 --bootstrap-sync \
39 --force \
40 --no-git \
41 --skip-po \
42 --gnulib-srcdir=$(GNULIB_SRCDIR) \
43 )
44 endef
45
46 define Host/Prepare
47 $(call Host/Prepare/Default)
48 $(if $(QUILT),,$(call Host/Bootstrap))
49 endef
50
51 define Host/Configure
52 $(if $(QUILT),$(call Host/Bootstrap))
53 -$(CP) $(HOST_BUILD_DIR)/lib/time.in.h~ $(HOST_BUILD_DIR)/lib/time.in.h # @GNULIB_TIME@ not defined
54 $(call Host/Configure/Default)
55 endef
56
57 define Host/Install
58 $(INSTALL_DIR) $(1)/bin
59 $(INSTALL_BIN) $(patsubst %,$(HOST_BUILD_DIR)/src/%,$(PKG_PROGRAMS)) $(1)/bin/
60 ln -sf ginstall $(1)/bin/install
61 endef
62
63 define Host/Uninstall
64 rm -f $(STAGING_DIR_HOST)/bin/install
65 -$(call Host/Compile/Default,uninstall)
66 endef
67
68 $(eval $(call HostBuild))