Makefile: warn user when libxml and/or libgtk2 are not available
Subsystems (2)
PATCH 1/1 Makefile: warn user when libxml and/or libgtk2 are not available
From: Florian Fainelli <[email protected]>
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.
---
Makefile +4 -0
@@ -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 \
--
Christopher Li
maintainerQuoted 6 lines · Florian Fainelli
From: Florian Fainelli <[email protected]>
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
Quoted 10 lines · On Thursday 03 March 2011 23:52:25 Christopher Li wrote:
Quoted 6 lines · Florian Fainelli
From: Florian Fainelli <[email protected]>
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 <[email protected]>
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.
---
Changes since v1:
- use $(warning ..) instead of $(info ..)
Makefile +4 -0
@@ -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
Hello Christopher,
Quoted 40 lines · On Friday 04 March 2011 11:03:37 Florian Fainelli wrote:
Quoted 10 lines · On Thursday 03 March 2011 23:52:25 Christopher Li wrote:
Quoted 6 lines · Florian Fainelli
From: Florian Fainelli <[email protected]>
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 <[email protected]>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 <[email protected]>---
Changes since v1:
- use $(warning ..) instead of $(info ..)Makefile +2
-0@@ -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)
Makefile INST_PROGRAMS += test-inspect
Quoted 9 lines
Makefile +2
-1@@ -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?
Signature · 1 line
Florian
Christopher Li
maintainerQuoted 2 lines · Florian Fainelli
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