diff options
author | NIIBE Yutaka <[email protected]> | 2023-07-28 00:16:16 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-07-28 00:16:16 +0000 |
commit | ab8b4d58035f4d3093b1df7c25c227e15b673f42 (patch) | |
tree | bfac963133e7f13c4a0145693b1828b00ea5ac21 | |
parent | build: Apply libtool.patch at the last stage of configure. (diff) | |
download | libgpg-error-ab8b4d58035f4d3093b1df7c25c227e15b673f42.tar.gz libgpg-error-ab8b4d58035f4d3093b1df7c25c227e15b673f42.zip |
build: Support --verbose option for mkheader.
* src/mkheader.c (include_file): Only emit the notification when
invoked with --verbose.
(main): Add --verbose handling.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | src/mkheader.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mkheader.c b/src/mkheader.c index cc0eaa3..2d7298c 100644 --- a/src/mkheader.c +++ b/src/mkheader.c @@ -28,6 +28,7 @@ static char *srcdir; static const char *hdr_version; static const char *hdr_version_number; static int cross_building; /* Command line flag. */ +static int verbose; /* Values take from the supplied config.h. */ static int have_stdint_h; @@ -427,7 +428,7 @@ include_file (const char *fname, int lnr, const char *name, void (*outf)(char*)) exit (1); } - if (repl_flag) + if (repl_flag && verbose) fprintf (stderr,"%s:%d: note: including '%s'\n", fname, lnr, incfname); @@ -648,6 +649,12 @@ main (int argc, char **argv) cross_building = 1; argc--; argv++; } + if (!strcmp (*argv, "--verbose")) + { + verbose = 1; + argc--; argv++; + } + if (argc == 1) { @@ -660,10 +667,14 @@ main (int argc, char **argv) ; /* Standard operation. */ else { - fputs ("usage: " PGM + fputs ("usage: " PGM " [options]" " host_triplet template.h config.h version version_number\n" - " " PGM - " host_triplet\n", + " " PGM " [options]" + " host_triplet\n" + "\n" + "Options:\n" + " --cross Specify cross building\n" + " --verbose Show what is going on\n", stderr); return 1; } |