Create simple engine
[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         engine          \
62         data            \
63         m4              \
64         po              \
65         docs            \
66         bindings        \
67         $(DAEMON_DIRS)  \
68         $(PYTHON_DIRS)  \
69         $(GCONF_DIRS)   \
70         $(MEMCONF_DIRS) \
71         $(DCONF_DIRS)   \
72         $(NULL)
73
74 ACLOCAL_AMFLAGS = -I m4
75
76 pkgconfigdir = $(libdir)/pkgconfig
77 pkgconfig_DATA = ibus-@IBUS_API_VERSION@.pc
78
79 ibus_pc_in = ibus-@IBUS_API_VERSION@.pc.in
80 EXTRA_DIST = \
81         autogen.sh \
82         $(ibus_pc_in) \
83         ibus.spec.in \
84         python-config.py \
85         $(NULL)
86
87 noinst_DIST = \
88         $(NULL)
89
90 DISTCLEANFILES = \
91         po/stamp-it \
92         $(NULL)
93
94 install-data-hook:
95         $(MKDIR_P) $(DESTDIR)${pkgdatadir}/engine
96
97 DISTCHECK_CONFIGURE_FLAGS = \
98         --enable-gtk-doc \
99         --disable-schemas-install \
100         --disable-introspection \
101         $(NULL)
102
103 dist-hook:
104         if test -d .git ; then \
105                 git log --name-status --date=iso > $(distdir)/ChangeLog ; \
106         fi
107
108 distclean-local:
109         if test "x$(srcdir)" = "x."; then :; else \
110                 rm -f ChangeLog; \
111         fi
112
113 MAINTAINERCLEANFILES = \
114         $(srcdir)/ChangeLog \
115         $(NULL)
116
117 rpm: dist @PACKAGE_NAME@.spec
118         rpmbuild -bb \
119                         --define "_sourcedir `pwd`" \
120                         --define "_builddir `pwd`/rpm" \
121                         --define "_srcrpmdir `pwd`/rpm" \
122                         --define "_rpmdir `pwd`"/rpm \
123                         --define "_specdir `pwd`/rpm" \
124                         @PACKAGE_NAME@.spec
125
126 srpm: dist @PACKAGE_NAME@.spec
127         rpmbuild -bs \
128                         --define "_sourcedir `pwd`" \
129                         --define "_builddir `pwd`/rpm" \
130                         --define "_srcrpmdir `pwd`/rpm" \
131                         --define "_rpmdir `pwd`/rpm" \
132                         --define "_specdir `pwd`/rpm" \
133                         @PACKAGE_NAME@.spec
134
135 .PHONY: debian/changelog
136 debian/changelog:
137         $(AM_V_GEN) \
138         ( \
139                 . /etc/lsb-release; \
140                 date=`date -R`; \
141                 version=@VERSION@; \
142                 serie=$(serie); \
143                 if test -z "$$serie"; then \
144                   serie=$$DISTRIB_CODENAME; \
145                 fi; \
146                 if test -z "$$release"; then \
147                   release=1; \
148                 fi; \
149                 s=`cat debian/changelog.in`; \
150                 eval "echo \"$${s}\""; \
151         ) > $@
152
153 ppa: dist debian/changelog
154         $(AM_V_GEN) \
155         ( \
156                 mkdir ppa; \
157                 cd ppa; \
158                 tar zxvf ../$(distdir).tar.gz ; \
159                 cd $(distdir); \
160                 cp -a ../../debian . ; \
161                 cd debian; \
162                 debuild -S -sa ; \
163         )
164
165 dpkg: dist debian/changelog
166         $(AM_V_GEN) \
167         ( \
168                 mkdir ppa; \
169                 cd ppa; \
170                 tar zxvf ../$(distdir).tar.gz ; \
171                 cd $(distdir); \
172                 cp -a ../../debian . ; \
173                 cd debian; \
174                 debuild -b -us -uc; \
175         )
176
177 clean-rpm:
178         $(RM) -r "`uname -i`"
179
180 clean-local: clean-rpm
181
182 git-tag:
183         git tag -s @PACKAGE_VERSION@
184
185 git-clean-tree:
186         git clean -d -f -x
187
188 GITIGNOREFILES = \
189         INSTALL \
190         aclocal.m4 \
191         compile \
192         config.guess \
193         config.h.in \
194         config.sub \
195         depcomp \
196         gtk-doc.make \
197         install-sh \
198         ltmain.sh \
199         missing \
200         mkinstalldirs \
201         py-compile \
202         stamp-h* \
203         $(NULL)
204
205 -include $(top_srcdir)/git.mk