summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2016-10-13 18:54:08 -0700
committerEmmanuele Bassi <ebassi@gnome.org>2017-03-02 18:02:43 +0000
commit9a4e45d2814afb68f16c0c03e48193779acb54f1 (patch)
tree33e7f26c4b98e59715a7c6f3209e2e890ac58f11 /Makefile.am
parent0e38a855c4ad0ac59e7ab5d166ab448911a47e0f (diff)
Add configure option to disable webhelper
We don't want to build the WebHelper code in the new Endless SDK, as it still strings along deprecated WebKitGtk dependencies, and nothing that uses the SDK also uses it. Based on commit 40c7e4342439dc3db19d3592b7599ff33e744cac. https://phabricator.endlessm.com/T15749
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 707f883..e5e3a3c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,6 +38,8 @@ DISTCLEANFILES =
# Other targets to add to
lib_LTLIBRARIES =
+EOS_JS_COVERAGE_FILES =
+
# Make sure that 'make dist' includes documentation
if CAN_MAKE_DIST
dist-hook::
@@ -57,9 +59,12 @@ subst = $(SED) \
-e 's,%libexecdir%,$(libexecdir),g' \
$(NULL)
-subst_files = \
+subst_files =
+if ENABLE_WEBHELPER
+subst_files += \
webhelper/webhelper_private/config.js \
$(NULL)
+endif ENABLE_WEBHELPER
$(subst_files): %: %.in Makefile
$(AM_V_GEN)$(MKDIR_P) $(@D) && \
@@ -89,6 +94,8 @@ DISTCLEANFILES += @EOS_SDK_API_NAME@.pc
# # # WEBHELPER LIBRARY # # #
+if ENABLE_WEBHELPER
+
webhelper_sources = \
webhelper/webhelper.js \
webhelper/webhelper2.js \
@@ -104,7 +111,7 @@ dist_webhelper_private_DATA = \
webhelper/webhelper_private/config.js \
$(NULL)
-EOS_JS_COVERAGE_FILES = $(webhelper_sources)
+EOS_JS_COVERAGE_FILES += $(webhelper_sources)
## Workaround for https://bugs.webkit.org/show_bug.cgi?id=116672
## When that is solved, we can eliminate this private library and go back to
@@ -129,6 +136,8 @@ wh2extension_la_CPPFLAGS = @WEBHELPER2_EXTENSION_CFLAGS@
wh2extension_la_LIBADD = @WEBHELPER2_EXTENSION_LIBS@
wh2extension_la_LDFLAGS = -module -avoid-version -no-undefined
+endif ENABLE_WEBHELPER
+
# # # INTROSPECTION FILES # # #
-include $(INTROSPECTION_MAKEFILE)
@@ -155,6 +164,8 @@ Endless_@EOS_SDK_API_VERSION@_gir_FILES = $(introspection_sources)
Endless_@EOS_SDK_API_VERSION@_gir_EXPORT_PACKAGES = @EOS_SDK_API_NAME@
INTROSPECTION_GIRS += Endless-@EOS_SDK_API_VERSION@.gir
+if ENABLE_WEBHELPER
+
WebHelper2Private-1.0.gir: libwebhelper2private.la
WebHelper2Private_1_0_gir_INCLUDES = GObject-2.0 GLib-2.0 WebKit2-4.0
WebHelper2Private_1_0_gir_SCANNERFLAGS = \
@@ -165,6 +176,8 @@ WebHelper2Private_1_0_gir_LIBS = libwebhelper2private.la
WebHelper2Private_1_0_gir_FILES = $(libwebhelper2private_la_SOURCES)
INTROSPECTION_GIRS += WebHelper2Private-1.0.gir
+endif ENABLE_WEBHELPER
+
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
@@ -349,7 +362,9 @@ nobase_dist_licenses_DATA = licenses/creativecommons/C/CC-BY-2.0.html \
# # # PURE JAVASCRIPT MODULE DOCUMENTATION # # #
+if ENABLE_WEBHELPER
include $(top_srcdir)/docs/reference/webhelper/Makefile.am.inc
+endif ENABLE_WEBHELPER
# # # GJS OVERRIDES # # #
@@ -379,7 +394,10 @@ EOS_COVERAGE_BLACKLIST_PATTERNS = "*test/endless*"
AM_JS_LOG_FLAGS += @EOS_JS_COVERAGE_LOG_FLAGS@
AM_CFLAGS += @EOS_C_COVERAGE_CFLAGS@
AM_LDFLAGS = @EOS_C_COVERAGE_LDFLAGS@
+
+if ENABLE_WEBHELPER
libwebhelper2private_la_LDFLAGS += @EOS_C_COVERAGE_LDFLAGS@
wh2extension_la_LDFLAGS += @EOS_C_COVERAGE_LDFLAGS@
+endif ENABLE_WEBHELPER
clean-local:: clean-coverage