All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	patches@linaro.org, qemu-trivial@nongnu.org,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target
Date: Tue, 31 Jul 2012 18:20:59 +0200	[thread overview]
Message-ID: <501805EB.9070606@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA_iNL5YS4cH=NH=o_y3D9pmnE6j3U2qS6-xUw5CP_L4bA@mail.gmail.com>

Am 31.07.2012 17:51, schrieb Peter Maydell:
> On 31 July 2012 16:49, Stefan Weil <sw@weilnetz.de> wrote:
>> Yes, QEMU creates files in 3 levels. We could use
>>
>>      rm -f *.[od] */*.[od] */*/*.[od]
>>
>> I suggest using the wrapper $(call quiet-command,...)
>> to suppress printing of all removed file names.
>
> My worry was not so much what we print as that we
> might be exceeding the total command line length
> limits on some systems (whether you did it this way
> or via "rm -f $(find ...)").
>
> -- PMM

That's quite possible:

$ find -name "*.[od]"|wc
    4862    4862  151329
$ ls *.[od] */*.[od] */*/*.[od] */*/*/*.[od] */*/*/*/*.[od]|wc
    4862    4862  141605

(I was somewhat surprised to see that we use 5 levels of directories).

The command line would be more than 140000 characters which is indeed 
very long.

Separating .o and .d files and the levels reduces that number:

$ ls *.o|wc
      80      80     952
$ ls */*.o|wc
     819     819   20048
$ ls */*/*.o|wc
    1406    1406   45573
$ ls */*/*/*.o|wc
      87      87    2579
$ ls */*/*/*/*.o|wc
      16      16     796

The 2nd and the 3rd level are potentially critical, but they could be
split up further if needed.

What about removing support for in-tree builds?
For out-of-tree builds 'make distclean' is nearly trivial.

-- Stefan W.



WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: patches@linaro.org, qemu-trivial@nongnu.org,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target
Date: Tue, 31 Jul 2012 18:20:59 +0200	[thread overview]
Message-ID: <501805EB.9070606@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA_iNL5YS4cH=NH=o_y3D9pmnE6j3U2qS6-xUw5CP_L4bA@mail.gmail.com>

Am 31.07.2012 17:51, schrieb Peter Maydell:
> On 31 July 2012 16:49, Stefan Weil <sw@weilnetz.de> wrote:
>> Yes, QEMU creates files in 3 levels. We could use
>>
>>      rm -f *.[od] */*.[od] */*/*.[od]
>>
>> I suggest using the wrapper $(call quiet-command,...)
>> to suppress printing of all removed file names.
>
> My worry was not so much what we print as that we
> might be exceeding the total command line length
> limits on some systems (whether you did it this way
> or via "rm -f $(find ...)").
>
> -- PMM

That's quite possible:

$ find -name "*.[od]"|wc
    4862    4862  151329
$ ls *.[od] */*.[od] */*/*.[od] */*/*/*.[od] */*/*/*/*.[od]|wc
    4862    4862  141605

(I was somewhat surprised to see that we use 5 levels of directories).

The command line would be more than 140000 characters which is indeed 
very long.

Separating .o and .d files and the levels reduces that number:

$ ls *.o|wc
      80      80     952
$ ls */*.o|wc
     819     819   20048
$ ls */*/*.o|wc
    1406    1406   45573
$ ls */*/*/*.o|wc
      87      87    2579
$ ls */*/*/*/*.o|wc
      16      16     796

The 2nd and the 3rd level are potentially critical, but they could be
split up further if needed.

What about removing support for in-tree builds?
For out-of-tree builds 'make distclean' is nearly trivial.

-- Stefan W.

  reply	other threads:[~2012-07-31 16:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 13:01 [Qemu-trivial] [PATCH] Makefile: Avoid explicit list of directories in clean target Peter Maydell
2012-07-31 13:01 ` [Qemu-devel] " Peter Maydell
2012-07-31 13:25 ` [Qemu-trivial] " Stefan Hajnoczi
2012-07-31 13:25   ` [Qemu-devel] " Stefan Hajnoczi
2012-07-31 14:19 ` [Qemu-trivial] " Markus Armbruster
2012-07-31 14:19   ` Markus Armbruster
2012-07-31 14:21   ` [Qemu-trivial] " Peter Maydell
2012-07-31 14:21     ` Peter Maydell
2012-07-31 14:35     ` [Qemu-trivial] " Markus Armbruster
2012-07-31 14:35       ` Markus Armbruster
2012-07-31 14:38       ` [Qemu-trivial] " Daniel P. Berrange
2012-07-31 14:38         ` Daniel P. Berrange
2012-07-31 15:00         ` [Qemu-trivial] " Peter Maydell
2012-07-31 15:00           ` Peter Maydell
2012-07-31 15:49           ` [Qemu-trivial] " Stefan Weil
2012-07-31 15:49             ` Stefan Weil
2012-07-31 15:51             ` [Qemu-trivial] " Peter Maydell
2012-07-31 15:51               ` Peter Maydell
2012-07-31 16:20               ` Stefan Weil [this message]
2012-07-31 16:20                 ` Stefan Weil
2012-07-31 17:02                 ` [Qemu-trivial] " Blue Swirl
2012-07-31 17:02                   ` Blue Swirl
2012-07-31 14:24   ` [Qemu-trivial] " Eric Blake
2012-07-31 14:24     ` Eric Blake
2012-08-01 10:28     ` [Qemu-trivial] " Stefan Hajnoczi
2012-08-01 10:28       ` 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=501805EB.9070606@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.