From patchwork Sun Aug 2 22:59:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1340048 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=YGFWeHES; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BKc4B13ydz9sRN for ; Mon, 3 Aug 2020 09:02:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D117381D71; Mon, 3 Aug 2020 01:02:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="YGFWeHES"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 142C281B88; Mon, 3 Aug 2020 01:02:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CF8AA81F13 for ; Mon, 3 Aug 2020 01:00:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x341.google.com with SMTP id v6so15847164ota.13 for ; Sun, 02 Aug 2020 16:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x87MH3yIVq+Oovq0nVOiXPEEtQktgJcmUO4/dFZa8rQ=; b=YGFWeHES6eIcjGbtYdLdm2j7G1Z85GwXa16XYAE/P1x7M+x2j1VSlaAq5xnSfKiGGT 8ZEQ/U8vB2RQI5oQZVaFxAMGu1Q0WiuciiTEBAY+INyw0WStfvmToehAEwAekCzh8D+y 94GzlNzBkRvGUSGNoPW7h+D5YCHj+hCd75y48= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x87MH3yIVq+Oovq0nVOiXPEEtQktgJcmUO4/dFZa8rQ=; b=j+Jt0evQqZjGLtt9jmZAEGJzqCAnFPSF8BZAxGnNTwR2U0rpPY0vx5dbORCzXNaViL tJWv3D6TIiNMRGA92pn2NLDjoBDPpTw6YJMANYNkgaCgxXPlEaSAjN2ZFB8sDS7d4WWB 7t24WKu+e7fmBfd4ARW/6Ct8T4HJQBbijdxu6tiZMJmSUXuHfUrkq05yAWLvauwMVl1K opEJntK6mopJBJR8RHi1n3qdJOUJ5rW3CXl7h6zzToGpQnYV/VEnYamUq69vxk6+dR1p LWR6NKbS2VYxYxW7jengdtebRA5JGCoI+ig8yFQmiaeEmoCUOW7oh3RlsmVmTn2JrR84 0r1Q== X-Gm-Message-State: AOAM531q99FnU6Dyf8i9EJ0+JBTu1Pj6z7CoOf3pem3WHzk1KOr0S/q/ WmVpiOmWOJlAwk7FZLzHxC8JJft4+i2hDw== X-Google-Smtp-Source: ABdhPJzhXZGeWFebYF5/w5PLKkeaxWv/FV4kmaie9xIpejtGnAK0XdAXB+DIYlbRpgldwrmXxOBFVA== X-Received: by 2002:a9d:ae9:: with SMTP id 96mr11455902otq.241.1596409250273; Sun, 02 Aug 2020 16:00:50 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id i5sm2572245otc.31.2020.08.02.16.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 16:00:49 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 14/16] common: Move the build-system includes to a separate file Date: Sun, 2 Aug 2020 16:59:38 -0600 Message-Id: <20200802225940.51457-15-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.163.g6104cc2f0b6-goog In-Reply-To: <20200802225940.51457-1-sjg@chromium.org> References: <20200802225940.51457-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean At present common.h is used by the build system when calculating dependencies. Move it out into a separate file so we can drop the env_internal.h inclusion from common. Signed-off-by: Simon Glass --- arch/nds32/lib/asm-offsets.c | 1 + include/common.h | 5 ----- include/deps_internal.h | 18 ++++++++++++++++++ scripts/Makefile.autoconf | 8 +++++--- 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 include/deps_internal.h diff --git a/arch/nds32/lib/asm-offsets.c b/arch/nds32/lib/asm-offsets.c index 39e3480bd52..7412b788d79 100644 --- a/arch/nds32/lib/asm-offsets.c +++ b/arch/nds32/lib/asm-offsets.c @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ #include +#include #include diff --git a/include/common.h b/include/common.h index 2e95d0ebdf5..1a9a2ce0ea8 100644 --- a/include/common.h +++ b/include/common.h @@ -16,9 +16,4 @@ #include #endif /* __ASSEMBLY__ */ -/* Pull in stuff for the build system */ -#ifdef DO_DEPS_ONLY -# include -#endif - #endif /* __COMMON_H_ */ diff --git a/include/deps_internal.h b/include/deps_internal.h new file mode 100644 index 00000000000..9c3b31cc577 --- /dev/null +++ b/include/deps_internal.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Internal header file used by the build system to calculate dependences + * + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __DEPS_INTERNAL +#define __DEPS_INTERNAL + +#ifndef __ASSEMBLY__ +#include +#endif + +#include + +#endif /* __DEPS_INTERNAL */ diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf index 0bfc1b2a629..89882e3c71a 100644 --- a/scripts/Makefile.autoconf +++ b/scripts/Makefile.autoconf @@ -41,8 +41,9 @@ c_flags := $(KBUILD_CFLAGS) $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) \ quiet_cmd_autoconf_dep = GEN $@ cmd_autoconf_dep = $(CC) -x c -DDO_DEPS_ONLY -M -MP $(c_flags) \ - -MQ include/config/auto.conf $(srctree)/include/common.h > $@ || { \ - rm $@; false; \ + -MQ include/config/auto.conf $(srctree)/include/deps_internal.h > $@ \ + || { \ + rm $@; false; \ } include/autoconf.mk.dep: include/config.h FORCE $(call cmd,autoconf_dep) @@ -66,7 +67,8 @@ quiet_cmd_autoconf = GEN $@ quiet_cmd_u_boot_cfg = CFG $@ cmd_u_boot_cfg = \ - $(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && { \ + $(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM \ + $(srctree)/include/deps_internal.h > $@.tmp && { \ grep 'define CONFIG_' $@.tmp > $@; \ rm $@.tmp; \ } || { \