aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-14 17:12:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-14 17:12:18 -0400
commit45e3e1935e2857c54783291107d33323b3ef33c8 (patch)
tree26a6e3228b52d0f96f6e56e5879ca898fe909592 /scripts
parentcf5046323ea254be72535648a9d090b18b8510f3 (diff)
parent3f8d9ced7746f3f329ccca0bb3f3c7a2c15c47bb (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits) .gitignore: ignore *.lzma files kbuild: add generic --set-str option to scripts/config kbuild: simplify argument loop in scripts/config kbuild: handle non-existing options in scripts/config kallsyms: generalize text region handling kallsyms: support kernel symbols in Blackfin on-chip memory documentation: make version fix kbuild: fix a compile warning gitignore: Add GNU GLOBAL files to top .gitignore kbuild: fix delay in setlocalversion on readonly source README: fix misleading pointer to the defconf directory vmlinux.lds.h update kernel-doc: cleanup perl script Improve vmlinux.lds.h support for arch specific linker scripts kbuild: fix headers_exports with boolean expression kbuild/headers_check: refine extern check kbuild: fix "Argument list too long" error for "make headers_check", ignore *.patch files Remove bashisms from scripts menu: fix embedded menu presentation ...
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.headersinst8
-rw-r--r--scripts/basic/docproc.c13
-rw-r--r--scripts/basic/fixdep.c5
-rwxr-xr-xscripts/config87
-rw-r--r--scripts/gcc-version.sh2
-rwxr-xr-xscripts/headers.sh7
-rw-r--r--scripts/headers_check.pl14
-rw-r--r--scripts/kallsyms.c76
-rw-r--r--scripts/kconfig/.gitignore3
-rw-r--r--scripts/kconfig/Makefile4
-rw-r--r--scripts/kconfig/conf.c7
-rw-r--r--scripts/kconfig/confdata.c20
-rw-r--r--scripts/kconfig/lkc.h1
-rw-r--r--scripts/kconfig/lxdialog/checklist.c3
-rw-r--r--scripts/kconfig/mconf.c10
-rw-r--r--scripts/kconfig/qconf.cc48
-rw-r--r--scripts/kconfig/util.c6
-rwxr-xr-xscripts/kernel-doc174
-rw-r--r--scripts/mod/modpost.c50
-rw-r--r--scripts/package/builddeb149
-rwxr-xr-xscripts/setlocalversion6
-rw-r--r--scripts/unifdef.c48
-rwxr-xr-xscripts/ver_linux2
23 files changed, 462 insertions, 281 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 095cfc8b9dbf..0fcd83838771 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -54,8 +54,12 @@ quiet_cmd_remove = REMOVE $(unwanted)
54 cmd_remove = rm -f $(unwanted-file) 54 cmd_remove = rm -f $(unwanted-file)
55 55
56quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) 56quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files)
57 cmd_check = $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH) \ 57# Headers list can be pretty long, xargs helps to avoid
58 $(addprefix $(install)/, $(all-files)); \ 58# the "Argument list too long" error.
59 cmd_check = for f in $(all-files); do \
60 echo "$(install)/$${f}"; done \
61 | xargs \
62 $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \
59 touch $@ 63 touch $@
60 64
61PHONY += __headersinst __headerscheck 65PHONY += __headersinst __headerscheck
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index 35bdc68b6e66..4c9523ef9c00 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -69,7 +69,7 @@ FILELINE * docsection;
69#define NOFUNCTION "-nofunction" 69#define NOFUNCTION "-nofunction"
70#define NODOCSECTIONS "-no-doc-sections" 70#define NODOCSECTIONS "-no-doc-sections"
71 71
72char *srctree; 72static char *srctree, *kernsrctree;
73 73
74void usage (void) 74void usage (void)
75{ 75{
@@ -77,7 +77,8 @@ void usage (void)
77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); 77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
78 fprintf(stderr, "doc: frontend when generating kernel documentation\n"); 78 fprintf(stderr, "doc: frontend when generating kernel documentation\n");
79 fprintf(stderr, "depend: generate list of files referenced within file\n"); 79 fprintf(stderr, "depend: generate list of files referenced within file\n");
80 fprintf(stderr, "Environment variable SRCTREE: absolute path to kernel source tree.\n"); 80 fprintf(stderr, "Environment variable SRCTREE: absolute path to sources.\n");
81 fprintf(stderr, " KBUILD_SRC: absolute path to kernel source tree.\n");
81} 82}
82 83
83/* 84/*
@@ -96,8 +97,8 @@ void exec_kernel_doc(char **svec)
96 exit(1); 97 exit(1);
97 case 0: 98 case 0:
98 memset(real_filename, 0, sizeof(real_filename)); 99 memset(real_filename, 0, sizeof(real_filename));
99 strncat(real_filename, srctree, PATH_MAX); 100 strncat(real_filename, kernsrctree, PATH_MAX);
100 strncat(real_filename, KERNELDOCPATH KERNELDOC, 101 strncat(real_filename, "/" KERNELDOCPATH KERNELDOC,
101 PATH_MAX - strlen(real_filename)); 102 PATH_MAX - strlen(real_filename));
102 execvp(real_filename, svec); 103 execvp(real_filename, svec);
103 fprintf(stderr, "exec "); 104 fprintf(stderr, "exec ");
@@ -178,6 +179,7 @@ void find_export_symbols(char * filename)
178 char real_filename[PATH_MAX + 1]; 179 char real_filename[PATH_MAX + 1];
179 memset(real_filename, 0, sizeof(real_filename)); 180 memset(real_filename, 0, sizeof(real_filename));
180 strncat(real_filename, srctree, PATH_MAX); 181 strncat(real_filename, srctree, PATH_MAX);
182 strncat(real_filename, "/", PATH_MAX - strlen(real_filename));
181 strncat(real_filename, filename, 183 strncat(real_filename, filename,
182 PATH_MAX - strlen(real_filename)); 184 PATH_MAX - strlen(real_filename));
183 sym = add_new_file(filename); 185 sym = add_new_file(filename);
@@ -382,6 +384,9 @@ int main(int argc, char *argv[])
382 srctree = getenv("SRCTREE"); 384 srctree = getenv("SRCTREE");
383 if (!srctree) 385 if (!srctree)
384 srctree = getcwd(NULL, 0); 386 srctree = getcwd(NULL, 0);
387 kernsrctree = getenv("KBUILD_SRC");
388 if (!kernsrctree)
389 kernsrctree = srctree;
385 if (argc != 3) { 390 if (argc != 3) {
386 usage(); 391 usage();
387 exit(1); 392 exit(1);
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 8912c0f5460b..72c15205bb2b 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -373,10 +373,11 @@ void print_deps(void)
373void traps(void) 373void traps(void)
374{ 374{
375 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; 375 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
376 int *p = (int *)test;
376 377
377 if (*(int *)test != INT_CONF) { 378 if (*p != INT_CONF) {
378 fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n", 379 fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
379 *(int *)test); 380 *p);
380 exit(2); 381 exit(2);
381 } 382 }
382} 383}
diff --git a/scripts/config b/scripts/config
index db6084b78a10..608d7fdb13e8 100755
--- a/scripts/config
+++ b/scripts/config
@@ -9,8 +9,10 @@ config options command ...
9commands: 9commands:
10 --enable|-e option Enable option 10 --enable|-e option Enable option
11 --disable|-d option Disable option 11 --disable|-d option Disable option
12 --module|-m option Turn option into a module 12 --module|-m option Turn option into a module
13 --state|-s option Print state of option (n,y,m,undef) 13 --set-str option value
14 Set option to "value"
15 --state|-s option Print state of option (n,y,m,undef)
14 16
15 --enable-after|-E beforeopt option 17 --enable-after|-E beforeopt option
16 Enable option directly after other option 18 Enable option directly after other option
@@ -26,8 +28,6 @@ options:
26 28
27config doesn't check the validity of the .config file. This is done at next 29config doesn't check the validity of the .config file. This is done at next
28 make time. 30 make time.
29The options need to be already in the file before they can be changed,
30but sometimes you can cheat with the --*-after options.
31EOL 31EOL
32 exit 1 32 exit 1
33} 33}
@@ -45,8 +45,18 @@ checkarg() {
45 ARG="`echo $ARG | tr a-z A-Z`" 45 ARG="`echo $ARG | tr a-z A-Z`"
46} 46}
47 47
48replace() { 48set_var() {
49 sed -i -e "$@" $FN 49 local name=$1 new=$2 before=$3
50
51 name_re="^($name=|# $name is not set)"
52 before_re="^($before=|# $before is not set)"
53 if test -n "$before" && grep -Eq "$before_re" "$FN"; then
54 sed -ri "/$before_re/a $new" "$FN"
55 elif grep -Eq "$name_re" "$FN"; then
56 sed -ri "s:$name_re.*:$new:" "$FN"
57 else
58 echo "$new" >>"$FN"
59 fi
50} 60}
51 61
52if [ "$1" = "--file" ]; then 62if [ "$1" = "--file" ]; then
@@ -54,8 +64,7 @@ if [ "$1" = "--file" ]; then
54 if [ "$FN" = "" ] ; then 64 if [ "$FN" = "" ] ; then
55 usage 65 usage
56 fi 66 fi
57 shift 67 shift 2