b3ea36aecf83907dc62453ea79a55eb44804fd3b
[platform/upstream/ibus.git] / Makefile.am
1 # vim:set noet ts=4:
2 #
3 # ibus - The Input Bus
4 #
5 # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
6 # Copyright (c) 2007-2010 Red Hat, Inc.
7 #
8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either
11 # version 2 of the License, or (at your option) any later version.
12 #
13 # This library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU Lesser General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with this program; if not, write to the
20 # Free Software Foundation, Inc., 59 Temple Place, Suite 330,
21 # Boston, MA  02111-1307  USA
22
23 NULL =
24
25 if ENABLE_PYTHON
26 PYTHON_DIRS =       \
27         ibus            \
28         ui              \
29         setup           \
30         $(NULL)
31 endif
32
33 if ENABLE_GCONF
34 GCONF_DIRS =        \
35         gconf           \
36         $(NULL)
37 endif
38
39 if ENABLE_DAEMON
40 DAEMON_DIRS =       \
41         bus             \
42         $(NULL)
43 endif
44
45 if ENABLE_MEMCONF
46 MEMCONF_DIRS = \
47         memconf \
48         $(NULL)
49 endif
50
51 if ENABLE_DCONF
52 DCONF_DIRS = \
53         dconf \
54         $(NULL)
55 endif
56
57 SUBDIRS =           \
58         src             \
59         util            \
60         client          \
61         data            \
62         m4              \
63         po              \
64         docs            \
65         bindings        \
66         $(DAEMON_DIRS)  \
67         $(PYTHON_DIRS)  \
68         $(GCONF_DIRS)   \
69         $(MEMCONF_DIRS) \
70         $(DCONF_DIRS)   \
71         $(NULL)
72
73 ACLOCAL_AMFLAGS = -I m4
74
75 pkgconfigdir = $(libdir)/pkgconfig
76 pkgconfig_DATA = ibus-@IBUS_API_VERSION@.pc
77
78 ibus_pc_in = ibus-@IBUS_API_VERSION@.pc.in
79 EXTRA_DIST = \
80         autogen.sh \
81         $(ibus_pc_in) \
82         ibus.spec.in \
83         python-config.py \
84         $(NULL)
85
86 noinst_DIST = \
87         $(NULL)
88
89 DISTCLEANFILES = \
90         po/stamp-it \
91         $(NULL)
92
93 install-data-hook:
94         $(MKDIR_P) $(DESTDIR)${pkgdatadir}/engine
95
96 DISTCHECK_CONFIGURE_FLAGS = \
97         --enable-gtk-doc \
98         --disable-schemas-install \
99         --disable-introspection \
100         $(NULL)
101
102 dist-hook:
103         if test -d .git ; then \
104                 git log --name-status --date=iso > $(distdir)/ChangeLog ; \
105         fi
106
107 distclean-local:
108         if test "x$(srcdir)" = "x."; then :; else \
109                 rm -f ChangeLog; \
110         fi
111
112 MAINTAINERCLEANFILES = \
113         $(srcdir)/ChangeLog \
114         $(NULL)
115
116 rpm: dist @PACKAGE_NAME@.spec
117         rpmbuild -bb \
118                         --define "_sourcedir `pwd`" \
119                         --define "_builddir `pwd`/rpm" \
120                         --define "_srcrpmdir `pwd`/rpm" \
121                         --define "_rpmdir `pwd`"/rpm \
122                         --define "_specdir `pwd`/rpm" \
123                         @PACKAGE_NAME@.spec
124
125 srpm: dist @PACKAGE_NAME@.spec
126         rpmbuild -bs \
127                         --define "_sourcedir `pwd`" \
128                         --define "_builddir `pwd`/rpm" \
129                         --define "_srcrpmdir `pwd`/rpm" \
130                         --define "_rpmdir `pwd`/rpm" \
131                         --define "_specdir `pwd`/rpm" \
132                         @PACKAGE_NAME@.spec
133
134 .PHONY: debian/changelog
135 debian/changelog:
136         $(AM_V_GEN) \
137         ( \
138                 . /etc/lsb-release; \
139                 date=`date -R`; \
140                 version=@VERSION@; \
141                 serie=$(serie); \
142                 if test -z "$$serie"; then \
143                   serie=$$DISTRIB_CODENAME; \
144                 fi; \
145                 if test -z "$$release"; then \
146                   release=1; \
147                 fi; \
148                 s=`cat debian/changelog.in`; \
149                 eval "echo \"$${s}\""; \
150         ) > $@
151
152 ppa: dist debian/changelog
153         $(AM_V_GEN) \
154         ( \
155                 mkdir ppa; \
156                 cd ppa; \
157                 tar zxvf ../$(distdir).tar.gz ; \
158                 cd $(distdir); \
159                 cp -a ../../debian . ; \
160                 cd debian; \
161                 debuild -S -sa ; \
162         )
163
164 dpkg: dist debian/changelog
165         $(AM_V_GEN) \
166         ( \
167                 mkdir ppa; \
168                 cd ppa; \
169                 tar zxvf ../$(distdir).tar.gz ; \
170                 cd $(distdir); \
171                 cp -a ../../debian . ; \
172                 cd debian; \
173                 debuild -b -us -uc; \
174         )
175
176 clean-rpm:
177         $(RM) -r "`uname -i`"
178
179 clean-local: clean-rpm
180
181 git-tag:
182         git tag -s @PACKAGE_VERSION@
183
184 git-clean-tree:
185         git clean -d -f -x
186
187 GITIGNOREFILES = \
188         INSTALL \
189         aclocal.m4 \
190         compile \
191         config.guess \
192         config.h.in \
193         config.sub \
194         depcomp \
195         gtk-doc.make \
196         install-sh \
197         ltmain.sh \
198         missing \
199         mkinstalldirs \
200         py-compile \
201         stamp-h* \
202         $(NULL)
203
204 -include $(top_srcdir)/git.mk