diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-12-27 15:51:59 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-01-02 14:43:22 -0500 |
commit | 7826005e5a53645d7aab7c13eda76126eadebf0b (patch) | |
tree | 26d19c6a188ed91f4d1db57f82b5a7cba2bedafe /scripts/kconfig/zconf.l | |
parent | cf82607a904d3b2ed3d66f8799f00d1099c1849c (diff) |
kconfig: improve error messages for bad source statements
We now say where we detect the second source of a file,
and where we detect a recursively source of the same file.
This makes it easier to fix such errors.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Diffstat (limited to 'scripts/kconfig/zconf.l')
-rw-r--r-- | scripts/kconfig/zconf.l | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 5164ef7ce499..21ff69c9ad4e 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -314,11 +314,14 @@ void zconf_nextfile(const char *name) | |||
314 | current_buf = buf; | 314 | current_buf = buf; |
315 | 315 | ||
316 | if (file->flags & FILE_BUSY) { | 316 | if (file->flags & FILE_BUSY) { |
317 | printf("recursive scan (%s)?\n", name); | 317 | printf("%s:%d: do not source '%s' from itself\n", |
318 | zconf_curname(), zconf_lineno(), name); | ||
318 | exit(1); | 319 | exit(1); |
319 | } | 320 | } |
320 | if (file->flags & FILE_SCANNED) { | 321 | if (file->flags & FILE_SCANNED) { |
321 | printf("file %s already scanned?\n", name); | 322 | printf("%s:%d: file '%s' is already sourced from '%s'\n", |
323 | zconf_curname(), zconf_lineno(), name, | ||
324 | file->parent->name); | ||
322 | exit(1); | 325 | exit(1); |
323 | } | 326 | } |
324 | file->flags |= FILE_BUSY; | 327 | file->flags |= FILE_BUSY; |