mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-04 08:20:26 +01:00
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.
This commit is contained in:
parent
7f9c9a4ff0
commit
ec5f06d60f
4 changed files with 24 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -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
|
||||
|
|
|
|||
8
main.c
8
main.c
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
6
pkg.c
6
pkg.c
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
1
pkg.h
1
pkg.h
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue