Commit fbfa9be9 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: move include/config/ksym/* to include/ksym/*

The idea of using fixdep was inspired by Kconfig, but autoksyms
belongs to a different group.  So, I want to 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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
parent 1f50b80a
...@@ -87,6 +87,7 @@ modules.builtin ...@@ -87,6 +87,7 @@ modules.builtin
# #
include/config include/config
include/generated include/generated
include/ksym
arch/*/include/generated arch/*/include/generated
# stgit generated dirs # stgit generated dirs
......
...@@ -1336,7 +1336,7 @@ endif # CONFIG_MODULES ...@@ -1336,7 +1336,7 @@ endif # CONFIG_MODULES
# make distclean Remove editor backup files, patch leftover files and the like # make distclean Remove editor backup files, patch leftover files and the like
# Directories & files removed with 'make clean' # Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR) CLEAN_DIRS += $(MODVERDIR) include/ksym
# Directories & files removed with 'make mrproper' # Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config usr/include include/generated \ MRPROPER_DIRS += include/config usr/include include/generated \
......
...@@ -366,7 +366,7 @@ ksym_dep_filter = \ ...@@ -366,7 +366,7 @@ ksym_dep_filter = \
$(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \
boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \ boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \
*) echo "Don't know how to preprocess $(1)" >&2; false ;; \ *) 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 = \ cmd_and_fixdep = \
$(echo-cmd) $(cmd_$(1)); \ $(echo-cmd) $(cmd_$(1)); \
......
...@@ -80,7 +80,7 @@ sort "$cur_ksyms_file" "$new_ksyms_file" | uniq -u | ...@@ -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/" | sed -n 's/^#define __KSYM_\(.*\) 1/\1/p' | tr "A-Z_" "a-z/" |
while read sympath; do while read sympath; do
if [ -z "$sympath" ]; then continue; fi if [ -z "$sympath" ]; then continue; fi
depfile="include/config/ksym/${sympath}.h" depfile="include/ksym/${sympath}.h"
mkdir -p "$(dirname "$depfile")" mkdir -p "$(dirname "$depfile")"
touch "$depfile" touch "$depfile"
echo $((count += 1)) echo $((count += 1))
......
...@@ -113,11 +113,11 @@ static void usage(void) ...@@ -113,11 +113,11 @@ static void usage(void)
/* /*
* Print out a dependency path from a symbol name * 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; int c, i;
printf(" $(wildcard include/config/"); printf(" $(wildcard %s/", dir);
for (i = 0; i < slen; i++) { for (i = 0; i < slen; i++) {
c = m[i]; c = m[i];
if (c == '_') if (c == '_')
...@@ -140,7 +140,7 @@ static void do_extra_deps(void) ...@@ -140,7 +140,7 @@ static void do_extra_deps(void)
fprintf(stderr, "fixdep: bad data on stdin\n"); fprintf(stderr, "fixdep: bad data on stdin\n");
exit(1); 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) ...@@ -208,7 +208,7 @@ static void use_config(const char *m, int slen)
return; return;
define_config(m, slen, hash); define_config(m, slen, hash);
print_config(m, slen); print_dep(m, slen, "include/config");
} }
/* test if s ends in sub */ /* test if s ends in sub */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment