7be558b021ff7bf3fbc8c2c67f01eeb8b4ac458c
[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 SUBDIRS =           \
52         src             \
53         util            \
54         client          \
55         data            \
56         m4              \
57         po              \
58         docs            \
59         bindings        \
60         $(DAEMON_DIRS)  \
61         $(PYTHON_DIRS)  \
62         $(GCONF_DIRS)   \
63         $(MEMCONF_DIRS) \
64         $(NULL)
65
66 ACLOCAL_AMFLAGS = -I m4
67
68 pkgconfigdir = $(libdir)/pkgconfig
69 pkgconfig_DATA = ibus-@IBUS_API_VERSION@.pc
70
71 ibus_pc_in = ibus-@IBUS_API_VERSION@.pc.in
72 EXTRA_DIST = \
73         autogen.sh \
74         $(ibus_pc_in) \
75         ibus.spec.in \
76         python-config.py \
77         $(NULL)
78
79 noinst_DIST = \
80         $(NULL)
81
82 DISTCLEANFILES = \
83         po/stamp-it \
84         $(NULL)
85
86 install-data-hook:
87         $(MKDIR_P) $(DESTDIR)${pkgdatadir}/engine
88
89 DISTCHECK_CONFIGURE_FLAGS = \
90         --enable-gtk-doc \
91         --disable-schemas-install \
92         --disable-introspection \
93         $(NULL)
94
95 dist-hook:
96         if test -d .git ; then \
97                 git log --name-status --date=iso > $(distdir)/ChangeLog ; \
98         fi
99
100 rpm: dist @PACKAGE_NAME@.spec
101         rpmbuild -bb \
102                         --define "_sourcedir `pwd`" \
103                         --define "_builddir `pwd`/rpm" \
104                         --define "_srcrpmdir `pwd`/rpm" \
105                         --define "_rpmdir `pwd`"/rpm \
106                         --define "_specdir `pwd`/rpm" \
107                         @PACKAGE_NAME@.spec
108
109 srpm: dist @PACKAGE_NAME@.spec
110         rpmbuild -bs \
111                         --define "_sourcedir `pwd`" \
112                         --define "_builddir `pwd`/rpm" \
113                         --define "_srcrpmdir `pwd`/rpm" \
114                         --define "_rpmdir `pwd`/rpm" \
115                         --define "_specdir `pwd`/rpm" \
116                         @PACKAGE_NAME@.spec
117
118 .PHONY: debian/changelog
119 debian/changelog:
120         $(AM_V_GEN) \
121         ( \
122                 . /etc/lsb-release; \
123                 date=`date -R`; \
124                 version=@VERSION@; \
125                 serie=$(serie); \
126                 if test -z "$$serie"; then \
127                   serie=$$DISTRIB_CODENAME; \
128                 fi; \
129                 if test -z "$$release"; then \
130                   release=1; \
131                 fi; \
132                 s=`cat debian/changelog.in`; \
133                 eval "echo \"$${s}\""; \
134         ) > $@
135
136 ppa: dist debian/changelog
137         $(AM_V_GEN) \
138         ( \
139                 mkdir ppa; \
140                 cd ppa; \
141                 tar zxvf ../$(distdir).tar.gz ; \
142                 cd $(distdir); \
143                 cp -a ../../debian . ; \
144                 cd debian; \
145                 debuild -S -sa ; \
146         )
147
148 dpkg: dist debian/changelog
149         $(AM_V_GEN) \
150         ( \
151                 mkdir ppa; \
152                 cd ppa; \
153                 tar zxvf ../$(distdir).tar.gz ; \
154                 cd $(distdir); \
155                 cp -a ../../debian . ; \
156                 cd debian; \
157                 debuild -b -us -uc; \
158         )
159
160 clean-rpm:
161         $(RM) -r "`uname -i`"
162
163 clean-local: clean-rpm
164
165 git-tag:
166         git tag -s @PACKAGE_VERSION@
167
168 git-clean-tree:
169         git clean -d -f -x
170
171 -include $(top_srcdir)/git.mk