derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=b7d37e9d517398a369e6ecd2b60ccb638b3d3464
commit b7d37e9d517398a369e6ecd2b60ccb638b3d3464 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 23 15:11:40 2016 -0500 Add the capability to auto-generate protocol code and headers We'd like to drop all the generated files and keep just the xml files. This is a step in that direction but we've been naming things irregularly and some of our checked in generated code doesn't have an associated xml yet, so this'll be a bit of a process. --- src/bin/Makefile.mk | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk index d39ef15..c2500bb 100644 --- a/src/bin/Makefile.mk +++ b/src/bin/Makefile.mk @@ -228,6 +228,8 @@ src/bin/e_comp_wl_input.h \ src/bin/e_comp_wl.h endif +enlightenment_gen_src = +MAINTAINERCLEANFILES += $(enlightenment_gen_src) enlightenment_src = \ src/bin/e_about.c \ @@ -394,6 +396,36 @@ src/bin/e_xsettings.c endif if HAVE_WAYLAND +#Stolen from weston's Makefile.am and modified for Enlightenment +.SECONDEXPANSION: + +define protostability +$(if $(findstring unstable,$1),unstable,stable) +endef + +define protoname +$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/') +endef + +%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@ + +%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@ + +%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ + +%-protocol.c : $(top_srcdir)/src/protocol/$(notdir $$*).xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@ + +%-server-protocol.h : $(top_srcdir)/src/protocol/$(notdir $$*).xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@ + +%-client-protocol.h : $(top_srcdir)/src/protocol/$(notdir $$*).xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ +#End of weston stuff + enlightenment_src += \ src/bin/generated/linux-dmabuf-unstable-v1-server-protocol.h \ src/bin/generated/linux-dmabuf-unstable-v1-protocol.c \ @@ -408,6 +440,9 @@ src/bin/e_comp_wl_input.c \ src/bin/e_comp_wl_dmabuf.c \ src/bin/e_comp_wl.c \ src/bin/e_comp_wl_extensions.c + +enlightenment_gen_src += + endif src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ @@ -415,6 +450,8 @@ src_bin_enlightenment_SOURCES = \ src/bin/e_main.c \ $(enlightenment_src) +nodist_src_bin_enlightenment_SOURCES = $(enlightenment_gen_src) + src_bin_enlightenment_LDFLAGS = -export-dynamic src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ @WL_DRM_LIBS@ @WAYLAND_EGL_LIBS@ -lm @SHM_OPEN_LIBS@ @ECORE_X_LIBS@ --