diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:21:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:21:33 -0500 |
commit | ab396e91bfe953db26fa1083d9c3e7a4fbe0334a (patch) | |
tree | 81db9e5f919b84dcb4284ca8cdf675e13716c191 /scripts | |
parent | 9979ead5d1eb23191a00453559927c5abf9087e2 (diff) | |
parent | 4f0210b9c4889eede9f8f379f93570c01998ccb9 (diff) |
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Fix up some trivial conflicts in {i386|ia64}/Makefile
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 13 | ||||
-rw-r--r-- | scripts/Makefile.build | 4 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/Makefile | 48 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/check-lxdialog.sh | 67 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 2 | ||||
-rw-r--r-- | scripts/reference_discarded.pl | 6 | ||||
-rw-r--r-- | scripts/setlocalversion | 2 |
7 files changed, 98 insertions, 44 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index db3c708e546b..0168d6c37075 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | # Convinient variables | 4 | # Convinient variables |
5 | comma := , | 5 | comma := , |
6 | squote := ' | ||
6 | empty := | 7 | empty := |
7 | space := $(empty) $(empty) | 8 | space := $(empty) $(empty) |
8 | 9 | ||
@@ -12,6 +13,10 @@ space := $(empty) $(empty) | |||
12 | depfile = $(subst $(comma),_,$(@D)/.$(@F).d) | 13 | depfile = $(subst $(comma),_,$(@D)/.$(@F).d) |
13 | 14 | ||
14 | ### | 15 | ### |
16 | # Escape single quote for use in echo statements | ||
17 | escsq = $(subst $(squote),'\$(squote)',$1) | ||
18 | |||
19 | ### | ||
15 | # filechk is used to check if the content of a generated file is updated. | 20 | # filechk is used to check if the content of a generated file is updated. |
16 | # Sample usage: | 21 | # Sample usage: |
17 | # define filechk_sample | 22 | # define filechk_sample |
@@ -47,7 +52,7 @@ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj | |||
47 | 52 | ||
48 | # If quiet is set, only print short version of command | 53 | # If quiet is set, only print short version of command |
49 | cmd = @$(if $($(quiet)cmd_$(1)),\ | 54 | cmd = @$(if $($(quiet)cmd_$(1)),\ |
50 | echo ' $(subst ','\'',$($(quiet)cmd_$(1)))' &&) $(cmd_$(1)) | 55 | echo ' $(call escsq,$($(quiet)cmd_$(1)))' &&) $(cmd_$(1)) |
51 | 56 | ||
52 | # Add $(obj)/ for paths that is not absolute | 57 | # Add $(obj)/ for paths that is not absolute |
53 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) | 58 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) |
@@ -68,7 +73,7 @@ endif | |||
68 | 73 | ||
69 | # echo command. Short version is $(quiet) equals quiet, otherwise full command | 74 | # echo command. Short version is $(quiet) equals quiet, otherwise full command |
70 | echo-cmd = $(if $($(quiet)cmd_$(1)), \ | 75 | echo-cmd = $(if $($(quiet)cmd_$(1)), \ |
71 | echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';) | 76 | echo ' $(call escsq,$($(quiet)cmd_$(1)))';) |
72 | 77 | ||
73 | # function to only execute the passed command if necessary | 78 | # function to only execute the passed command if necessary |
74 | # >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file | 79 | # >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file |
@@ -78,7 +83,7 @@ if_changed = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ | |||
78 | @set -e; \ | 83 | @set -e; \ |
79 | $(echo-cmd) \ | 84 | $(echo-cmd) \ |
80 | $(cmd_$(1)); \ | 85 | $(cmd_$(1)); \ |
81 | echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd) | 86 | echo 'cmd_$@ := $(subst $$,$$$$,$(call escsq,$(cmd_$(1))))' > $(@D)/.$(@F).cmd) |
82 | 87 | ||
83 | # execute the command and also postprocess generated .d dependencies | 88 | # execute the command and also postprocess generated .d dependencies |
84 | # file | 89 | # file |
@@ -87,7 +92,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ | |||
87 | @set -e; \ | 92 | @set -e; \ |
88 | $(echo-cmd) \ | 93 | $(echo-cmd) \ |
89 | $(cmd_$(1)); \ | 94 | $(cmd_$(1)); \ |
90 | scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \ | 95 | scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \ |
91 | rm -f $(depfile); \ | 96 | rm -f $(depfile); \ |
92 | mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) | 97 | mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) |
93 | 98 | ||
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 506e3f3befe3..c33e62bde6b0 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -179,10 +179,10 @@ endif | |||
179 | define rule_cc_o_c | 179 | define rule_cc_o_c |
180 | $(if $($(quiet)cmd_checksrc),echo ' $($(quiet)cmd_checksrc)';) \ | 180 | $(if $($(quiet)cmd_checksrc),echo ' $($(quiet)cmd_checksrc)';) \ |
181 | $(cmd_checksrc) \ | 181 | $(cmd_checksrc) \ |
182 | $(if $($(quiet)cmd_cc_o_c),echo ' $(subst ','\'',$($(quiet)cmd_cc_o_c))';) \ | 182 | $(if $($(quiet)cmd_cc_o_c),echo ' $(call escsq,$($(quiet)cmd_cc_o_c))';) \ |
183 | $(cmd_cc_o_c); \ | 183 | $(cmd_cc_o_c); \ |
184 | $(cmd_modversions) \ | 184 | $(cmd_modversions) \ |
185 | scripts/basic/fixdep $(depfile) $@ '$(subst ','\'',$(cmd_cc_o_c))' > $(@D)/.$(@F).tmp; \ | 185 | scripts/basic/fixdep $(depfile) $@ '$(call escsq,$(cmd_cc_o_c))' > $(@D)/.$(@F).tmp; \ |
186 | rm -f $(depfile); \ | 186 | rm -f $(depfile); \ |
187 | mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd | 187 | mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd |
188 | endef | 188 | endef |
diff --git a/scripts/kconfig/lxdialog/Makefile b/scripts/kconfig/lxdialog/Makefile index a45a13fb26ed..8f41d9a57aaa 100644 --- a/scripts/kconfig/lxdialog/Makefile +++ b/scripts/kconfig/lxdialog/Makefile | |||
@@ -1,42 +1,18 @@ | |||
1 | HOST_EXTRACFLAGS := -DLOCALE | 1 | # Makefile to build lxdialog package |
2 | ifeq ($(shell uname),SunOS) | 2 | # |
3 | HOST_LOADLIBES := -lcurses | ||
4 | else | ||
5 | HOST_LOADLIBES := -lncurses | ||
6 | endif | ||
7 | 3 | ||
8 | ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) | 4 | check-lxdialog := $(srctree)/$(src)/check-lxdialog.sh |
9 | HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" | 5 | HOST_EXTRACFLAGS := $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) |
10 | else | 6 | HOST_LOADLIBES := $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags) |
11 | ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) | 7 | |
12 | HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" | 8 | HOST_EXTRACFLAGS += -DLOCALE |
13 | else | 9 | |
14 | ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) | 10 | .PHONY: dochecklxdialog |
15 | HOST_EXTRACFLAGS += -DCURSES_LOC="<ncurses.h>" | 11 | $(obj)/dochecklxdialog: |
16 | else | 12 | $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES) |
17 | HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>" | ||
18 | endif | ||
19 | endif | ||
20 | endif | ||
21 | 13 | ||
22 | hostprogs-y := lxdialog | 14 | hostprogs-y := lxdialog |
23 | always := ncurses $(hostprogs-y) | 15 | always := $(hostprogs-y) dochecklxdialog |
24 | 16 | ||
25 | lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ | 17 | lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ |
26 | util.o lxdialog.o msgbox.o | 18 | util.o lxdialog.o msgbox.o |
27 | |||
28 | .PHONY: $(obj)/ncurses | ||
29 | $(obj)/ncurses: | ||
30 | @echo "main() {}" > lxtemp.c | ||
31 | @if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \ | ||
32 | rm -f lxtemp.c a.out; \ | ||
33 | else \ | ||
34 | rm -f lxtemp.c; \ | ||
35 | echo -e "\007" ;\ | ||
36 | echo ">> Unable to find the Ncurses libraries." ;\ | ||
37 | echo ">>" ;\ | ||
38 | echo ">> You must install ncurses-devel in order" ;\ | ||
39 | echo ">> to use 'make menuconfig'" ;\ | ||
40 | echo ;\ | ||
41 | exit 1 ;\ | ||
42 | fi | ||
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh new file mode 100644 index 000000000000..a3c141b49670 --- /dev/null +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh | |||
@@ -0,0 +1,67 @@ | |||
1 | #!/bin/sh | ||
2 | # Check ncurses compatibility | ||
3 | |||
4 | # What library to link | ||
5 | ldflags() | ||
6 | { | ||
7 | if [ `uname` == SunOS ]; then | ||
8 | echo '-lcurses' | ||
9 | else | ||
10 | echo '-lncurses' | ||
11 | fi | ||
12 | } | ||
13 | |||
14 | # Where is ncurses.h? | ||
15 | ccflags() | ||
16 | { | ||
17 | if [ -f /usr/include/ncurses/ncurses.h ]; then | ||
18 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' | ||
19 | elif [ -f /usr/include/ncurses/curses.h ]; then | ||
20 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' | ||
21 | elif [ -f /usr/include/ncurses.h ]; then | ||
22 | echo '-DCURSES_LOC="<ncurses.h>"' | ||
23 | else | ||
24 | echo '-DCURSES_LOC="<curses.h>"' | ||
25 | fi | ||
26 | } | ||
27 | |||
28 | compiler="" | ||
29 | # Check if we can link to ncurses | ||
30 | check() { | ||
31 | echo "main() {}" | $compiler -xc - | ||
32 | if [ $? != 0 ]; then | ||
33 | echo " *** Unable to find the ncurses libraries." 1>&2 | ||
34 | echo " *** make menuconfig require the ncurses libraries" 1>&2 | ||
35 | echo " *** " 1>&2 | ||
36 | echo " *** Install ncurses (ncurses-devel) and try again" 1>&2 | ||
37 | echo " *** " 1>&2 | ||
38 | exit 1 | ||
39 | fi | ||
40 | } | ||
41 | |||
42 | usage() { | ||
43 | printf "Usage: $0 [-check compiler options|-header|-library]\n" | ||
44 | } | ||
45 | |||
46 | if [ $# == 0 ]; then | ||
47 | usage | ||
48 | exit 1 | ||
49 | fi | ||
50 | |||
51 | case "$1" in | ||
52 | "-check") | ||
53 | shift | ||
54 | compiler="$@" | ||
55 | check | ||
56 | ;; | ||
57 | "-ccflags") | ||
58 | ccflags | ||
59 | ;; | ||
60 | "-ldflags") | ||
61 | ldflags | ||
62 | ;; | ||
63 | "*") | ||
64 | usage | ||
65 | exit 1 | ||
66 | ;; | ||
67 | esac | ||
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index e0eedffe565b..be97caf664bb 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -417,7 +417,7 @@ static int do_input_entry(const char *filename, struct input_device_id *id, | |||
417 | do_input(alias, id->sndbit, 0, SND_MAX); | 417 | do_input(alias, id->sndbit, 0, SND_MAX); |
418 | sprintf(alias + strlen(alias), "f*"); | 418 | sprintf(alias + strlen(alias), "f*"); |
419 | if (id->flags&INPUT_DEVICE_ID_MATCH_FFBIT) | 419 | if (id->flags&INPUT_DEVICE_ID_MATCH_FFBIT) |
420 | do_input(alias, id->ffbit, 0, SND_MAX); | 420 | do_input(alias, id->ffbit, 0, FF_MAX); |
421 | sprintf(alias + strlen(alias), "w*"); | 421 | sprintf(alias + strlen(alias), "w*"); |
422 | if (id->flags&INPUT_DEVICE_ID_MATCH_SWBIT) | 422 | if (id->flags&INPUT_DEVICE_ID_MATCH_SWBIT) |
423 | do_input(alias, id->swbit, 0, SW_MAX); | 423 | do_input(alias, id->swbit, 0, SW_MAX); |
diff --git a/scripts/reference_discarded.pl b/scripts/reference_discarded.pl index c2d54148a91f..4ee6ab2135b3 100644 --- a/scripts/reference_discarded.pl +++ b/scripts/reference_discarded.pl | |||
@@ -71,6 +71,11 @@ foreach $object (keys(%object)) { | |||
71 | # printf("ignoring %d conglomerate(s)\n", $ignore); | 71 | # printf("ignoring %d conglomerate(s)\n", $ignore); |
72 | 72 | ||
73 | # printf("Scanning objects\n"); | 73 | # printf("Scanning objects\n"); |
74 | |||
75 | # Keith Ownes <kaos@sgi.com> commented: | ||
76 | # For our future {in}sanity, add a comment that this is the ppc .opd | ||
77 | # section, not the ia64 .opd section. | ||
78 | # ia64 .opd should not point to discarded sections. | ||
74 | $errorcount = 0; | 79 | $errorcount = 0; |
75 | foreach $object (keys(%object)) { | 80 | foreach $object (keys(%object)) { |
76 | my $from; | 81 | my $from; |
@@ -88,6 +93,7 @@ foreach $object (keys(%object)) { | |||
88 | ($from !~ /\.text\.exit$/ && | 93 | ($from !~ /\.text\.exit$/ && |
89 | $from !~ /\.exit\.text$/ && | 94 | $from !~ /\.exit\.text$/ && |
90 | $from !~ /\.data\.exit$/ && | 95 | $from !~ /\.data\.exit$/ && |
96 | $from !~ /\.opd$/ && | ||
91 | $from !~ /\.exit\.data$/ && | 97 | $from !~ /\.exit\.data$/ && |
92 | $from !~ /\.altinstructions$/ && | 98 | $from !~ /\.altinstructions$/ && |
93 | $from !~ /\.pdr$/ && | 99 | $from !~ /\.pdr$/ && |
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index f54dac88cfd1..9a23825218f2 100644 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion | |||
@@ -17,6 +17,6 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then | |||
17 | 17 | ||
18 | # Are there uncommitted changes? | 18 | # Are there uncommitted changes? |
19 | if git diff-files | read dummy; then | 19 | if git diff-files | read dummy; then |
20 | printf '%s' -git_dirty | 20 | printf '%s' -dirty |
21 | fi | 21 | fi |
22 | fi | 22 | fi |