From patchwork Fri Mar 16 02:18:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 131888 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp178750ljb; Thu, 15 Mar 2018 19:19:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELuwAnbbfDFZfVXZz73R56pgUr5LwSPfKDEcIy/zqpxVDFLtUTmmGTHcn8zPw8gMG9j3L+W4 X-Received: by 10.101.98.149 with SMTP id f21mr88120pgv.7.1521166776541; Thu, 15 Mar 2018 19:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521166776; cv=none; d=google.com; s=arc-20160816; b=i3LyTIdAcoi2SK7pTHMDcwMhlyobqanRgkpoHDx9IvHdjlQZBzDAv9bscO30iQrUA9 AlZyAD9Oc20zXc4i3RS+L6L4P0TqMAYQAezln5i8/yYvmjBNPQwcaraHmZ/Q8u/AbvZ3 nNLWJvPC3Oj4tkopVfS6myxbIx79Eo3+vdQIyWGyn+9Gl+dzE/y+Ju948Nf5WJaJ7VzX 0KLid46LuaZE0+HGMt/hG2cXipkEv22tIvf6E/9Ij5dk8Wv50lxG2HUeKna/RSO+sWEg 13sHi7yWuz9BExEKc/qnJX4u+D/RCAfquzcLm2HJAVTahUTcDf8/K9kMRthRhV7s3hD+ gEyQ== 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=Z3HD3eyodL+oyYh5GGJVBXfJrga7Mnr65BjAVGBPG4o=; b=y/epXn02Kac9E9fyMTzNZvYOct9j5M9YSRlXBznexEuypm+QG5hgD/gBq5Vg2lOtOx lk+09/ROXw3oa6+Z+CNV71zyD9Mc/oMEYsk63cOPvjMm2stWZlHAcv5P/1bokXJvyFpp +NU/vFrrytbFgopSB+pY4c2er8SGAcLA0s9Q2CXSTPF0Sp+QxrxFToACCeVEAP1LtssF GhY6z95mAItoMG0a79yG5y2d3PhUY5Dwd6cXoQRcIT9pB/9cgnnKw2P2JJlePjx8k/mp knEo04sWmbW8iWHEsG/4UFEpLMVGvQPLH7zEkeUTW7KM+KG/5CRkiH8NP3XGCyEmAM/K GkOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=rqu9RiQ9; 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 f127si4225651pgc.49.2018.03.15.19.19.36; Thu, 15 Mar 2018 19:19:36 -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=rqu9RiQ9; 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 S932755AbeCPCTQ (ORCPT + 28 others); Thu, 15 Mar 2018 22:19:16 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:44534 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbeCPCTM (ORCPT ); Thu, 15 Mar 2018 22:19:12 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w2G2IoBR003525; Fri, 16 Mar 2018 11:18:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w2G2IoBR003525 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521166735; bh=Z3HD3eyodL+oyYh5GGJVBXfJrga7Mnr65BjAVGBPG4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rqu9RiQ9SvQCupy4oPqyb89yuOFJTXijKe55tpUm+G9ZuBvbA2c/uxs6d8BvKhukM mxfvVQllYEQl7jxRcXdl66NoJApnMvwecl9W4tvLnnuEBnTFedD13Z30XAIEKtt3Su C9ZKPgn+VhAPMBajCdVnKeYeaKid/nmFQRmHTmJk7++QSfDYncGed9XC59aH+2bkNl mUCxA+RbVqog8sETds7E5yuVOhOdBp9YTClSMS79GY5J8RJTQMHflFj7Eqwio9SyfF otJHgr50MdvESmKQ6N2OVjz6DYOYYgBBk5/HI9Nb/mII41JoCoJFVJKsPX4ww2Ga2h PC4krMJFEkm4w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Nicolas Pitre , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 6/7] kbuild: move include/config/ksym/* to include/ksym/* Date: Fri, 16 Mar 2018 11:18:43 +0900 Message-Id: <1521166725-24157-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521166725-24157-1-git-send-email-yamada.masahiro@socionext.com> References: <1521166725-24157-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 belongs to a different group. So, I want move those touched files under include/config/ksym/ to include/ksym/. The directory include/ksym/ can be removed by "make clean" because it is meaningless for the external module building. Signed-off-by: Masahiro Yamada --- Changes in v2: - Rebase on linux-next (resolve a conflict to https://patchwork.kernel.org/patch/10204653/) .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 Acked-by: Nicolas Pitre 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 ef42adb..5fee703 100644 --- a/Makefile +++ b/Makefile @@ -1338,7 +1338,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 f9c2f07..cce31ee 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -366,7 +366,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 -n 's/^.*=== __KSYM_\(.*\) ===.*$$/KSYM_\1/p' + esac | tr ";" "\n" | sed -n 's/^.*=== __KSYM_\(.*\) ===.*$$/_\1/p' cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh index e0dd0d5..f11cae6 100755 --- a/scripts/adjust_autoksyms.sh +++ b/scripts/adjust_autoksyms.sh @@ -80,7 +80,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 */