diff options
author | Ted Gould <ted@canonical.com> | 2009-10-22 15:06:13 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-22 15:06:13 -0500 |
commit | 20d116ae0d74559cd5f30fe4f1bff08ed6378176 (patch) | |
tree | 0f462df1fa68bf689036afb5b413064a7bfb8a3a /Makefile.am.enum | |
parent | 664bc74b6f0b3eb6ca30539628e2350ed3a2e20c (diff) | |
parent | 72815e195b42b8c4ed94f09af4b86a0d94393e5e (diff) | |
download | ayatana-indicator-application-20d116ae0d74559cd5f30fe4f1bff08ed6378176.tar.gz ayatana-indicator-application-20d116ae0d74559cd5f30fe4f1bff08ed6378176.tar.bz2 ayatana-indicator-application-20d116ae0d74559cd5f30fe4f1bff08ed6378176.zip |
Branch building up the interface for the library.
Diffstat (limited to 'Makefile.am.enum')
-rw-r--r-- | Makefile.am.enum | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Makefile.am.enum b/Makefile.am.enum new file mode 100644 index 0000000..0503de0 --- /dev/null +++ b/Makefile.am.enum @@ -0,0 +1,45 @@ +# Rules for generating enumeration types using glib-mkenums +# +# Define: +# glib_enum_h = header template file +# glib_enum_c = source template file +# glib_enum_headers = list of headers to parse +# +# before including Makefile.am.enums. You will also need to have +# the following targets already defined: +# +# CLEANFILES +# DISTCLEANFILES +# BUILT_SOURCES +# EXTRA_DIST +# +# Author: Emmanuele Bassi <ebassi@linux.intel.com> + +enum_tmpl_h=$(glib_enum_h:.h=.h.in) +enum_tmpl_c=$(glib_enum_c:.c=.c.in) + +CLEANFILES += stamp-enum-types +DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c) +BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c) +EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c) + +stamp-enum-types: $(glib_enum_headers) + $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_h)` + $(QUIET_GEN)$(GLIB_MKENUMS) \ + --template $(srcdir)/$(enum_tmpl_h) \ + $(glib_enum_headers) > xgen-eh \ + && (cmp -s xgen-eh $(builddir)/$(glib_enum_h) || cp -f xgen-eh $(builddir)/$(glib_enum_h)) \ + && rm -f xgen-eh \ + && echo timestamp > $(@F) + +$(glib_enum_h): stamp-enum-types + @true + +$(glib_enum_c): $(glib_enum_h) + $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_c)` + $(QUIET_GEN)$(GLIB_MKENUMS) \ + --template $(srcdir)/$(enum_tmpl_c) \ + $(glib_enum_headers) > xgen-ec \ + && cp -f xgen-ec $(builddir)/$(glib_enum_c) \ + && rm -f xgen-ec + |