From patchwork Wed Mar 14 16:44:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 131667 Delivered-To: patch@linaro.org Received: by 10.80.210.197 with SMTP id q5csp397204edg; Wed, 14 Mar 2018 09:46:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELs6jC2ob/YIfMF35OnjoJVaxSXg9kCjCgkK52Joeqc1/GMgJeVVcnppR/Xd46Z0mwospwFx X-Received: by 2002:a17:902:161:: with SMTP id 88-v6mr4637587plb.212.1521046017667; Wed, 14 Mar 2018 09:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521046017; cv=none; d=google.com; s=arc-20160816; b=burmPgLrzPd8uxh37mwmmCYXRcrh7JHd1+UU4YXuNvKVxDjtYsYah7XZilnfsbl74e si1pI7/dJmpOLLw6e8ZLT7fy4CcmqbKxjEm9YPbXlI9BLVkieBi4nGoJ6jAk1fe085kx RV6YCEJZ+HadVUQgMYC6qnWaNBdWeCyFdcVLPRjya0+sYitjd8ibckrjNruwFbUwbQJ/ uaI6Mal5NYpx35Qfqc5eWofosJGrDNwQDtVpa4bfAO6Gfg6qr+lS7GnrdlniCQJdV/wo gFyN30ZzOP8fOVrXABrqJE3rBfB39gXuQljX6kC4nbSisktiRN1UCpcP60xTSgbnk33k UKWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=slnOVu8qFRQHoVhiQqgOoyKaEpxgMr2agyULwrb7FWI=; b=D7kO0lhU9w+gEDJLKq0glkI1/dFjqOHQIQXLAzxcJtRlyzmvvCxki0Bzj9TI3q9INC StAleZ996602maGu+vtg3xjWhf6W9P1r0Et+oN8VsOeRxmrBYc8EFFqw+FdN0nrke6wB aFv+KtjRlbEkjNXgIKKjeH+vMhr2aq3SnDSJKpd8gkI0KlOjeidX39WJDX3LfS3CeRcl N4GK4zFcGjdHZYE8/7v8oGEnS3mIgBUOIPhxFYWz5hktpyBDQaCTGfB83vEh3rX04r/u djIe+LHLuyldG2hQ+Mi+rCdZ+i3iZhT3Q1t+5SQz0r7BPqRS7Np3YCFawsG2iE1qdLs8 DkfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fcykLdfn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71-v6si2258016pla.707.2018.03.14.09.46.57; Wed, 14 Mar 2018 09:46:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fcykLdfn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbeCNQpo (ORCPT + 28 others); Wed, 14 Mar 2018 12:45:44 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:38073 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752078AbeCNQou (ORCPT ); Wed, 14 Mar 2018 12:44:50 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-07.nifty.com with ESMTP id w2EGiSdV001049; Thu, 15 Mar 2018 01:44:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w2EGiSdV001049 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521045872; bh=slnOVu8qFRQHoVhiQqgOoyKaEpxgMr2agyULwrb7FWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fcykLdfnB+UxmW+RoHlqENfTX3O4ehmBeiMUQjJPvpWd8I6DGSGKeLpMI72EP8Eev 1qm+oD/93BrSKQYKwbfHk+ojgC9kX2mQ6djkitZbQe6xrf4rbbfiMMp9ohjBHsEMGh VbxsPJNefR0qFx6safVzOLDhFS4yPWpH4UQDf4KrOoe2IzZ0cN0xzbAxfVr1iLu4sr mus4k62tNGFL6NWWySQwxL853SOUepK/su79zb9d6FBmh77czTUw9Wisr7rNTuKIEB ZH0Xi9uKCHR6H3Usa3Q3/OdfuKqQtItl6hDoHZb1ZjzurDGs5L+0lRGOZwHuF9mbIu 45gLS4LGP5eAw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Nicolas Pitre , Jarod Wilson , Prarit Bhargava , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 6/7] kbuild: move include/config/ksym/* to include/ksym/* Date: Thu, 15 Mar 2018 01:44:20 +0900 Message-Id: <1521045861-22418-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521045861-22418-1-git-send-email-yamada.masahiro@socionext.com> References: <1521045861-22418-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The idea of using fixdep was inspired by Kconfig, but autoksyms is unrelated to Kconfig. So, I want to get those touched files out of include/config/. The directory include/ksym/ is removed by "make clean". We do not need to keep it for external module building. Signed-off-by: Masahiro Yamada --- .gitignore | 1 + Makefile | 2 +- scripts/Kbuild.include | 2 +- scripts/adjust_autoksyms.sh | 2 +- scripts/basic/fixdep.c | 8 ++++---- 5 files changed, 8 insertions(+), 7 deletions(-) -- 2.7.4 diff --git a/.gitignore b/.gitignore index 1be78fd..85bcc26 100644 --- a/.gitignore +++ b/.gitignore @@ -87,6 +87,7 @@ modules.builtin # include/config include/generated +include/ksym arch/*/include/generated # stgit generated dirs diff --git a/Makefile b/Makefile index e60b16f..1dab647 100644 --- a/Makefile +++ b/Makefile @@ -1327,7 +1327,7 @@ endif # CONFIG_MODULES # make distclean Remove editor backup files, patch leftover files and the like # Directories & files removed with 'make clean' -CLEAN_DIRS += $(MODVERDIR) +CLEAN_DIRS += $(MODVERDIR) include/ksym # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config usr/include include/generated \ diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 065324a..045971e 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -368,7 +368,7 @@ ksym_dep_filter = \ $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \ *) echo "Don't know how to preprocess $(1)" >&2; false ;; \ - esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' + esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/\1/p' cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh index a52210b..7bb3618 100755 --- a/scripts/adjust_autoksyms.sh +++ b/scripts/adjust_autoksyms.sh @@ -81,7 +81,7 @@ sort "$cur_ksyms_file" "$new_ksyms_file" | uniq -u | sed -n 's/^#define __KSYM_\(.*\) 1/\1/p' | tr "A-Z_" "a-z/" | while read sympath; do if [ -z "$sympath" ]; then continue; fi - depfile="include/config/ksym/${sympath}.h" + depfile="include/ksym/${sympath}.h" mkdir -p "$(dirname "$depfile")" touch "$depfile" echo $((count += 1)) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 449b68c..f387538 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -113,11 +113,11 @@ static void usage(void) /* * Print out a dependency path from a symbol name */ -static void print_config(const char *m, int slen) +static void print_dep(const char *m, int slen, const char *dir) { int c, i; - printf(" $(wildcard include/config/"); + printf(" $(wildcard %s/", dir); for (i = 0; i < slen; i++) { c = m[i]; if (c == '_') @@ -140,7 +140,7 @@ static void do_extra_deps(void) fprintf(stderr, "fixdep: bad data on stdin\n"); exit(1); } - print_config(buf, len - 1); + print_dep(buf, len - 1, "include/ksym"); } } @@ -208,7 +208,7 @@ static void use_config(const char *m, int slen) return; define_config(m, slen, hash); - print_config(m, slen); + print_dep(m, slen, "include/config"); } /* test if s ends in sub */