linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: warn user when libxml and/or libgtk2 are not available
@ 2011-03-03  8:57 Florian Fainelli
  2011-03-03 22:52 ` Christopher Li
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2011-03-03  8:57 UTC (permalink / raw)
  To: Christopher Li; +Cc: linux-sparse

From: Florian Fainelli <f.fainelli@gmail.com>

Since sparse's c2xml is not always packaged by modern distributions, it can be
built as a host package in build systems, finding out why c2xml was not
compiled turned out to be easier if a warning was emitted, add two for libxml
and libgtk2 presence/absence.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
diff --git a/Makefile b/Makefile
index 74905df..e9ae26f 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,8 @@ ifeq ($(HAVE_LIBXML),yes)
 PROGRAMS+=c2xml
 INST_PROGRAMS+=c2xml
 c2xml_EXTRA_OBJS = `pkg-config --libs libxml-2.0`
+else
+$(info Your system does not have libxml, disabling c2xml)
 endif

 ifeq ($(HAVE_GTK2),yes)
@@ -55,6 +57,8 @@ INST_PROGRAMS += test-inspect
 test-inspect_EXTRA_DEPS := ast-model.o ast-view.o ast-inspect.o
 test-inspect.o $(test-inspect_EXTRA_DEPS): CFLAGS += $(GTK2_CFLAGS)
 test-inspect_EXTRA_OBJS := $(GTK2_LIBS)
+else
+$(info Your system does not have libgtk2, disabling test-inspect)
 endif

 LIB_H=    token.h parse.h lib.h symbol.h scope.h expression.h target.h \
--

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: warn user when libxml and/or libgtk2 are not available
  2011-03-03  8:57 [PATCH] Makefile: warn user when libxml and/or libgtk2 are not available Florian Fainelli
@ 2011-03-03 22:52 ` Christopher Li
  2011-03-04 10:03   ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Li @ 2011-03-03 22:52 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-sparse

On Thu, Mar 3, 2011 at 12:57 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> From: Florian Fainelli <f.fainelli@gmail.com>
>
> Since sparse's c2xml is not always packaged by modern distributions, it can be
> built as a host package in build systems, finding out why c2xml was not
> compiled turned out to be easier if a warning was emitted, add two for libxml
> and libgtk2 presence/absence.

The change looks good. How about using $(warning ...) instead of $(info ..)?

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: warn user when libxml and/or libgtk2 are not available
  2011-03-03 22:52 ` Christopher Li
@ 2011-03-04 10:03   ` Florian Fainelli
  2011-03-09 14:06     ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2011-03-04 10:03 UTC (permalink / raw)
  To: Christopher Li; +Cc: linux-sparse

On Thursday 03 March 2011 23:52:25 Christopher Li wrote:
> On Thu, Mar 3, 2011 at 12:57 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> > From: Florian Fainelli <f.fainelli@gmail.com>
> > 
> > Since sparse's c2xml is not always packaged by modern distributions, it
> > can be built as a host package in build systems, finding out why c2xml
> > was not compiled turned out to be easier if a warning was emitted, add
> > two for libxml and libgtk2 presence/absence.
> 
> The change looks good. How about using $(warning ...) instead of $(info
> ..)?

Indeed, looks better. Updated patch below:
--
From: Florian Fainelli <f.fainelli@gmail.com>

Since sparse's c2xml is not always packaged my modern distributions, it can be
built as a host package in build systems, finding out why c2xml was not
compiled turned out to be easier if a warning was emitted, add two for libxml
and libgtk2 presence/absence.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Changes since v1:
- use $(warning ..) instead of $(info ..)

diff --git a/Makefile b/Makefile
index 74905df..701cdc9 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,8 @@ ifeq ($(HAVE_LIBXML),yes)
 PROGRAMS+=c2xml
 INST_PROGRAMS+=c2xml
 c2xml_EXTRA_OBJS = `pkg-config --libs libxml-2.0`
+else
+$(warning Your system does not have libxml, disabling c2xml)
 endif

 ifeq ($(HAVE_GTK2),yes)
@@ -55,6 +57,8 @@ INST_PROGRAMS += test-inspect
 test-inspect_EXTRA_DEPS := ast-model.o ast-view.o ast-inspect.o
 test-inspect.o $(test-inspect_EXTRA_DEPS): CFLAGS += $(GTK2_CFLAGS)
 test-inspect_EXTRA_OBJS := $(GTK2_LIBS)
+else
+$(warning Your system does not have libgtk2, disabling test-inspect)
 endif

 LIB_H=    token.h parse.h lib.h symbol.h scope.h expression.h target.h \
--
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: warn user when libxml and/or libgtk2 are not available
  2011-03-04 10:03   ` Florian Fainelli
@ 2011-03-09 14:06     ` Florian Fainelli
  2011-03-09 17:42       ` Christopher Li
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2011-03-09 14:06 UTC (permalink / raw)
  To: Christopher Li; +Cc: linux-sparse

Hello Christopher,

On Friday 04 March 2011 11:03:37 Florian Fainelli wrote:
> On Thursday 03 March 2011 23:52:25 Christopher Li wrote:
> > On Thu, Mar 3, 2011 at 12:57 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> > > From: Florian Fainelli <f.fainelli@gmail.com>
> > > 
> > > Since sparse's c2xml is not always packaged by modern distributions, it
> > > can be built as a host package in build systems, finding out why c2xml
> > > was not compiled turned out to be easier if a warning was emitted, add
> > > two for libxml and libgtk2 presence/absence.
> > 
> > The change looks good. How about using $(warning ...) instead of $(info
> > ..)?
> 
> Indeed, looks better. Updated patch below:
> --
> From: Florian Fainelli <f.fainelli@gmail.com>
> 
> Since sparse's c2xml is not always packaged my modern distributions, it can
> be built as a host package in build systems, finding out why c2xml was not
> compiled turned out to be easier if a warning was emitted, add two for
> libxml and libgtk2 presence/absence.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> Changes since v1:
> - use $(warning ..) instead of $(info ..)
> 
> diff --git a/Makefile b/Makefile
> index 74905df..701cdc9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -45,6 +45,8 @@ ifeq ($(HAVE_LIBXML),yes)
>  PROGRAMS+=c2xml
>  INST_PROGRAMS+=c2xml
>  c2xml_EXTRA_OBJS = `pkg-config --libs libxml-2.0`
> +else
> +$(warning Your system does not have libxml, disabling c2xml)
>  endif
> 
>  ifeq ($(HAVE_GTK2),yes)
> @@ -55,6 +57,8 @@ INST_PROGRAMS += test-inspect
>  test-inspect_EXTRA_DEPS := ast-model.o ast-view.o ast-inspect.o
>  test-inspect.o $(test-inspect_EXTRA_DEPS): CFLAGS += $(GTK2_CFLAGS)
>  test-inspect_EXTRA_OBJS := $(GTK2_LIBS)
> +else
> +$(warning Your system does not have libgtk2, disabling test-inspect)
>  endif
> 
>  LIB_H=    token.h parse.h lib.h symbol.h scope.h expression.h target.h \
> --

Is this version okay with you? Shall I re-submit the patch as a separate email?
-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: warn user when libxml and/or libgtk2 are not available
  2011-03-09 14:06     ` Florian Fainelli
@ 2011-03-09 17:42       ` Christopher Li
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Li @ 2011-03-09 17:42 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-sparse

On Wed, Mar 9, 2011 at 6:06 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> Is this version okay with you? Shall I re-submit the patch as a separate email?

This version is fine. I will apply it today.

Thanks for the patch.

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-09 17:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03  8:57 [PATCH] Makefile: warn user when libxml and/or libgtk2 are not available Florian Fainelli
2011-03-03 22:52 ` Christopher Li
2011-03-04 10:03   ` Florian Fainelli
2011-03-09 14:06     ` Florian Fainelli
2011-03-09 17:42       ` Christopher Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).