diff options
author | Tollef Fog Heen <tfheen@err.no> | 2005-10-16 17:31:41 +0000 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2005-10-16 17:31:41 +0000 |
commit | ec5f06d60f5e7dd4b9bf42ccae298d3e42b7ef18 (patch) | |
tree | 6c263afd4e0eddbf3013c8dd2044a7133c379f1e | |
parent | 7f9c9a4ff0eca8d704dac4b93cbf641c7c5636ed (diff) | |
download | pkg-config-ec5f06d60f5e7dd4b9bf42ccae298d3e42b7ef18.tar.gz |
Add --short-errors
2005-10-16 Tollef Fog Heen <tfheen@err.no>
* pkg.c (get_package_quiet): Add get_package_quiet which is just
the same as get_package except it sets warn to false.
* pkg.h: Add prototype for get_package_quiet.
* main.c (main): Add --short-errors flag to suppress most of the
output when a module is not found.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | main.c | 8 | ||||
-rw-r--r-- | pkg.c | 6 | ||||
-rw-r--r-- | pkg.h | 1 |
4 files changed, 24 insertions, 1 deletions
@@ -1,3 +1,13 @@ +2005-10-16 Tollef Fog Heen <tfheen@err.no> + + * pkg.c (get_package_quiet): Add get_package_quiet which is just + the same as get_package except it sets warn to false. + + * pkg.h: Add prototype for get_package_quiet. + + * main.c (main): Add --short-errors flag to suppress most of the + output when a module is not found. + 2005-10-01 Tollef Fog Heen <tfheen@err.no> * pkg.c (packages_get_var): Don't try to chop if string length is @@ -183,6 +183,7 @@ main (int argc, char **argv) int want_other_cflags = 0; int want_list = 0; int want_static_lib_list = ENABLE_INDIRECT_DEPS; + int want_short_errors = 0; int result; int want_uninstalled = 0; char *variable_name = NULL; @@ -218,6 +219,8 @@ main (int argc, char **argv) "output all linker flags" }, { "static", 0, POPT_ARG_NONE, &want_static_lib_list, 0, "output linker flags for static linking" }, + { "short-errors", 0, POPT_ARG_NONE, &want_short_errors, 0, + "print short errors" }, { "libs-only-l", 0, POPT_ARG_NONE, &want_l_libs, 0, "output -l flags" }, { "libs-only-other", 0, POPT_ARG_NONE, &want_other_libs, 0, @@ -469,7 +472,10 @@ main (int argc, char **argv) Package *req; RequiredVersion *ver = iter->data; - req = get_package (ver->name); + if (want_short_errors) + req = get_package_quiet (ver->name); + else + req = get_package (ver->name); if (req == NULL) { @@ -387,6 +387,12 @@ get_package (const char *name) return internal_get_package (name, TRUE, TRUE); } +Package * +get_package_quiet (const char *name) +{ + return internal_get_package (name, FALSE, TRUE); +} + static GSList* string_list_strip_duplicates (GSList *list) { @@ -78,6 +78,7 @@ struct _Package }; Package *get_package (const char *name); +Package *get_package_quiet (const char *name); char * package_get_l_libs (Package *pkg); char * packages_get_l_libs (GSList *pkgs); char * package_get_L_libs (Package *pkg); |