From patchwork Wed Jul 30 09:20:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 374715 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 44C2C1401A8 for ; Wed, 30 Jul 2014 19:21:14 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E378B8BDE0; Wed, 30 Jul 2014 09:21:12 +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 UQo2jFH6pELU; Wed, 30 Jul 2014 09:21:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 22CDB8BE72; Wed, 30 Jul 2014 09:21:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D7DD81BFA72 for ; Wed, 30 Jul 2014 09:21:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D4EE18A3BA for ; Wed, 30 Jul 2014 09:21:10 +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 C5-F7FpKkqY2 for ; Wed, 30 Jul 2014 09:21:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by hemlock.osuosl.org (Postfix) with ESMTPS id 327F48919A for ; Wed, 30 Jul 2014 09:21:10 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id x12so889617wgg.16 for ; Wed, 30 Jul 2014 02:21:08 -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; bh=VCWKjjDN1WIG5gF8lamVe2uAZ9slXioeNJyXNNnenKo=; b=xvZEXOmKlniX/IZq5zsbznCqACDfoRqQWOnREP7Pg35QIXVJp860uEVR6Yel3p/evG 7qwLNYR+nHKxBxix6njGBLWU/0SyiLwPe5nrgP8GhqrpInZ0se185vzFY3542ZDufjVE z1+7Vw29C9/alZ3shT/agiSqE9+xzwVGpzWvPrnwatT7RgYvMnetAK0k8zkRkUrAQ2ih d3/dGv3D5Fr4YwKpf7GmnXJbIfEZMYyRZXOngdbTVvSfA2YHjkYNNnicwxvrs3lotB2l OJCo1JARUFYbmjm0JTtXqPDqkUST5ldowFegT6RsNzm53tSABYn/WH+nKEyBsmNSGpzK csFQ== X-Received: by 10.180.81.234 with SMTP id d10mr4043654wiy.79.1406712068673; Wed, 30 Jul 2014 02:21:08 -0700 (PDT) Received: from localhost.localdomain ([89.202.204.100]) by mx.google.com with ESMTPSA id v4sm53259820wiz.16.2014.07.30.02.21.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Jul 2014 02:21:08 -0700 (PDT) From: Angelo Compagnucci To: buildroot@uclibc.org Date: Wed, 30 Jul 2014 11:20:57 +0200 Message-Id: <1406712057-9710-1-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 2.0.3 Subject: [Buildroot] [PATCH v2] Makefile: Add target-clean target 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 This makefile target wipes the target folder and forces buildroot into rebuild it. It's useful when you have changed the list of packages and the target tree remains out of sync keeping old installed packages no longer needed. Signed-off-by: Angelo Compagnucci --- * Print a big fat warning at the end of target-clean execution Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Makefile b/Makefile index 022beea..b6467e0 100644 --- a/Makefile +++ b/Makefile @@ -829,6 +829,25 @@ clean: $(BUILD_DIR) $(BASE_DIR)/staging \ $(LEGAL_INFO_DIR) +target-clean: + rm -rf $(TARGET_DIR) + find $(BUILD_DIR) -name ".stamp_target_installed" -exec rm {} \; + rm -rf $(BUILD_DIR)/.root + @echo '' + @echo "***********************************************************" + @echo "* !!! WARNING !!! *" + @echo "* *" + @echo "* Cleaning and rebuilding your rootfs won't rebuild *" + @echo "* your packages. *" + @echo "* If you changed something on packages configurations *" + @echo "* or their dependencies, you'll have to rebuilt them *" + @echo "* manually with: *" + @echo "* \"make -reconfigure\" *" + @echo "* If something goes wrong, do a full rebuild with: *" + @echo "* \"make clean\". *" + @echo "* *" + @echo "***********************************************************" + distclean: clean ifeq ($(DL_DIR),$(TOPDIR)/dl) rm -rf $(DL_DIR) @@ -842,6 +861,7 @@ help: @echo 'Cleaning:' @echo ' clean - delete all files created by build' @echo ' distclean - delete all non-source files (including .config)' + @echo ' target-clean - delete all target files and forces reinstall' @echo @echo 'Build:' @echo ' all - make world'