~xubuntu-dev/libxfce4util/maverick

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# $Id$

INCLUDES =								\
	-I$(top_srcdir)							\
	-DDEFAULT_XDG_CACHE_HOME=\"~/.cache\"				\
	-DDEFAULT_XDG_DATA_HOME=\"~/.local/share\"			\
	-DDEFAULT_XDG_CONFIG_HOME=\"~/.config\"				\
	-DDEFAULT_XDG_DATA_DIRS=\"$(datadir):/usr/local/share:/usr/share\" \
	-DDEFAULT_XDG_CONFIG_DIRS=\"$(sysconfdir)/xdg:$(sysconfdir)/xfce4:/etc/xdg\" \
	-DDATADIR=\"$(datadir)\"					\
	-DSYSCONFDIR=\"$(sysconfdir)\"					\
	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
	-DG_LOG_DOMAIN=\"libxfce4util\"					\
	-DKIOSKDIR=\"$(sysconfdir)/xdg/xfce4/kiosk\"			\
	-DKIOSKDEF=\"ALL\"						\
	-DLIBXFCE4UTIL_COMPILATION

lib_LTLIBRARIES =							\
	libxfce4util.la

libxfce4util_headers =							\
	debug.h								\
	i18n.h								\
	utf8.h								\
	util.h								\
	xfce-desktopentry.h						\
	xfce-fileutils.h						\
	xfce-generics.h							\
	xfce-i18n.h							\
	xfce-kiosk.h							\
	xfce-license.h							\
	xfce-miscutils.h						\
	xfce-posix-signal-handler.h					\
	xfce-rc.h							\
	xfce-resource.h							\
	xfce-utf8.h

libxfce4util_built_public_sources =					\
	libxfce4util-enum-types.h

libxfce4util_built_sources =						\
	$(libxfce4util_built_public_sources)				\
	libxfce4util-alias.h						\
	libxfce4util-aliasdef.c						\
	libxfce4util-enum-types.c

libxfce4utilincludedir = $(includedir)/xfce4/libxfce4util
libxfce4utilinclude_HEADERS =						\
	$(libxfce4util_built_public_sources)				\
	$(libxfce4util_headers)						\
	libxfce4util.h							\
	libxfce4util-config.h

libxfce4util_la_SOURCES =						\
	$(libxfce4utilinclude_HEADERS)					\
	$(libxfce4util_built_sources)					\
	libxfce4util-config.c						\
	libxfce4util-private.c						\
	libxfce4util-private.h						\
	xfce-desktopentry.c						\
	xfce-fileutils.c						\
	xfce-i18n.c							\
	xfce-kiosk.c							\
	xfce-license.c							\
	xfce-miscutils.c						\
	xfce-posix-signal-handler.c					\
	xfce-private.h							\
	xfce-rc.c							\
	xfce-rc-config.c						\
	xfce-rc-private.h						\
	xfce-rc-simple.c						\
	xfce-resource.c							\
	xfce-utf8.c

libxfce4util_la_CFLAGS = 						\
	$(GOBJECT_CFLAGS)

libxfce4util_la_LDFLAGS =						\
	-export-dynamic							\
	-version-info $(LIBXFCE4UTIL_VERINFO)				\
	-export-symbols-regex "^[^_].*"					\
	-no-undefined

libxfce4util_la_LIBADD =						\
	$(GOBJECT_LIBS)

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxfce4util-1.0.pc


##
## Rules to auto-generate built sources
##
## This is a bit tricky with automake, and non-trivial to implement. The
## rules below seem to work fine and don't seem to break the build, but
## they are only enabled in maintainer mode, so arbitrary users don't get
## trapped in automake's oddities. Therefore we ship the autogenerated
## files as part of the dist tarball.
##
if MAINTAINER_MODE
CLEANFILES =								\
	actual-abi							\
	expected-abi							\
	xgen-letc							\
	xgen-leth

DISTCLEANFILES =							\
	stamp-libxfce4util-enum-types.h					\
	$(libxfce4util_built_sources)

BUILT_SOURCES =								\
	$(libxfce4util_built_sources)

if HAVE_GNUC_VISIBILITY
TESTS =									\
	abicheck.sh
endif

libxfce4util-alias.h: make-libxfce4util-alias.pl libxfce4util.symbols
	$(PERL) $(srcdir)/make-libxfce4util-alias.pl < $(srcdir)/libxfce4util.symbols > libxfce4util-alias.h

libxfce4util-aliasdef.c: make-libxfce4util-alias.pl libxfce4util.symbols
	$(PERL) $(srcdir)/make-libxfce4util-alias.pl -def < $(srcdir)/libxfce4util.symbols > libxfce4util-aliasdef.c

libxfce4util-enum-types.h: stamp-libxfce4util-enum-types.h
	@true
stamp-libxfce4util-enum-types.h: $(libxfce4util_headers) Makefile
	( cd $(srcdir) && glib-mkenums \
		--fhead "#ifndef __LIBXFCE4UTIL_ENUM_TYPES_H__\n#define __LIBXFCE4UTIL_ENUM_TYPES_H__\n#include <glib-object.h>\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define XFCE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
		--ftail "#endif /* __LIBXFCE4UTIL_ENUM_TYPES_H__ */" \
		$(libxfce4util_headers) ) > xgen-leth \
	&& (cmp -s xgen-leth libxfce4util-enum-types.h || cp xgen-leth libxfce4util-enum-types.h) \
	&& rm -f xgen-leth \
	&& echo timestamp > $(@F)

libxfce4util-enum-types.c: $(libxfce4util_headers) Makefile
	( cd $(srcdir) && glib-mkenums \
		--fhead "#include <libxfce4util/libxfce4util.h>\n#include <libxfce4util/libxfce4util-alias.h>\n" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		--ftail "\n#define __LIBXFCE4UTIL_ENUM_TYPES_C__\n#include <libxfce4util/libxfce4util-aliasdef.c>\n" \
		$(libxfce4util_headers) ) >> xgen-letc \
	&& cp xgen-letc libxfce4util-enum-types.c \
	&& rm -f xgen-letc
endif

# required for gtk-doc
dist-hook: all

EXTRA_DIST =								\
	abicheck.sh							\
	libxfce4util.symbols						\
	libxfce4util-alias.h						\
	libxfce4util-aliasdef.c						\
	make-libxfce4util-alias.pl

# vi:set ts=8 sw=8 noet ai nocindent: