Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/6] coreutils: converted to autotarget
@ 2010-09-24  2:54 Martin Banky
  2010-09-24  2:55 ` [Buildroot] [PATCH 2/6] coreutils: changed/removed some of the configure environmental variables Martin Banky
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Martin Banky @ 2010-09-24  2:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/coreutils/coreutils.mk |  111 ++++++++++++---------------------------
 1 files changed, 34 insertions(+), 77 deletions(-)

diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index f9910c6..f413411 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -3,37 +3,22 @@
 # coreutils
 #
 #############################################################
-COREUTILS_VERSION:=7.4
-COREUTILS_SOURCE:=coreutils-$(COREUTILS_VERSION).tar.gz
-#COREUTILS_SITE:=ftp://alpha.gnu.org/gnu/coreutils/
-COREUTILS_SITE:=$(BR2_GNU_MIRROR)/coreutils
-COREUTILS_CAT:=$(ZCAT)
-COREUTILS_DIR:=$(BUILD_DIR)/coreutils-$(COREUTILS_VERSION)
-COREUTILS_BINARY:=src/vdir
-COREUTILS_TARGET_BINARY:=bin/vdir
-BIN_PROGS:=cat chgrp chmod chown cp date dd df dir echo false hostname \
-	ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \
-	uname join
+COREUTILS_VERSION = 7.4
+COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.gz
+#COREUTILS_SITE = ftp://alpha.gnu.org/gnu/coreutils/
+COREUTILS_SITE = $(BR2_GNU_MIRROR)/coreutils
 
-$(DL_DIR)/$(COREUTILS_SOURCE):
-	 $(call DOWNLOAD,$(COREUTILS_SITE),$(COREUTILS_SOURCE))
-
-coreutils-source: $(DL_DIR)/$(COREUTILS_SOURCE)
+# If both coreutils and busybox are selected, make certain coreutils
+# wins the fight over who gets to have their utils actually installed.
+ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+COREUTILS_DEPENDENCIES = busybox
+endif
 
-$(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE)
-	$(COREUTILS_CAT) $(DL_DIR)/$(COREUTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(COREUTILS_DIR) package/coreutils/ coreutils\*.patch
-	$(CONFIG_UPDATE) $(COREUTILS_DIR)/build-aux
-	# ensure rename.m4 file is older than configure / aclocal.m4 so
-	# auto* isn't rerun
-	touch -d '1979-01-01' $(@D)/m4/rename.m4
-	touch $@
+BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false hostname \
+	ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \
+	uname join
 
-$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
-	(cd $(COREUTILS_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		ac_cv_func_strtod=yes \
+COREUTILS_CONF_ENV = ac_cv_func_strtod=yes \
 		ac_fsusage_space=yes \
 		fu_cv_sys_stat_statfs2_bsize=yes \
 		ac_cv_func_closedir_void=no \
@@ -81,35 +66,20 @@ $(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
 		ac_cv_func_working_mktime=yes \
 		jm_cv_func_working_re_compile_pattern=yes \
 		ac_use_included_regex=no \
-		gl_cv_c_restrict=no \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--exec-prefix=/usr \
-		--bindir=/usr/bin \
-		--sbindir=/usr/sbin \
-		--libdir=/lib \
-		--libexecdir=/usr/lib \
-		--sysconfdir=/etc \
-		--datadir=/usr/share \
-		--localstatedir=/var \
-		--mandir=/usr/share/man \
-		--infodir=/usr/share/info \
-		$(DISABLE_NLS) \
-		$(DISABLE_LARGEFILE) \
-		--disable-rpath \
-		--disable-dependency-tracking \
-	)
-	touch $@
+		gl_cv_c_restrict=no
 
-$(COREUTILS_DIR)/$(COREUTILS_BINARY): $(COREUTILS_DIR)/.configured
-	$(MAKE) -C $(COREUTILS_DIR)
-	rm -f $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY)
+COREUTILS_CONF_OPT = --disable-rpath \
+		--disable-dependency-tracking
 
-$(TARGET_DIR)/$(COREUTILS_TARGET_BINARY): $(COREUTILS_DIR)/$(COREUTILS_BINARY)
-	$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(COREUTILS_DIR) install
+define COREUTILS_TOUCH_RENAME_M4
+	# ensure rename.m4 file is older than configure / aclocal.m4 so
+	# auto* isn't rerun
+	touch -d '1979-01-01' $(@D)/m4/rename.m4
+endef
+
+COREUTILS_POST_PATCH_HOOKS += COREUTILS_TOUCH_RENAME_M4
+
+define COREUTILS_POST_INSTALL
 	# some things go in root rather than usr
 	for f in $(BIN_PROGS); do \
 		mv $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f; \
@@ -118,31 +88,18 @@ $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY): $(COREUTILS_DIR)/$(COREUTILS_BINARY)
 	ln -fs test $(TARGET_DIR)/usr/bin/[
 	# gnu thinks chroot is in bin, debian thinks it's in sbin
 	mv $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
-	$(STRIPCMD) $(TARGET_DIR)/usr/sbin/chroot > /dev/null 2>&1
-	rm -rf $(TARGET_DIR)/share/locale
+endef
 
-# If both coreutils and busybox are selected, make certain coreutils
-# wins the fight over who gets to have their utils actually installed.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-coreutils: busybox $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY)
-else
-coreutils: $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY)
+COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_POST_INSTALL
+
+ifneq ($(BR2_ENABLE_LOCALE),y)
+define COREUTILS_REMOVE_LOCALE
+	rm -rf $(TARGET_DIR)/share/locale
+endef
+COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_REMOVE_LOCALE
 endif
 
 # If both coreutils and busybox are selected, the corresponding applets
 # may need to be reinstated by the clean targets.
-coreutils-clean:
-	$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(COREUTILS_DIR) uninstall
-	-$(MAKE) -C $(COREUTILS_DIR) clean
-
-coreutils-dirclean:
-	rm -rf $(COREUTILS_DIR)
 
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_COREUTILS),y)
-TARGETS+=coreutils
-endif
+$(eval $(call AUTOTARGETS,package,coreutils))
-- 
1.7.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 0/6] Resubmit coreutils patchset
@ 2010-09-30 19:03 Martin Banky
  2010-09-30 19:03 ` [Buildroot] [PATCH 1/6] coreutils: converted to autotarget Martin Banky
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Banky @ 2010-09-30 19:03 UTC (permalink / raw)
  To: buildroot

Requested changes have been made

Martin

[PATCH 1/6] coreutils: converted to autotarget
[PATCH 2/6] coreutils: changed/removed some of the configure environmental variables
[PATCH 3/6] coreutils: fixed missing hostname
[PATCH 4/6] coreutils: bump to 8.5
[PATCH 5/6] coreutils: changed/removed some of the configure environmental variables
[PATCH 6/6] coreutils: add uname patch

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-09-30 19:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-24  2:54 [Buildroot] [PATCH 1/6] coreutils: converted to autotarget Martin Banky
2010-09-24  2:55 ` [Buildroot] [PATCH 2/6] coreutils: changed/removed some of the configure environmental variables Martin Banky
2010-09-24  2:55 ` [Buildroot] [PATCH 3/6] coreutils: fixed missing hostname Martin Banky
2010-09-24  2:55 ` [Buildroot] [PATCH 4/6] coreutils: bump to 8.5 Martin Banky
2010-09-24  2:55 ` [Buildroot] [PATCH 5/6] coreutils: changed/removed some of the configure environmental variables Martin Banky
2010-09-24  2:55 ` [Buildroot] [PATCH 6/6] coreutils: add uname patch Martin Banky
2010-09-29 11:23 ` [Buildroot] [PATCH 1/6] coreutils: converted to autotarget Thomas Petazzoni
2010-09-29 20:18   ` Martin Banky
  -- strict thread matches above, loose matches on Subject: below --
2010-09-30 19:03 [Buildroot] [PATCH 0/6] Resubmit coreutils patchset Martin Banky
2010-09-30 19:03 ` [Buildroot] [PATCH 1/6] coreutils: converted to autotarget Martin Banky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox