Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fbfa9be

Browse files
committed
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: Masahiro Yamada <[email protected]> Acked-by: Nicolas Pitre <[email protected]>
1 parent 1f50b80 commit fbfa9be

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ modules.builtin
8787
#
8888
include/config
8989
include/generated
90+
include/ksym
9091
arch/*/include/generated
9192

9293
# stgit generated dirs

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ endif # CONFIG_MODULES
13361336
# make distclean Remove editor backup files, patch leftover files and the like
13371337

13381338
# Directories & files removed with 'make clean'
1339-
CLEAN_DIRS += $(MODVERDIR)
1339+
CLEAN_DIRS += $(MODVERDIR) include/ksym
13401340

13411341
# Directories & files removed with 'make mrproper'
13421342
MRPROPER_DIRS += include/config usr/include include/generated \

scripts/Kbuild.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ ksym_dep_filter = \
366366
$(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \
367367
boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \
368368
*) echo "Don't know how to preprocess $(1)" >&2; false ;; \
369-
esac | tr ";" "\n" | sed -n 's/^.*=== __KSYM_\(.*\) ===.*$$/KSYM_\1/p'
369+
esac | tr ";" "\n" | sed -n 's/^.*=== __KSYM_\(.*\) ===.*$$/_\1/p'
370370

371371
cmd_and_fixdep = \
372372
$(echo-cmd) $(cmd_$(1)); \

scripts/adjust_autoksyms.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ sort "$cur_ksyms_file" "$new_ksyms_file" | uniq -u |
8080
sed -n 's/^#define __KSYM_\(.*\) 1/\1/p' | tr "A-Z_" "a-z/" |
8181
while read sympath; do
8282
if [ -z "$sympath" ]; then continue; fi
83-
depfile="include/config/ksym/${sympath}.h"
83+
depfile="include/ksym/${sympath}.h"
8484
mkdir -p "$(dirname "$depfile")"
8585
touch "$depfile"
8686
echo $((count += 1))

scripts/basic/fixdep.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ static void usage(void)
113113
/*
114114
* Print out a dependency path from a symbol name
115115
*/
116-
static void print_config(const char *m, int slen)
116+
static void print_dep(const char *m, int slen, const char *dir)
117117
{
118118
int c, i;
119119

120-
printf(" $(wildcard include/config/");
120+
printf(" $(wildcard %s/", dir);
121121
for (i = 0; i < slen; i++) {
122122
c = m[i];
123123
if (c == '_')
@@ -140,7 +140,7 @@ static void do_extra_deps(void)
140140
fprintf(stderr, "fixdep: bad data on stdin\n");
141141
exit(1);
142142
}
143-
print_config(buf, len - 1);
143+
print_dep(buf, len - 1, "include/ksym");
144144
}
145145
}
146146

@@ -208,7 +208,7 @@ static void use_config(const char *m, int slen)
208208
return;
209209

210210
define_config(m, slen, hash);
211-
print_config(m, slen);
211+
print_dep(m, slen, "include/config");
212212
}
213213

214214
/* test if s ends in sub */

0 commit comments

Comments
 (0)