summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 3d7a174591c1299efe8065cdf50cdd46ee81439a (plain)
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
ACLOCAL_AMFLAGS = -I m4
NULL =

SUBDIRS = spice-common src man po doc data

if BUILD_TESTS
SUBDIRS += tests
endif

if HAVE_INTROSPECTION
if WITH_VALA
SUBDIRS += vapi
endif
endif

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =					\
	spice-client-glib-2.0.pc			\
	$(NULL)

if WITH_GTK
pkgconfig_DATA += spice-client-gtk-$(SPICE_GTK_API_VERSION).pc
endif

if WITH_CONTROLLER
pkgconfig_DATA += spice-controller.pc
endif

INTLTOOL_FILES =				\
	intltool-extract.in			\
	intltool-merge.in			\
	intltool-update.in			\
	$(NULL)

DISTCLEANFILES =				\
	$(pkgconfig_DATA)			\
	intltool-extract			\
	intltool-merge				\
	intltool-update				\
	gnome-doc-utils.make			\
	po/.intltool-merge-cache		\
	$(NULL)

EXTRA_DIST =					\
	build-aux/git-version-gen		\
	gtk-doc.make				\
	.version				\
	$(INTLTOOL_FILES)			\
	$(NULL)

MAINTAINERCLEANFILES =				\
	ABOUT-NLS				\
	aclocal.m4				\
	config.h.in				\
	m4/gtk-doc.m4				\
	m4/intltool.m4				\
	m4/libtool.m4				\
	m4/ltoptions.m4				\
	m4/ltsugar.m4				\
	m4/ltversion.m4				\
	m4/lt~obsolete.m4			\
	build-aux/ar-lib			\
	build-aux/compile			\
	build-aux/config.guess			\
	build-aux/config.rpath			\
	build-aux/config.sub			\
	build-aux/depcomp			\
	build-aux/install-sh			\
	build-aux/ltmain.sh			\
	build-aux/missing			\
	build-aux/mkinstalldirs			\
	build-aux/test-driver			\
	po/Makefile.in.in			\
	gtk-doc.make				\
	$(NULL)

# Generate the ChangeLog file
# and insert it into the directory we're about to use to create a tarball.
.PHONY: gen-ChangeLog gen-THANKS
gen-ChangeLog:
	if test -d .git || test -d ../.git; then				\
	  $(top_srcdir)/build-aux/gitlog-to-changelog > $(distdir)/cl-t;	\
	  rm -f $(distdir)/ChangeLog;						\
	  mv $(distdir)/cl-t $(distdir)/ChangeLog;				\
	fi

# see git-version-gen
dist-hook: gen-ChangeLog gen-THANKS
	echo $(VERSION) > $(distdir)/.tarball-version

BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
	echo $(VERSION) > $@-t && mv $@-t $@

DISTCHECK_CONFIGURE_FLAGS =			\
	--enable-introspection			\
	--disable-vala				\
	--disable-usbredir			\
	--enable-gtk-doc			\
	--enable-werror				\
	--with-gtk=3.0				\
	$(NULL)

gen-THANKS:
	$(AM_V_GEN)if test -d .git || test -d ../.git; then						\
	  echo "The spice-gtk team would like to thank the following contributors:" > $(distdir)/t-t;	\
	  echo >> $(distdir)/t-t;									\
	  git log --format='%aN <%aE>' | sort -u >> $(distdir)/t-t;					\
	  rm -f $(distdir)/THANKS;									\
	  mv $(distdir)/t-t $(distdir)/THANKS;								\
	fi

-include $(top_srcdir)/git.mk