WIP move all conf components into conf dir
[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 UI_DIR = \
26         ui \
27         $(NULL)
28
29 if ENABLE_PYTHON
30 PYTHON_DIRS = \
31         ibus \
32         setup \
33         $(NULL)
34 endif
35
36 if ENABLE_DAEMON
37 DAEMON_DIR = \
38         bus \
39         $(NULL)
40 endif
41
42 SUBDIRS = \
43         src \
44         util \
45         conf \
46         client \
47         engine \
48         tools \
49         data \
50         m4 \
51         po \
52         docs \
53         bindings \
54         $(UI_DIR) \
55         $(DAEMON_DIR) \
56         $(PYTHON_DIRS) \
57         $(NULL)
58
59 ACLOCAL_AMFLAGS = -I m4
60
61 pkgconfigdir = $(libdir)/pkgconfig
62 pkgconfig_DATA = ibus-@IBUS_API_VERSION@.pc
63
64 ibus_pc_in = ibus-@IBUS_API_VERSION@.pc.in
65 EXTRA_DIST = \
66         autogen.sh \
67         $(ibus_pc_in) \
68         ibus.spec.in \
69         python-config.py \
70         $(NULL)
71
72 noinst_DIST = \
73         $(NULL)
74
75 DISTCLEANFILES = \
76         po/stamp-it \
77         $(NULL)
78
79 install-data-hook:
80         $(MKDIR_P) $(DESTDIR)${pkgdatadir}/engine
81
82 DISTCHECK_CONFIGURE_FLAGS = \
83         --enable-gtk-doc \
84         --disable-schemas-install \
85         --disable-introspection \
86         $(NULL)
87
88 dist-hook:
89         if test -d .git ; then \
90                 git log --name-status --date=iso > $(distdir)/ChangeLog ; \
91         fi
92
93 distclean-local:
94         if test "x$(srcdir)" = "x."; then :; else \
95                 rm -f ChangeLog; \
96         fi
97
98 MAINTAINERCLEANFILES = \
99         $(srcdir)/ChangeLog \
100         $(NULL)
101
102 rpm: dist @PACKAGE_NAME@.spec
103         rpmbuild -bb \
104                         --define "_sourcedir `pwd`" \
105                         --define "_builddir `pwd`/rpm" \
106                         --define "_srcrpmdir `pwd`/rpm" \
107                         --define "_rpmdir `pwd`"/rpm \
108                         --define "_specdir `pwd`/rpm" \
109                         @PACKAGE_NAME@.spec
110
111 srpm: dist @PACKAGE_NAME@.spec
112         rpmbuild -bs \
113                         --define "_sourcedir `pwd`" \
114                         --define "_builddir `pwd`/rpm" \
115                         --define "_srcrpmdir `pwd`/rpm" \
116                         --define "_rpmdir `pwd`/rpm" \
117                         --define "_specdir `pwd`/rpm" \
118                         @PACKAGE_NAME@.spec
119
120 .PHONY: debian/changelog
121 debian/changelog:
122         $(AM_V_GEN) \
123         ( \
124                 . /etc/lsb-release; \
125                 date=`date -R`; \
126                 version=@VERSION@; \
127                 serie=$(serie); \
128                 if test -z "$$serie"; then \
129                   serie=$$DISTRIB_CODENAME; \
130                 fi; \
131                 if test -z "$$release"; then \
132                   release=1; \
133                 fi; \
134                 s=`cat debian/changelog.in`; \
135                 eval "echo \"$${s}\""; \
136         ) > $@
137
138 ppa: dist debian/changelog
139         $(AM_V_GEN) \
140         ( \
141                 mkdir ppa; \
142                 cd ppa; \
143                 tar zxvf ../$(distdir).tar.gz ; \
144                 cd $(distdir); \
145                 cp -a ../../debian . ; \
146                 cd debian; \
147                 debuild -S -sa ; \
148         )
149
150 dpkg: dist debian/changelog
151         $(AM_V_GEN) \
152         ( \
153                 mkdir ppa; \
154                 cd ppa; \
155                 tar zxvf ../$(distdir).tar.gz ; \
156                 cd $(distdir); \
157                 cp -a ../../debian . ; \
158                 cd debian; \
159                 debuild -b -us -uc; \
160         )
161
162 clean-rpm:
163         $(RM) -r "`uname -i`"
164
165 clean-local: clean-rpm
166
167 git-tag:
168         git tag -s @PACKAGE_VERSION@
169
170 git-clean-tree:
171         git clean -d -f -x
172
173 GITIGNOREFILES = \
174         INSTALL \
175         aclocal.m4 \
176         compile \
177         config.guess \
178         config.h.in \
179         config.sub \
180         depcomp \
181         gtk-doc.make \
182         install-sh \
183         ltmain.sh \
184         missing \
185         mkinstalldirs \
186         py-compile \
187         stamp-h* \
188         $(NULL)
189
190 -include $(top_srcdir)/git.mk