~elementary-os/elementaryos/os-patch-mutter-bionic

« back to all changes in this revision

Viewing changes to clutter/clutter/Makefile.am.marshal

  • Committer: RabbitBot
  • Date: 2018-04-11 14:49:36 UTC
  • Revision ID: rabbitbot@elementary.io-20180411144936-hgymqa9d8d1xfpbh
Initial import, version 3.28.0-2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Rules for generating marshal files using glib-genmarshal
 
2
#
 
3
# Define:
 
4
#       glib_marshal_list = marshal list file
 
5
#       glib_marshal_prefix = prefix for marshal functions
 
6
#
 
7
# before including Makefile.am.marshal. You will also need to have
 
8
# the following targets already defined:
 
9
#
 
10
#       CLEANFILES
 
11
#       DISTCLEANFILES
 
12
#       BUILT_SOURCES
 
13
#       EXTRA_DIST
 
14
#
 
15
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
 
16
 
 
17
# Basic sanity checks
 
18
$(if $(GLIB_GENMARSHAL),,$(error Need to define GLIB_GENMARSHAL))
 
19
 
 
20
$(if $(or $(glib_marshal_list), \
 
21
          $(glib_marshal_prefix)),, \
 
22
    $(error Need to define glib_marshal_list and glib_marshal_prefix))
 
23
 
 
24
marshal_h = $(glib_marshal_list:.list=.h)
 
25
marshal_c = $(glib_marshal_list:.list=.c)
 
26
marshal_list = $(addprefix $(srcdir)/, $(glib_marshal_list))
 
27
 
 
28
CLEANFILES += stamp-marshal
 
29
DISTCLEANFILES += $(marshal_h) $(marshal_c)
 
30
BUILT_SOURCES += $(marshal_h) $(marshal_c)
 
31
EXTRA_DIST += $(marshal_list)
 
32
 
 
33
stamp-marshal: $(marshal_list)
 
34
        $(AM_V_GEN)$(GLIB_GENMARSHAL) \
 
35
                --prefix=$(glib_marshal_prefix) \
 
36
                --header \
 
37
                --valist-marshallers \
 
38
        $(marshal_list) > xgen-mh \
 
39
        && (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
 
40
        && rm -f xgen-mh \
 
41
        && echo timestamp > $(@F)
 
42
 
 
43
$(marshal_h): stamp-marshal
 
44
        @true
 
45
 
 
46
$(marshal_c): $(marshal_h)
 
47
        $(AM_V_GEN)$(GLIB_GENMARSHAL) \
 
48
                --prefix=$(glib_marshal_prefix) \
 
49
                --body \
 
50
                --valist-marshallers \
 
51
                --prototypes \
 
52
        $(marshal_list) > xgen-mc \
 
53
        && (cmp -s xgen-mc $(marshal_c) || cp -f xgen-mc $(marshal_c)) \
 
54
        && rm -f xgen-mc