Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Banky <martin.banky@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 06/18] cvs: convert to autotargets
Date: Sun, 26 Sep 2010 00:13:57 -0700	[thread overview]
Message-ID: <1285485249-29212-6-git-send-email-Martin.Banky@gmail.com> (raw)
In-Reply-To: <1285485249-29212-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/cvs/cvs.mk |   92 +++++++++++++++------------------------------------
 1 files changed, 27 insertions(+), 65 deletions(-)

diff --git a/package/cvs/cvs.mk b/package/cvs/cvs.mk
index e0f97ec..6e7f45c 100644
--- a/package/cvs/cvs.mk
+++ b/package/cvs/cvs.mk
@@ -3,16 +3,17 @@
 # cvs
 #
 #############################################################
-CVS_VERSION:=1.12.13
-CVS_SOURCE:=cvs_$(CVS_VERSION).orig.tar.gz
-CVS_PATCH:=cvs_$(CVS_VERSION)-8.diff.gz
-CVS_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/c/cvs/
-CVS_DIR:=$(BUILD_DIR)/cvs-$(CVS_VERSION)
-CVS_CAT:=$(ZCAT)
-CVS_BINARY:=src/cvs
-CVS_TARGET_BINARY:=usr/bin/cvs
+CVS_VERSION = 1.12.13
+CVS_SOURCE = cvs_$(CVS_VERSION).orig.tar.gz
+CVS_PATCH = cvs_$(CVS_VERSION)-12.diff.gz
+CVS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/c/cvs/
+CVS_DEPENDENCIES = ncurses
+CVS_BINARY = src/cvs
+CVS_TARGET_BINARY = usr/bin/cvs
 
-CVS_CONFIGURE_ARGS:=--disable-old-info-format-support
+CVS_CONF_ENV = cvs_cv_func_printf_ptr=yes
+
+CVS_CONFIGURE_ARGS=--disable-old-info-format-support
 ifeq ($(BR2_PACKAGE_CVS_SERVER),y)
 CVS_CONFIGURE_ARGS+=--enable-server
 else
@@ -22,73 +23,34 @@ ifeq ($(BR2_PACKAGE_ZLIB),y)
 CVS_CONFIGURE_ARGS+=--with-external-zlib
 endif
 
-$(DL_DIR)/$(CVS_SOURCE):
-	$(call DOWNLOAD,$(CVS_SITE),$(CVS_SOURCE))
+CVS_CONF_OPT = $(CVS_CONFIGURE_ARGS)
 
-ifneq ($(CVS_PATCH),)
-CVS_PATCH_FILE=$(DL_DIR)/$(CVS_PATCH)
-$(CVS_PATCH_FILE):
-	$(call DOWNLOAD,$(CVS_SITE),$(CVS_PATCH))
-endif
-cvs-source: $(DL_DIR)/$(CVS_SOURCE) $(CVS_PATCH_FILE)
+define CVS_BZIP_UNPACK
+	$(BZCAT) $(@D)/cvs-$(CVS_VERSION).tar.bz2 | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+	rm -f $(@D)/cvs-$(CVS_VERSION).tar.bz2
+endef
+
+CVS_POST_PATCH_HOOKS += CVS_BZIP_UNPACK
 
-$(CVS_DIR)/.unpacked: $(DL_DIR)/$(CVS_SOURCE) $(CVS_PATCH_FILE)
-	-mkdir $(CVS_DIR)
-	$(CVS_CAT) $(DL_DIR)/$(CVS_SOURCE) | tar -C $(CVS_DIR) $(TAR_OPTIONS) -
-	$(BZCAT) $(CVS_DIR)/cvs-$(CVS_VERSION)/cvs-$(CVS_VERSION).tar.bz2 | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	rm -rf $(CVS_DIR)/cvs-$(CVS_VERSION)
-	$(CONFIG_UPDATE) $(CVS_DIR)
-	$(CONFIG_UPDATE) $(CVS_DIR)/build-aux
-	toolchain/patch-kernel.sh $(CVS_DIR) package/cvs \*$(CVS_VERSION)\*.patch
 ifneq ($(CVS_PATCH),)
-	toolchain/patch-kernel.sh $(CVS_DIR) $(DL_DIR) $(CVS_PATCH)
-	if [ -d $(CVS_DIR)/debian/patches ]; then \
-		(cd $(CVS_DIR)/debian/patches && for i in *; \
+define CVS_DEBIAN_PATCHES
+	if [ -d $(@D)/debian/patches ]; then \
+		(cd $(@D)/debian/patches && for i in *; \
 		 do $(SED) 's,^\+\+\+ .*cvs-$(CVS_VERSION)/,+++ cvs-$(CVS_VERSION)/,' $$i; \
 		 done; \
 		); \
-		toolchain/patch-kernel.sh $(CVS_DIR) $(CVS_DIR)/debian/patches \*; \
+		toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*; \
 	fi
+endef
 endif
-	touch $@
-
-$(CVS_DIR)/.configured: $(CVS_DIR)/.unpacked
-	(cd $(CVS_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		cvs_cv_func_printf_ptr=yes \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		$(DISABLE_LARGEFILE) \
-		$(DISABLE_NLS) \
-		$(CVS_CONFIGURE_ARGS) \
-	)
-	touch $@
 
-$(CVS_DIR)/$(CVS_BINARY): $(CVS_DIR)/.configured
-	$(MAKE) -C $(CVS_DIR)
+CVS_POST_PATCH_HOOKS += CVS_DEBIAN_PATCHES
 
-$(TARGET_DIR)/$(CVS_TARGET_BINARY): $(CVS_DIR)/$(CVS_BINARY)
-	install -D $(CVS_DIR)/$(CVS_BINARY) $(TARGET_DIR)/$(CVS_TARGET_BINARY)
+define CVS_INSTALL_TARGET_CMDS
+	install -D $(@D)/$(CVS_BINARY) $(TARGET_DIR)/$(CVS_TARGET_BINARY)
 	$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$(CVS_TARGET_BINARY)
+endef
 
-cvs: ncurses $(TARGET_DIR)/$(CVS_TARGET_BINARY)
-
-cvs-clean:
-	-$(MAKE) -C $(CVS_DIR) clean
-	rm -f $(TARGET_DIR)/$(CVS_TARGET_BINARY)
+$(eval $(call AUTOTARGETS,package,cvs))
 
-cvs-dirclean:
-	rm -rf $(CVS_DIR)
 
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_CVS),y)
-TARGETS+=cvs
-endif
-- 
1.7.3

  parent reply	other threads:[~2010-09-26  7:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26  7:13 [Buildroot] [PATCH 01/18] acpid: convert to gentargets and bump to 2.0.6 Martin Banky
2010-09-26  7:13 ` [Buildroot] [PATCH 02/18] axel: convert to gentargets and bump to 2.4 Martin Banky
2010-09-26 21:12   ` Peter Korsgaard
2010-09-26  7:13 ` [Buildroot] [PATCH 03/18] boa: convert to gentargets Martin Banky
2010-09-26 19:21   ` Peter Korsgaard
2010-09-26  7:13 ` [Buildroot] [PATCH 04/18] bsdiff: " Martin Banky
2010-09-26 19:54   ` Peter Korsgaard
2010-09-26  7:13 ` [Buildroot] [PATCH 05/18] boa: convert to autotargets Martin Banky
2010-09-26 19:55   ` Peter Korsgaard
2010-09-26 21:22     ` Martin Banky
2010-09-26 22:04       ` Peter Korsgaard
2010-09-26  7:13 ` Martin Banky [this message]
2010-09-30 12:34   ` [Buildroot] [PATCH 06/18] cvs: " Peter Korsgaard
2010-09-26  7:13 ` [Buildroot] [PATCH 07/18] dosfstools: convert to gentargets and bump to 3.0.10 Martin Banky
2010-09-26 20:26   ` Peter Korsgaard
2010-09-26  7:13 ` [Buildroot] [PATCH 08/18] ezxml: convert to gentargets Martin Banky
2010-09-26 12:35   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 09/18] fbset: " Martin Banky
2010-09-26 18:55   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 10/18] fconfig: convert to gentargets and bump to 20080329 Martin Banky
2010-09-29 20:15   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 11/18] gadgets-test: convert to gentargets Martin Banky
2010-09-29 20:27   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 12/18] hotplug: " Martin Banky
2010-09-26 20:14   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 13/18] hdparm: convert to gentargets and bump to 9.32 Martin Banky
2010-09-27 21:20   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 14/18] hwdata: convert to gentargets and bump to 0.230 Martin Banky
2010-09-26 20:35   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 15/18] liberation: convert to gentargets and bump to 1.06.0.20100721 Martin Banky
2010-09-29 20:30   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 16/18] lm-sensors: convert to gentargets and bump to 3.1.2 Martin Banky
2010-09-27 20:48   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 17/18] lockfile-progs: convert to gentargets and bump to 0.1.15 Martin Banky
2010-09-29 20:41   ` Peter Korsgaard
2010-09-26  7:14 ` [Buildroot] [PATCH 18/18] logrotate: convert to gentargets and bump to 3.7.9 Martin Banky
2010-09-26 20:54   ` Peter Korsgaard
2010-09-29 20:55 ` [Buildroot] [PATCH 01/18] acpid: convert to gentargets and bump to 2.0.6 Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285485249-29212-6-git-send-email-Martin.Banky@gmail.com \
    --to=martin.banky@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox