diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 17:12:18 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 17:12:18 -0400 |
| commit | 45e3e1935e2857c54783291107d33323b3ef33c8 (patch) | |
| tree | 26a6e3228b52d0f96f6e56e5879ca898fe909592 /scripts | |
| parent | cf5046323ea254be72535648a9d090b18b8510f3 (diff) | |
| parent | 3f8d9ced7746f3f329ccca0bb3f3c7a2c15c47bb (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.headersinst | 8 | ||||
| -rw-r--r-- | scripts/basic/docproc.c | 13 | ||||
| -rw-r--r-- | scripts/basic/fixdep.c | 5 | ||||
| -rwxr-xr-x | scripts/config | 87 | ||||
| -rw-r--r-- | scripts/gcc-version.sh | 2 | ||||
| -rwxr-xr-x | scripts/headers.sh | 7 | ||||
| -rw-r--r-- | scripts/headers_check.pl | 14 | ||||
| -rw-r--r-- | scripts/kallsyms.c | 76 | ||||
| -rw-r--r-- | scripts/kconfig/.gitignore | 3 | ||||
| -rw-r--r-- | scripts/kconfig/Makefile | 4 | ||||
| -rw-r--r-- | scripts/kconfig/conf.c | 7 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 20 | ||||
| -rw-r--r-- | scripts/kconfig/lkc.h | 1 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/checklist.c | 3 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 10 | ||||
| -rw-r--r-- | scripts/kconfig/qconf.cc | 48 | ||||
| -rw-r--r-- | scripts/kconfig/util.c | 6 | ||||
| -rwxr-xr-x | scripts/kernel-doc | 174 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 50 | ||||
| -rw-r--r-- | scripts/package/builddeb | 149 | ||||
| -rwxr-xr-x | scripts/setlocalversion | 6 | ||||
| -rw-r--r-- | scripts/unifdef.c | 48 | ||||
| -rwxr-xr-x | scripts/ver_linux | 2 |
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 | ||
| 56 | quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) | 56 | quiet_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 | ||
| 61 | PHONY += __headersinst __headerscheck | 65 | PHONY += __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 | ||
| 72 | char *srctree; | 72 | static char *srctree, *kernsrctree; |
| 73 | 73 | ||
| 74 | void usage (void) | 74 | void 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) | |||
| 373 | void traps(void) | 373 | void 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 ... | |||
| 9 | commands: | 9 | commands: |
| 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 | ||
| 27 | config doesn't check the validity of the .config file. This is done at next | 29 | config doesn't check the validity of the .config file. This is done at next |
| 28 | make time. | 30 | make time. |
| 29 | The options need to be already in the file before they can be changed, | ||
| 30 | but sometimes you can cheat with the --*-after options. | ||
| 31 | EOL | 31 | EOL |
| 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 | ||
| 48 | replace() { | 48 | set_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 | ||
| 52 | if [ "$1" = "--file" ]; then | 62 | if [ "$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 |
