summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac14
-rw-r--r--src/Makefile.am36
2 files changed, 49 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 06946b2..45af31b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1975,7 +1975,19 @@ AC_ARG_ENABLE([wayland],
1975 [want_wayland="no"]) 1975 [want_wayland="no"])
1976 1976
1977if test "${want_wayland}" = "yes"; then 1977if test "${want_wayland}" = "yes"; then
1978 EFL_PKG_CHECK_STRICT([wayland-client >= 1.11.0]) 1978 EFL_PKG_CHECK_STRICT([wayland-client >= 1.11.0 wayland-scanner >= 1.11.0])
1979 PKG_CHECK_MODULES([WAYLAND], [wayland-scanner >= 1.11.0],
1980 [
1981 AC_ARG_VAR([wayland_scanner], [The wayland-scanner executable])
1982 AC_PATH_PROG([wayland_scanner], [wayland-scanner])
1983 if test x$wayland_scanner = x; then
1984 PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
1985 wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
1986 fi
1987 AM_CONDITIONAL([HAVE_WAYLAND_SCANNER], [test x$wayland_scanner != x])
1988 ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
1989 AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
1990 ])
1979fi 1991fi
1980 1992
1981# Wayland IVI-Shell 1993# Wayland IVI-Shell
diff --git a/src/Makefile.am b/src/Makefile.am
index b29bfda..4c92039 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -192,3 +192,39 @@ install-exec-hook:
192 mv $$FNAMEEXT $$FNAME; \ 192 mv $$FNAMEEXT $$FNAME; \
193 done 193 done
194 $(EFL_INSTALL_EXEC_HOOK) 194 $(EFL_INSTALL_EXEC_HOOK)
195
196#At the bottom because .SECONDEXPANSION is applied to all following rules.
197if HAVE_WAYLAND_SCANNER
198#Stolen from weston's Makefile.am and modified for Enlightenment
199.SECONDEXPANSION:
200
201define protostability
202$(if $(findstring unstable,$1),unstable,stable)
203endef
204
205define protoname
206$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
207endef
208
209#rules for generating protocol from wayland_protocols
210%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
211 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
212
213%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
214 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
215
216%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
217 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
218
219#rules for generating local protocols which must be in src/wayland_protocol
220%-protocol.c : $(top_srcdir)/src/wayland_protocol/$(notdir $$*).xml
221 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
222
223%-server-protocol.h : $(top_srcdir)/src/wayland_protocol/$(notdir $$*).xml
224 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
225
226%-client-protocol.h : $(top_srcdir)/src/wayland_protocol/$(notdir $$*).xml
227 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
228
229#End of weston stuff
230endif