[libzapojit] build: Fix enum generation



commit 78af7942a602976f5502d146ee2ccbeae7dc1381
Author: Colin Walters <walters verbum org>
Date:   Fri Aug 16 09:51:39 2013 -0400

    build: Fix enum generation
    
    First, drop the conditional on maintainer mode; we shouldn't rely on
    --enable-maintainer-mode to build the enums from git.
    
    Second, rework the style to fix srcdir != builddir, and avoid weird
    hardcoded tempfile names.  This newer style can be found in the
    gnome-shell git for example.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706137

 src/Makefile.am |   39 +++++++++++++--------------------------
 1 files changed, 13 insertions(+), 26 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 91dd619..cee6cf7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,15 +113,6 @@ CLEANFILES += \
 
 endif
 
-if MAINTAINER_MODE
-
-CLEANFILES += \
-       xgen-etbc \
-       xgen-etbh \
-       xgen-tmc \
-       xgen-tmh \
-       $(NULL)
-
 DISTCLEANFILES = \
        $(libzapojit_0_0_la_built_sources) \
        stamp-zpj-enums.h \
@@ -133,25 +124,21 @@ zpj-enums.h: stamp-zpj-enums.h
 
 stamp-zpj-enums.h: zpj-enums.h.template
        $(AM_V_GEN) ( \
-               cd $(srcdir) \
-               && ( glib-mkenums \
-                       --template zpj-enums.h.template \
-                        zpj-skydrive-entry.h \
-                   ) >> xgen-etbh \
-               && ( cmp -s xgen-etbh zpj-enums.h || cp xgen-etbh zpj-enums.h ) \
-               && rm -f xgen-etbh \
+               glib-mkenums \
+                       --template $< \
+                        $(srcdir)/zpj-skydrive-entry.h \
+                   > $(@F).tmp \
+               && ( cmp -s $(@F).tmp zpj-enums.h || cp $(@F).tmp zpj-enums.h ) \
+               && rm -f $(@F).tmp \
                && echo timestamp > $(@F) \
        )
 
-zpj-enums.c: zpj-enums.c.template
+zpj-enums.c: zpj-enums.c.template stamp-zpj-enums.h
        $(AM_V_GEN) ( \
-               cd $(srcdir) \
-               && ( glib-mkenums \
-                       --template zpj-enums.c.template \
-                        zpj-skydrive-entry.h \
-                   ) >> xgen-etbc \
-               && ( cmp -s xgen-etbc zpj-enums.c || cp xgen-etbc zpj-enums.c ) \
-               && rm -f xgen-etbc \
+               glib-mkenums \
+                       --template $< \
+                        $(srcdir)/zpj-skydrive-entry.h \
+                   >> $(@F).tmp \
+               && ( cmp -s $(@F).tmp zpj-enums.c || cp $(@F).tmp zpj-enums.c ) \
+               && rm -f $(@F).tmp \
        )
-
-endif


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