~ubuntu-desktop/libappindicator/ubuntu

2.2.5 by Emmanuele Bassi
Stealing these makefile segments to build enums and marshallers
1
# Rules for generating enumeration types using glib-mkenums
2
#
3
# Define:
4
# 	glib_enum_h = header template file
5
# 	glib_enum_c = source template file
6
# 	glib_enum_headers = list of headers to parse
7
#
8
# before including Makefile.am.enums. You will also need to have
9
# the following targets already defined:
10
#
11
# 	CLEANFILES
12
#	DISTCLEANFILES
13
#	BUILT_SOURCES
14
#	EXTRA_DIST
15
#
16
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
17
18
enum_tmpl_h=$(glib_enum_h:.h=.h.in)
19
enum_tmpl_c=$(glib_enum_c:.c=.c.in)
20
21
CLEANFILES += stamp-enum-types
22
DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
23
BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
24
EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c)
25
26
stamp-enum-types: $(glib_enum_headers)
2.2.14 by Ted Gould
Adding the possibility of making the directories silently.
27
	$(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_h)`
2.2.5 by Emmanuele Bassi
Stealing these makefile segments to build enums and marshallers
28
	$(QUIET_GEN)$(GLIB_MKENUMS) \
2.2.13 by Ted Gould
Some small changes to make 'distcheck' happy.
29
		--template $(srcdir)/$(enum_tmpl_h) \
2.2.5 by Emmanuele Bassi
Stealing these makefile segments to build enums and marshallers
30
	$(glib_enum_headers) > xgen-eh \
2.2.13 by Ted Gould
Some small changes to make 'distcheck' happy.
31
	&& (cmp -s xgen-eh $(builddir)/$(glib_enum_h) || cp -f xgen-eh $(builddir)/$(glib_enum_h)) \
2.2.5 by Emmanuele Bassi
Stealing these makefile segments to build enums and marshallers
32
	&& rm -f xgen-eh \
33
	&& echo timestamp > $(@F)
34
35
$(glib_enum_h): stamp-enum-types
36
	@true
37
38
$(glib_enum_c): $(glib_enum_h)
2.2.14 by Ted Gould
Adding the possibility of making the directories silently.
39
	$(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_c)`
2.2.5 by Emmanuele Bassi
Stealing these makefile segments to build enums and marshallers
40
	$(QUIET_GEN)$(GLIB_MKENUMS) \
2.2.13 by Ted Gould
Some small changes to make 'distcheck' happy.
41
		--template $(srcdir)/$(enum_tmpl_c) \
2.2.5 by Emmanuele Bassi
Stealing these makefile segments to build enums and marshallers
42
	$(glib_enum_headers) > xgen-ec \
2.2.13 by Ted Gould
Some small changes to make 'distcheck' happy.
43
	&& cp -f xgen-ec $(builddir)/$(glib_enum_c) \
2.2.5 by Emmanuele Bassi
Stealing these makefile segments to build enums and marshallers
44
	&& rm -f xgen-ec
45