From patchwork Wed Sep 13 07:29:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 13382539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EE8ECA5500 for ; Wed, 13 Sep 2023 07:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234492AbjIMHaJ (ORCPT ); Wed, 13 Sep 2023 03:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233131AbjIMHaI (ORCPT ); Wed, 13 Sep 2023 03:30:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62A161727 for ; Wed, 13 Sep 2023 00:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Type:Date:Cc:To: From:Subject:Message-ID:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=tRJ0I3AH7UeaT5UYMA2cN6sTsAWrmnf5CiPShK1DmZg=; b=R06jtECCml+ZW3tlrJJzj2hJWO Od/reCJjVFk3zP/XH+oiADnCaJqCnFkEsd6HkrZGYMunynhikF2tLdQVfI+vrytprOGJTKxe4fP4X CXiARwq5J7LJdPCiFy0l69GhQw/fJ2CdjFnJ1fomFibu9/0ai0ZbFkESTy4x9y2khZ6HE8lGpntki E0JywdOasH67MJ9L1Sd59D1desOpeSKJ1Q02FZ5deP7AEBgMo9dPL1g+9UGq10WBIR2d6cVfiEgEJ nhceviFqn99Ay7bI3xWbEztNXlLGXIWAxqZGCq8tjqYFWLtPnowGfkaG80cD9bG03o6RURaHoGEBJ BtMmSkHg==; Received: from [54.239.6.187] (helo=u3832b3a9db3152.ant.amazon.com) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qgKJx-00CV3m-Ep; Wed, 13 Sep 2023 07:29:57 +0000 Message-ID: <402218a490f286c039d4072be7f7d7b3f3216c49.camel@infradead.org> Subject: [kvm-unit-tests PATCH] Makefile: Add -MP to $(autodepend-flags) From: David Woodhouse To: kvm Cc: Paolo Bonzini , Thomas Huth , Andrew Jones Date: Wed, 13 Sep 2023 09:29:56 +0200 User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: David Woodhouse The -MP flag instructs the compiler to emit phony targets for each header file that it lists as a dependency, so that if a header file is *absent* from the next build (because it's been deleted and the C file no longer includes it), the build doesn't gratuitously fail when make thinks it's needed and can't work out how to create it. Signed-off-by: David Woodhouse Tested-by: Thomas Huth --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e7998a4..101c028 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,7 @@ CFLAGS += $(wmissing_parameter_type) CFLAGS += $(wold_style_declaration) CFLAGS += -Woverride-init -Wmissing-prototypes -Wstrict-prototypes -autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d +autodepend-flags = -MMD -MP -MF $(dir $*).$(notdir $*).d LDFLAGS += -nostdlib $(no_pie) -z noexecstack