summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/Makefile.am
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-09-16 23:54:37 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-09-16 23:54:37 +0000
commit136d4776ec3f6877cbfce53cdaa9917be5530fe7 (patch)
tree589ad8f2882a5f7819b0da58d1f8469477de8585 /gdk-pixbuf/Makefile.am
parent165e1833b19f0426a5f0820de0198e57864c0cd1 (diff)
downloadgdk-pixbuf-136d4776ec3f6877cbfce53cdaa9917be5530fe7.tar.gz
add generated files to ignore list.
2001-09-16 James Henstridge <james@daa.com.au> * .cvsignore: add generated files to ignore list. * gdk-pixbuf.h: include gdk-pixbuf-enum-types.h * Makefile.am: add rules to build gdk-pixbuf-enum-types.[ch]
Diffstat (limited to 'gdk-pixbuf/Makefile.am')
-rw-r--r--gdk-pixbuf/Makefile.am44
1 files changed, 42 insertions, 2 deletions
diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
index 554a1ab4a..fad339547 100644
--- a/gdk-pixbuf/Makefile.am
+++ b/gdk-pixbuf/Makefile.am
@@ -212,6 +212,11 @@ man_MANS = gdk-pixbuf-csource.1
#
+gdk_pixbuf_built_headers = gdk-pixbuf-enum-types.h
+gdk_pixbuf_built_cfiles = gdk-pixbuf-enum-types.c
+
+$(OBJECTS): $(gdk_pixbuf_built_headers)
+
libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf
libgdk_pixbuf_1_3_la_SOURCES = @STRIP_BEGIN@ \
@@ -224,6 +229,7 @@ libgdk_pixbuf_1_3_la_SOURCES = @STRIP_BEGIN@ \
gdk-pixbuf-scale.c \
gdk-pixbuf-util.c \
gdk-pixdata.c \
+ $(gdk_pixbuf_built_cfiles) \
@STRIP_END@
@@ -237,16 +243,50 @@ libgdk_pixbuf_1_3_la_LDFLAGS = @STRIP_BEGIN@ \
libgdk_pixbuf_1_3_la_LIBADD = pixops/libpixops.la $(builtin_objs) $(GDK_PIXBUF_DEP_LIBS)
libgdk_pixbuf_1_3_la_DEPENDENCIES = $(builtin_objs)
-libgdk_pixbufinclude_HEADERS = \
+gdk_pixbuf_headers = \
gdk-pixbuf.h \
gdk-pixbuf-loader.h \
- gdk-pixbuf-features.h \
+ gdk-pixbuf-features.h
+
+libgdk_pixbufinclude_HEADERS = \
+ $(gdk_pixbuf_headers) \
+ $(gdk_pixbuf_built_headers) \
gdk-pixdata.h
noinst_HEADERS = \
gdk-pixbuf-io.h \
gdk-pixbuf-private.h
+gdk-pixbuf-enum-types.h: s-enum-types-h
+ @true
+
+s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile
+ ( cd $(srcdir) && glib-mkenums \
+ --fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
+ $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \
+ && (cmp -s tmp-gdk-pixbuf-enum-types.h $(srcdir)/gdk-pixbuf-enum-types.h || cp tmp-gdk-pixbuf-enum-types.h $(srcdir)/gdk-pixbuf-enum-types.h ) \
+ && rm -f tmp-gdk-pixbuf-enum-types.h \
+ && echo timestamp > $(@F)
+
+gdk-pixbuf-enum-types.c: s-enum-types-c
+ @true
+
+s-enum-types-c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
+ ( cd $(srcdir) && glib-mkenums \
+ --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const GEnumValue values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_enum_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.c \
+ && (cmp -s tmp-gdk-pixbuf-enum-types.c $(srcdir)/gdk-pixbuf-enum-types.c || cp tmp-gdk-pixbuf-enum-types.c $(srcdir)/gdk-pixbuf-enum-types.c ) \
+ && rm -f tmp-gdk-pixbuf-enum-types.c \
+ && echo timestamp > $(@F)
+
+
EXTRA_DIST = \
gdk-pixbuf-csource.1 \
makefile.mingw \