qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	patches@linaro.org
Subject: [Qemu-devel] [PATCH] Makefile.hw: avoid overly large 'make clean' rm command
Date: Tue, 19 Jun 2012 15:55:38 +0100	[thread overview]
Message-ID: <1340117738-15225-1-git-send-email-peter.maydell@linaro.org> (raw)

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 <peter.maydell@linaro.org>
---
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))
-- 
1.7.1

             reply	other threads:[~2012-06-19 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19 14:55 Peter Maydell [this message]
2012-06-22  9:04 ` [Qemu-devel] [PATCH] Makefile.hw: avoid overly large 'make clean' rm command Stefan Hajnoczi

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=1340117738-15225-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).