~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to build/autotools/Makefile.am.enums

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 += $(srcdir)/$(enum_tmpl_h) $(srcdir)/$(enum_tmpl_c)
 
25
 
 
26
stamp-enum-types: $(glib_enum_headers) $(srcdir)/$(enum_tmpl_h)
 
27
        $(QUIET_GEN)$(GLIB_MKENUMS) \
 
28
                --template $(srcdir)/$(enum_tmpl_h) \
 
29
        $(glib_enum_headers) > xgen-eh \
 
30
        && (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
 
31
        && rm -f xgen-eh \
 
32
        && echo timestamp > $(@F)
 
33
 
 
34
$(glib_enum_h): stamp-enum-types
 
35
        @true
 
36
 
 
37
$(glib_enum_c): $(glib_enum_h) $(srcdir)/$(enum_tmpl_c)
 
38
        $(QUIET_GEN)$(GLIB_MKENUMS) \
 
39
                --template $(srcdir)/$(enum_tmpl_c) \
 
40
        $(glib_enum_headers) > xgen-ec \
 
41
        && cp -f xgen-ec $(glib_enum_c) \
 
42
        && rm -f xgen-ec
 
43