aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/Makefile16
-rw-r--r--scripts/kconfig/kxgettext.c16
-rw-r--r--scripts/mod/file2alias.c19
3 files changed, 44 insertions, 7 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 09abb891d11f..2fcb244a9e18 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -27,8 +27,20 @@ update-po-config: $(obj)/kxgettext
27 xgettext --default-domain=linux \ 27 xgettext --default-domain=linux \
28 --add-comments --keyword=_ --keyword=N_ \ 28 --add-comments --keyword=_ --keyword=N_ \
29 --files-from=scripts/kconfig/POTFILES.in \ 29 --files-from=scripts/kconfig/POTFILES.in \
30 -o scripts/kconfig/linux.pot 30 --output scripts/kconfig/config.pot
31 scripts/kconfig/kxgettext arch/$(ARCH)/Kconfig >> scripts/kconfig/linux.pot 31 $(Q)ln -fs Kconfig_i386 arch/um/Kconfig_arch
32 $(Q)for i in `ls arch/`; \
33 do \
34 scripts/kconfig/kxgettext arch/$$i/Kconfig \
35 | msguniq -o scripts/kconfig/linux_$${i}.pot; \
36 done
37 $(Q)msgcat scripts/kconfig/config.pot \
38 `find scripts/kconfig/ -type f -name linux_*.pot` \
39 --output scripts/kconfig/linux_raw.pot
40 $(Q)msguniq --sort-by-file scripts/kconfig/linux_raw.pot \
41 --output scripts/kconfig/linux.pot
42 $(Q)rm -f arch/um/Kconfig_arch
43 $(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot
32 44
33.PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig 45.PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
34 46
diff --git a/scripts/kconfig/kxgettext.c b/scripts/kconfig/kxgettext.c
index 1c88d7c6d5a7..abee55ca6174 100644
--- a/scripts/kconfig/kxgettext.c
+++ b/scripts/kconfig/kxgettext.c
@@ -14,6 +14,11 @@ static char *escape(const char* text, char *bf, int len)
14{ 14{
15 char *bfp = bf; 15 char *bfp = bf;
16 int multiline = strchr(text, '\n') != NULL; 16 int multiline = strchr(text, '\n') != NULL;
17 int eol = 0;
18 int textlen = strlen(text);
19
20 if ((textlen > 0) && (text[textlen-1] == '\n'))
21 eol = 1;
17 22
18 *bfp++ = '"'; 23 *bfp++ = '"';
19 --len; 24 --len;
@@ -43,7 +48,7 @@ next:
43 --len; 48 --len;
44 } 49 }
45 50
46 if (multiline) 51 if (multiline && eol)
47 bfp -= 3; 52 bfp -= 3;
48 53
49 *bfp++ = '"'; 54 *bfp++ = '"';
@@ -179,7 +184,11 @@ static void message__print_file_lineno(struct message *self)
179{ 184{
180 struct file_line *fl = self->files; 185 struct file_line *fl = self->files;
181 186
182 printf("\n#: %s:%d", fl->file, fl->lineno); 187 putchar('\n');
188 if (self->option != NULL)
189 printf("# %s:00000\n", self->option);
190
191 printf("#: %s:%d", fl->file, fl->lineno);
183 fl = fl->next; 192 fl = fl->next;
184 193
185 while (fl != NULL) { 194 while (fl != NULL) {
@@ -187,9 +196,6 @@ static void message__print_file_lineno(struct message *self)
187 fl = fl->next; 196 fl = fl->next;
188 } 197 }
189 198
190 if (self->option != NULL)
191 printf(", %s:00000", self->option);
192
193 putchar('\n'); 199 putchar('\n');
194} 200}
195 201
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 5180405c1a84..d8ee38aede26 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -341,6 +341,22 @@ static int do_of_entry (const char *filename, struct of_device_id *of, char *ali
341 return 1; 341 return 1;
342} 342}
343 343
344static int do_vio_entry(const char *filename, struct vio_device_id *vio,
345 char *alias)
346{
347 char *tmp;
348
349 sprintf(alias, "vio:T%sS%s", vio->type[0] ? vio->type : "*",
350 vio->compat[0] ? vio->compat : "*");
351
352 /* Replace all whitespace with underscores */
353 for (tmp = alias; tmp && *tmp; tmp++)
354 if (isspace (*tmp))
355 *tmp = '_';
356
357 return 1;
358}
359
344/* Ignore any prefix, eg. v850 prepends _ */ 360/* Ignore any prefix, eg. v850 prepends _ */
345static inline int sym_is(const char *symbol, const char *name) 361static inline int sym_is(const char *symbol, const char *name)
346{ 362{
@@ -422,6 +438,9 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
422 else if (sym_is(symname, "__mod_of_device_table")) 438 else if (sym_is(symname, "__mod_of_device_table"))
423 do_table(symval, sym->st_size, sizeof(struct of_device_id), 439 do_table(symval, sym->st_size, sizeof(struct of_device_id),
424 do_of_entry, mod); 440 do_of_entry, mod);
441 else if (sym_is(symname, "__mod_vio_device_table"))
442 do_table(symval, sym->st_size, sizeof(struct vio_device_id),
443 do_vio_entry, mod);
425 444
426} 445}
427 446