[epiphany] Run gdbus-codegen only once during build



commit 112dec4f750e83a6884eba26a9efb12ac5611c0a
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Sep 18 12:46:23 2016 -0500

    Run gdbus-codegen only once during build
    
    Currently we run gdbus-codegen twice in a row, the second time stomping
    on the output generated the first time. This is harmless, but it's dumb.
    Fix it.
    
    https://www.gnu.org/software/automake/manual/automake.html#Multiple-Outputs

 src/search-provider/Makefile.am |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/search-provider/Makefile.am b/src/search-provider/Makefile.am
index 0fd96ee..139b92b 100644
--- a/src/search-provider/Makefile.am
+++ b/src/search-provider/Makefile.am
@@ -1,4 +1,8 @@
 BUILT_SOURCES = \
+       ephy-shell-search-provider-generated.stamp      \
+       $(dbus_shell_search_provider_built_sources)
+
+dbus_shell_search_provider_built_sources =     \
        ephy-shell-search-provider-generated.c  \
        ephy-shell-search-provider-generated.h
 
@@ -7,10 +11,10 @@ dist_noinst_DATA = org.gnome.ShellSearchProvider2.xml
 libexec_PROGRAMS = epiphany-search-provider
 
 epiphany_search_provider_SOURCES = \
-       ephy-search-provider.h          \
-       ephy-search-provider.c          \
-       ephy-search-provider-main.c     \
-       $(BUILT_SOURCES)
+       ephy-search-provider.h                          \
+       ephy-search-provider.c                          \
+       ephy-search-provider-main.c                     \
+       $(dbus_shell_search_provider_built_sources)
 
 epiphany_search_provider_CFLAGS = \
        $(WARN_CFLAGS)
@@ -47,16 +51,15 @@ epiphany_search_provider_LDFLAGS = \
        -dlopen self    \
        $(WARN_LDFLAGS)
 
-# FIXME: Use a stamp file or something so it doesn't get run twice
-#        https://www.gnu.org/software/automake/manual/automake.html#Multiple-Outputs
 # The upstream for the DBus interface definition is
 # at http://git.gnome.org/browse/gnome-shell/plain/data/org.gnome.ShellSearchProvider2.xml
-$(BUILT_SOURCES) : Makefile.am $(srcdir)/org.gnome.ShellSearchProvider2.xml
+ephy-shell-search-provider-generated.stamp : Makefile.am $(srcdir)/org.gnome.ShellSearchProvider2.xml
        $(AM_V_GEN) gdbus-codegen                                                       \
                --interface-prefix org.gnome.                           \
                --c-namespace Ephy                                      \
                --generate-c-code ephy-shell-search-provider-generated  \
                $(srcdir)/org.gnome.ShellSearchProvider2.xml
+       touch ephy-shell-search-provider-generated.stamp > /dev/null
 
 CLEANFILES = $(BUILT_SOURCES)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]