From patchwork Tue Jun 19 14:55:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9452 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 92D5223E53 for ; Tue, 19 Jun 2012 14:55:45 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 57862A18A4D for ; Tue, 19 Jun 2012 14:55:45 +0000 (UTC) Received: by ghbz12 with SMTP id z12so5089728ghb.11 for ; Tue, 19 Jun 2012 07:55:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=shL68r92svWJzFipZxcMIiA5CzWKn2yt9eJYMLmP/dQ=; b=jNMa3KS1gie/tM9hu0j9IyPB9TM/I22lAowih1Lk/RprWCOPoKT/LenVD6cmyV5CpM GmNre+guB6GUQdHmMzO6jMrKbsKFvT0xrAEjA6TjWRtPYB7avrR9Mws/anH2xb8E8VZ5 VBNsH6sxJvUeMZH1J+Wp32vTArGgIls8QjN5QLDAbJcUelSQm2dkRXRuZUHqhAbtZrps ytTMoZjo+AM5M1PB8hYXx5iCSArI/qOHVlEUf+plWakNdwn6l5h3qboBJt1ZNlw4QABw 9eN9jmLd+BVsFJGDSsspUjvGRLUOYyMYb3LKRoIUGdzyODsgMpCGMPZsbGBpa+7Bh+WD 0kHg== Received: by 10.50.195.234 with SMTP id ih10mr1542442igc.0.1340117744663; Tue, 19 Jun 2012 07:55:44 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp129353ibb; Tue, 19 Jun 2012 07:55:43 -0700 (PDT) Received: by 10.180.82.195 with SMTP id k3mr4160813wiy.9.1340117743153; Tue, 19 Jun 2012 07:55:43 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id w63si25249666wel.94.2012.06.19.07.55.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Jun 2012 07:55:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1SgzqE-0003y0-Ex; Tue, 19 Jun 2012 15:55:38 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Paolo Bonzini , qemu-trivial@nongnu.org Subject: [PATCH] Makefile.hw: avoid overly large 'make clean' rm command Date: Tue, 19 Jun 2012 15:55:38 +0100 Message-Id: <1340117738-15225-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQnI5UheKmyR0cq5W23F8rMPT7O7wQ+CSMHG2jtQ/vxiV8bUAyRFwfZyw/cC2xctgbiValwn Avoid 'make clean' producing an 'rm' command which has a lot of duplicate 'hw//*.o' arguments, by using $(sort $(dir ..)) rather than $(dir $(sort ..)) so Make's sort function will remove the duplicates for us. We can also remove the double '//' safely because $(dir ..) is guaranteed to return a string ending in '/'. Signed-off-by: Peter Maydell --- Mostly cosmetic, although I guess there's a faint chance that expanding all those hw/*.o would hit the command line argument buffer limit... Makefile.hw | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.hw b/Makefile.hw index 2bcbaff..28fe100 100644 --- a/Makefile.hw +++ b/Makefile.hw @@ -19,8 +19,8 @@ all: $(hw-obj-y) @true clean: - rm -f $(addsuffix /*.o, $(dir $(sort $(hw-obj-y)))) - rm -f $(addsuffix /*.d, $(dir $(sort $(hw-obj-y)))) + rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y)))) + rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y)))) # Include automatically generated dependency files -include $(patsubst %.o, %.d, $(hw-obj-y))