[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fa5bdded7504d6582cf01f4db4cd6b4@AcuMS.aculab.com>
Date: Sun, 29 Oct 2023 21:13:41 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'David Woodhouse' <dwmw2@...radead.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
CC: Paolo Bonzini <pbonzini@...hat.com>, Shuah Khan <shuah@...nel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] KVM: selftests: add -MP to CFLAGS
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)
Powered by blists - more mailing lists