[gnome-photos] build: Fix $(gnome_photos_built_sources)



commit 09596f34204ad4f8cb970ef021233da5e0a5dbe8
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Apr 30 22:13:59 2012 +0200

    build: Fix $(gnome_photos_built_sources)
    
    Run glib-mkenums & glib-genmarshal only when in MAINTAINER_MODE, and
    generate GTypes for only those enums which are needed.

 src/Makefile.am             |   12 ++++++++++--
 src/photos-enums.c.template |    1 -
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 6ab0400..da3ee54 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -95,6 +95,8 @@ gnome_photos_LDADD = \
 	$(LIBM) \
 	$(NULL)
 
+if MAINTAINER_MODE
+
 CLEANFILES = \
 	xgen-etbc \
 	xgen-etbh \
@@ -115,7 +117,9 @@ stamp-photos-enums.h: photos-enums.h.template
 	$(AM_V_GEN) ( \
 		cd $(srcdir) \
 		&& ( glib-mkenums \
-			--template photos-enums.h.template $(gnome_photos_SOURCES) ) >> xgen-etbh \
+			--template photos-enums.h.template \
+                        photos-mode-controller.h \
+                   ) >> xgen-etbh \
 		&& ( cmp -s xgen-etbh photos-enums.h || cp xgen-etbh photos-enums.h ) \
 		&& rm -f xgen-etbh \
 		&& echo timestamp > $(@F) \
@@ -125,7 +129,9 @@ photos-enums.c: photos-enums.c.template
 	$(AM_V_GEN) ( \
 		cd $(srcdir) \
 		&& ( glib-mkenums \
-			--template photos-enums.c.template $(gnome_photos_SOURCES) ) >> xgen-etbc \
+			--template photos-enums.c.template \
+                        photos-mode-controller.h \
+                   ) >> xgen-etbc \
 		&& ( cmp -s xgen-etbc photos-enums.c || cp xgen-etbc photos-enums.c ) \
 		&& rm -f xgen-etbc \
 	)
@@ -154,3 +160,5 @@ photos-marshalers.c: photos-marshalers.list photos-marshalers.h Makefile
 		&& cp xgen-tmc photos-marshalers.c \
 		&& rm -f xgen-tmc \
 	)
+
+endif
diff --git a/src/photos-enums.c.template b/src/photos-enums.c.template
index a1e9455..cf3c0a7 100644
--- a/src/photos-enums.c.template
+++ b/src/photos-enums.c.template
@@ -2,7 +2,6 @@
 
 #include "config.h"
 
-#include "gd-main-toolbar.h"
 #include "photos-enums.h"
 #include "photos-mode-controller.h"
 



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