summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2015-05-15 23:04:42 -0700
committerPhilip Chimento <philip@endlessm.com>2015-05-21 13:22:19 -0700
commit6ff70f1a9ae70e3481411d27de7594477fa4d0d2 (patch)
tree66fc9e468023797401193d699e9f513683c596e3 /Makefile.am
parent820994f6f86bbc35c53cddaa7d976d81d4509ff6 (diff)
WebHelper2 for translating WebKit2 views
This adds a new Javascript module, WebHelper2. It's the WebKit2 analogue to WebHelper. It offers a facility for calling gettext() on the contents of DOM elements in your web page. It accomplishes this using an extension module that's loaded into WebKit's web process. [endlessm/eos-sdk#291]
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am35
1 files changed, 34 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 575d6f2..5dc8696 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,6 +46,27 @@ dist-hook::
@false
endif
+# # # SUBSTITUTED FILES # # #
+# These files need to be filled in with make variables
+
+subst = $(SED) \
+ -e 's,%libexecdir%,$(libexecdir),g' \
+ $(NULL)
+
+subst_files = \
+ webhelper/webhelper_private/config.js \
+ $(NULL)
+
+$(subst_files): %: %.in Makefile
+ $(AM_V_GEN)$(MKDIR_P) $(@D) && \
+ rm -f $@ $@.tmp && \
+ $(subst) $< > $@.tmp && \
+ chmod a-w $@.tmp && \
+ mv $@.tmp $@
+
+CLEANFILES += $(subst_files)
+EXTRA_DIST += $(patsubst %,%.in,$(subst_files))
+
# # # LIBRARY # # #
# Main Open Endless SDK library
@@ -64,16 +85,28 @@ DISTCLEANFILES += @EOS_SDK_API_NAME@.pc
# # # WEBHELPER LIBRARY # # #
-webhelper_sources = webhelper/webhelper.js
+webhelper_sources = \
+ webhelper/webhelper.js \
+ webhelper/webhelper2.js \
+ $(NULL)
gjsmodulesdir = $(datadir)/gjs-1.0
webhelperdir = $(gjsmodulesdir)
+webhelper_privatedir = $(webhelperdir)/webhelper_private
dist_webhelper_DATA = \
$(webhelper_sources) \
$(NULL)
+dist_webhelper_private_DATA = webhelper/webhelper_private/config.js
EOS_JS_COVERAGE_FILES = $(webhelper_sources)
+webhelper2extensionsdir = $(libexecdir)/webhelper2
+webhelper2extensions_LTLIBRARIES = wh2extension.la
+wh2extension_la_SOURCES = webhelper/webextensions/wh2extension.c
+wh2extension_la_CPPFLAGS = @WEBHELPER2_EXTENSION_CFLAGS@
+wh2extension_la_LIBADD = @WEBHELPER2_EXTENSION_LIBS@
+wh2extension_la_LDFLAGS = -module -avoid-version -no-undefined
+
# # # INTROSPECTION FILES # # #
-include $(INTROSPECTION_MAKEFILE)