From patchwork Sat Jul 27 16:56:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzu-Jung Lee X-Patchwork-Id: 262488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 496512C00A8 for ; Sun, 28 Jul 2013 02:53:08 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5B9B99354D; Sat, 27 Jul 2013 16:53:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jNeWX-7ykzx9; Sat, 27 Jul 2013 16:53:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6BC679348B; Sat, 27 Jul 2013 16:53:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5B03B1BFAAD for ; Sat, 27 Jul 2013 16:53:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B94938C66A for ; Sat, 27 Jul 2013 16:53:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IxsgW-Bqtfrk for ; Sat, 27 Jul 2013 16:53:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by whitealder.osuosl.org (Postfix) with ESMTPS id 171F28C45A for ; Sat, 27 Jul 2013 16:53:02 +0000 (UTC) Received: by mail-pd0-f174.google.com with SMTP id 3so2954249pdj.33 for ; Sat, 27 Jul 2013 09:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=K1AwcZGGgEGGz6DsZ6hnrrXyn+biJrwz/y3npzddIH4=; b=phCOYGWKDPQLBEHvtHLnlywsP7a28dKqrZZQ4lTPnpXt4ikQF1Uxu4VfojVrPPNLcM jUj3X2ErKi61/Ee2HFnI+FKC4HuXvoz+Gz+5dEXK/rN+tboaYo4C9ikjt11p0hCveWTp EJGn7/fi07q22XCttiE2ZQo7IduAPz+LHKDAS5fR6O7j53G2D+2sSWudaG9z00in+K0J dw4MLsN3kFmMUpJ7mHy7e3vJ8QWU5UABuHVcep4NAXfg5KYKWYDZ6uObaoF3lwbpB7ZK XekNyg6u/DU8hA8XzcHAYuM/MFe6h+KAD2pKltMjAzw/JPeqCwoqeghx2Xg+zVJS8NVl FRvQ== X-Received: by 10.66.7.164 with SMTP id k4mr59842187paa.142.1374943981850; Sat, 27 Jul 2013 09:53:01 -0700 (PDT) Received: from localhost.localdomain (59-104-36-192.adsl.dynamic.seed.net.tw. [59.104.36.192]) by mx.google.com with ESMTPSA id jf4sm66875610pbb.19.2013.07.27.09.53.00 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 27 Jul 2013 09:53:01 -0700 (PDT) From: Tzu-Jung Lee To: buildroot@busybox.net Date: Sun, 28 Jul 2013 00:56:36 +0800 Message-Id: <1374944196-19580-1-git-send-email-tjlee@ambarella.com> X-Mailer: git-send-email 1.8.3.2 Cc: Tzu-Jung Lee Subject: [Buildroot] [PATCH] buildroot: Add POST_RSYNC_HOOKS support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net One of the use cases is for the 'local packages' to restore the SCM info. Some packages use this information to generate version info during build time. In this case, the local package can have this hook to restore it by symbolic link for example. Signed-off-by: Tzu-Jung Lee --- package/pkg-generic.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index d9a12f2..06e865d 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -63,6 +63,7 @@ $(BUILD_DIR)/%/.stamp_rsynced: @$(call MESSAGE,"Syncing from source dir $(SRCDIR)") @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1) rsync -au --cvs-exclude --include core $(SRCDIR)/ $(@D) + $(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep)) $(Q)touch $@ # Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced