diff options
author | DJ Delorie <dj@redhat.com> | 1999-05-25 12:10:27 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 1999-05-25 12:10:27 +0000 |
commit | 751d21b5b946a4a451552fbac692b14abea3d816 (patch) | |
tree | 887e572d520d2e46474c184e520db5d07c0c261b /binutils/windres.c | |
parent | fa0e42e45712133c4c2d95261c3c0ac8d87b6765 (diff) | |
download | gdb-751d21b5b946a4a451552fbac692b14abea3d816.zip gdb-751d21b5b946a4a451552fbac692b14abea3d816.tar.gz gdb-751d21b5b946a4a451552fbac692b14abea3d816.tar.bz2 |
* windres.c: add verbose option
(main): process verbose option
* resrc.c (look_for_default): new. Look for the default
preprocessor in a given location.
(read_rc_file): for foo/bar-windres, look for foo/bar-gcc,
foo/gcc (in case of foo/windres), and then gcc (the old default).
Diffstat (limited to 'binutils/windres.c')
-rw-r--r-- | binutils/windres.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/binutils/windres.c b/binutils/windres.c index 885cd51..990db90 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -46,6 +46,10 @@ #include <ctype.h> #include <time.h> +/* used by resrc.c at least */ + +int verbose = 0; + /* An enumeration of format types. */ enum res_format @@ -122,6 +126,7 @@ static const struct option long_options[] = {"output-format", required_argument, 0, 'O'}, {"preprocessor", required_argument, 0, OPTION_PREPROCESSOR}, {"target", required_argument, 0, 'F'}, + {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, OPTION_VERSION}, {"yydebug", no_argument, 0, OPTION_YYDEBUG}, {0, no_argument, 0, 0} @@ -705,7 +710,9 @@ Options:\n\ -F TARGET, --target TARGET Specify COFF target\n\ --preprocessor PROGRAM Program to use to preprocess rc file\n\ --include-dir DIR Include directory when preprocessing rc file\n\ - --define SYM[=VAL] Define SYM when preprocessing rc file\n\ + -DSYM[=VAL], --define SYM[=VAL]\n\ + Define SYM when preprocessing rc file\n\ + -v Verbose - tells you what it's doing\n\n --language VAL Set language when reading rc file\n")); #ifdef YYDEBUG fprintf (stream, _("\ @@ -794,7 +801,7 @@ main (argc, argv) preprocargs = NULL; language = -1; - while ((c = getopt_long (argc, argv, "i:o:I:O:F:D:", long_options, + while ((c = getopt_long (argc, argv, "i:o:I:O:F:D:v", long_options, (int *) 0)) != EOF) { switch (c) @@ -843,6 +850,10 @@ main (argc, argv) } break; + case 'v': + verbose ++; + break; + case OPTION_INCLUDE_DIR: if (preprocargs == NULL) { |