summaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorManojkiran Eda <manojkiran.eda@gmail.com>2018-09-27 13:19:20 +0530
committerWilliam A. Kennington III <wak@google.com>2018-10-16 21:36:38 +0000
commitad7e686b5563a146728aa9477f6e814dc0a3cbd4 (patch)
treeffbc88c439d604848284a08292692a6fac97cc82 /example
parentb20866d311e15098cfdd523cc9df9df9972abd0b (diff)
downloadsdbusplus-ad7e686b5563a146728aa9477f6e814dc0a3cbd4.tar.gz
sdbusplus-ad7e686b5563a146728aa9477f6e814dc0a3cbd4.zip
Avoid build failure when sdbus++ tool is disabled
Few examples provided as a part of the repository are dependent on the sdbus++ code generation tool, and the compilation will fail trying to build the examples even in cases where the user disables sdbusapp during configuration using --disable-sdbuspp option. - Made a change in example/Makefile.am to build the examples which are dependent on sdbus++ tool(which is dependent on few python packages) only when the sdbuspp is enabled during configuration. Resolves openbmc/sdbusplus#19 Change-Id: I1453536fd4c7df35e66f2ccfe7a890cced0d155d Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Diffstat (limited to 'example')
-rw-r--r--example/Makefile.am13
1 files changed, 8 insertions, 5 deletions
diff --git a/example/Makefile.am b/example/Makefile.am
index c62fcf9..6d43c4a 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -1,4 +1,8 @@
-noinst_PROGRAMS = calculator-server list-users
+noinst_PROGRAMS = list-users
+
+list_users_SOURCES = list-users.cpp
+list_users_CXXFLAGS = $(SYSTEMD_CFLAGS) -I$(top_srcdir)
+list_users_LDADD = $(SYSTEMD_LIBS) ../libsdbusplus.la
if BOOST
noinst_PROGRAMS += asio-example
@@ -23,6 +27,8 @@ asio_example_LDFLAGS = \
$(BOOST_LDFLAGS)
endif
+if WANT_SDBUSPP
+noinst_PROGRAMS += calculator-server
calculator_server_generated_files = \
net/poettering/Calculator/server.hpp \
net/poettering/Calculator/server.cpp \
@@ -37,10 +43,6 @@ calculator_server_SOURCES = \
calculator_server_CXXFLAGS = $(SYSTEMD_CFLAGS) -I$(top_srcdir)
calculator_server_LDADD = $(SYSTEMD_LIBS) ../libsdbusplus.la
-list_users_SOURCES = list-users.cpp
-list_users_CXXFLAGS = $(SYSTEMD_CFLAGS) -I$(top_srcdir)
-list_users_LDADD = $(SYSTEMD_LIBS) ../libsdbusplus.la
-
BUILT_SOURCES = \
$(calculator_server_generated_files) \
$(calculator_markdown_generated_files)
@@ -80,3 +82,4 @@ calculator.md:
@top_srcdir@/tools/sdbus++ \
-r $(srcdir) -t $(top_builddir)/tools/sdbusplus/templates \
error markdown net.poettering.Calculator >> $@
+endif
OpenPOWER on IntegriCloud