From patchwork Fri Jan 7 11:53:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent McIntyre X-Patchwork-Id: 5464 Return-path: Envelope-to: mchehab@pedra Delivery-date: Sun, 09 Jan 2011 16:59:34 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1Pc0UH-0000tX-Mr for mchehab@pedra; Sun, 09 Jan 2011 16:59:34 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 09 Jan 2011 16:59:33 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PbAsc-0004WE-Cd; Fri, 07 Jan 2011 11:53:14 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935Ab1AGLxM (ORCPT + 1 other); Fri, 7 Jan 2011 06:53:12 -0500 Received: from mail-yi0-f46.google.com ([209.85.218.46]:34533 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584Ab1AGLxL (ORCPT ); Fri, 7 Jan 2011 06:53:11 -0500 Received: by yib18 with SMTP id 18so4535976yib.19 for ; Fri, 07 Jan 2011 03:53:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=ktht5/HAgHn7tsXR+ZkmwwPnDv7Dh11k9wG1sBzT92k=; b=DwoGEGf4SblSfBgnUVPcmc2499Qh2k+ygjX8HGE2kDnPCz6sxDlKNgyfbCiOLBhZqx ibb5ECoE6fnc1p+0T4J6NYD8DUx/D4SDdzdzs8N5LETadlk72YfVzrMlXa2C/+Y8QoUO 9bBoOMi9PnnX4oaeyiS1tQgYxrOzfTkLAVXmA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=QTmnmxXIyHSPFFBTaU2B1Oz2aGENnoqdRUSiLxkQKkKfBKadlMUteFnP6voTEGe/uv KZrty5iQWztsUjf3bdyFjBkIrp25Y/av61IyVMRnsWYOj7eNFSqpYT0AxSmtk2PiCkIG /Ehxk2A0NkswBywWv8l3E5+oTcpji462M2ro0= MIME-Version: 1.0 Received: by 10.151.156.12 with SMTP id i12mr24460668ybo.135.1294401190511; Fri, 07 Jan 2011 03:53:10 -0800 (PST) Received: by 10.151.7.18 with HTTP; Fri, 7 Jan 2011 03:53:10 -0800 (PST) Date: Fri, 7 Jan 2011 22:53:10 +1100 Message-ID: Subject: [patch] new_build.git - avoid failing on 'rm' of nonexistent file From: Vincent McIntyre To: linux-media@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: While attempting to build recently I have found the 'make distclean' target fails if 'rm' tries to remove a file that is not there. The attached patch fixes the issue for me (by using rm -f). I converted all the other 'rm' calls to 'rm -f' along the way. Please consider applying this. Cheers Vince diff --git a/linux/Makefile b/linux/Makefile index 695dcf2..8bbeee8 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -53,7 +52,7 @@ help: todaytar: @if [ "$(DIR)" = "" ]; then echo "make $@ DIR="; exit -1; fi - -rm $(PWD)/$(TODAY_TAR).bz2 + -rm -f $(PWD)/$(TODAY_TAR).bz2 tar cf $(PWD)/$(TODAY_TAR) -C $(DIR) $(TARFILES) -git --git-dir $(DIR)/.git log --pretty=oneline HEAD^1^1^1^1^1^1^1^1..HEAD >git_log tar rvf $(PWD)/linux-media.tar git_log @@ -70,7 +69,7 @@ todaytar: tar: @if [ "$(DIR)" = "" ]; then echo "make $@ DIR="; exit -1; fi - -rm $(PWD)/linux-media.tar.bz2 + -rm -f $(PWD)/linux-media.tar.bz2 tar cf $(PWD)/linux-media.tar -C $(DIR) $(TARFILES) -git --git-dir $(DIR)/.git log --pretty=oneline HEAD^1^1^1^1^1^1^1^1..HEAD >git_log tar rvf $(PWD)/linux-media.tar git_log @@ -97,7 +96,7 @@ dir: clean ./use_dir.pl $(DIR) distclean: clean - -rm linux-media.tar.bz2 linux-media.tar.bz2.md5 + -rm -f linux-media.tar.bz2 linux-media.tar.bz2.md5 apply_patches apply-patches: @if [ -e .linked_dir ]; then ./use_dir.pl --recheck --silent; fi @@ -131,7 +130,7 @@ apply_patches apply-patches: mv .patches_applied .patches_applied.old; \ echo "#$$dir" > .patches_applied; \ cat .patches_applied.old >> .patches_applied; \ - rm .patches_applied.old; \ + rm -f .patches_applied.old; \ if [ -e .linked_dir ]; then ./use_dir.pl --get_patched; fi unapply_patches unapply-patches: @@ -141,7 +140,7 @@ unapply_patches unapply-patches: echo patch -s -f -R -p1 -i ../backports/$$i; \ patch -s -f -R -p1 -i ../backports/$$i || break; \ done; \ - rm .patches_applied; fi + rm -f .patches_applied; fi download: wget $(LATEST_TAR_MD5) -O linux-media.tar.bz2.md5.tmp