public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'David Woodhouse' <dwmw2@infradead.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] KVM: selftests: add -MP to CFLAGS
Date: Sun, 29 Oct 2023 21:13:41 +0000	[thread overview]
Message-ID: <3fa5bdded7504d6582cf01f4db4cd6b4@AcuMS.aculab.com> (raw)
In-Reply-To: <9fc8b5395321abbfcaf5d78477a9a7cd350b08e4.camel@infradead.org>

From: David Woodhouse
> Sent: 28 October 2023 20:35
> 
> Using -MD without -MP causes build failures when a header file is deleted
> or moved. With -MP, the compiler will emit phony targets for the header
> files it lists as dependencies, and the Makefiles won't refuse to attempt
> to rebuild a C unit which no longer includes the deleted header.

Won't a phony target stop a header being built if there is
an actual rule to build it?

I usually add:

%.h:
	echo "Ignoring stale dependency for $@"

Which only applies if there isn't an explicit rule.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2023-10-29 21:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28 19:34 [PATCH] KVM: selftests: add -MP to CFLAGS David Woodhouse
2023-10-29 21:13 ` David Laight [this message]
2023-10-30  9:45   ` David Woodhouse
2023-10-30 10:08     ` David Laight
2023-10-30 10:22       ` David Woodhouse
2023-11-30  1:44 ` Sean Christopherson

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=3fa5bdded7504d6582cf01f4db4cd6b4@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=dwmw2@infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.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