File: Makefile.am.marshal

package info (click to toggle)
ayatana-indicator-application 0.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 572 kB
  • sloc: ansic: 2,155; makefile: 168; xml: 75; sh: 14
file content (45 lines) | stat: -rw-r--r-- 1,182 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Rules for generating marshal files using glib-genmarshal
#
# Define:
# 	glib_marshal_list = marshal list file
# 	glib_marshal_prefix = prefix for marshal functions
#
# before including Makefile.am.marshal. You will also need to have
# the following targets already defined:
#
# 	CLEANFILES
#	DISTCLEANFILES
#	BUILT_SOURCES
#	EXTRA_DIST
#
# Author: Emmanuele Bassi <ebassi@linux.intel.com>

marshal_h = $(glib_marshal_list:.list=.h)
marshal_c = $(glib_marshal_list:.list=.c)

CLEANFILES += stamp-marshal
DISTCLEANFILES += $(marshal_h) $(marshal_c)
BUILT_SOURCES += $(marshal_h) $(marshal_c)
EXTRA_DIST += $(glib_marshal_list)

stamp-marshal: $(glib_marshal_list)
	$(QUIET_GEN)$(GLIB_GENMARSHAL) \
		--prefix=$(glib_marshal_prefix) \
		--header \
	$(srcdir)/$(glib_marshal_list) > xgen-mh \
	&& (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
	&& rm -f xgen-mh \
	&& echo timestamp > $(@F)

$(marshal_h): stamp-marshal
	@true

$(marshal_c): $(marshal_h)
	$(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \
	$(GLIB_GENMARSHAL) \
		--prefix=$(glib_marshal_prefix) \
		--body \
	$(srcdir)/$(glib_marshal_list)) > xgen-mc \
	&& cp xgen-mc $(marshal_c) \
	&& rm -f xgen-mc