Project

General

Profile

Download (8.09 KB) Statistics
| Branch: | Tag: | Revision:

aqbanking / Makefile.am @ ef63ee14

1
SUBDIRS=admin doc m4 src po @TUTORIALS@
2
DIST_SUBDIRS=admin doc m4 src po tutorials
3

    
4
EXTRA_DIST=AUTHORS COPYING ChangeLog INSTALL NEWS README \
5
 aqbanking.spec.in aqbanking.spec \
6
 aqbanking.iss.in aqbanking.iss \
7
 Doxyfile.in version.h.in system.h.in \
8
 i18nsources \
9
 mksymlinks.sh.in mksymlinks.sh Makefile.cvs
10

    
11
idatadir=${datadir}/doc/aqbanking
12
idata_DATA=AUTHORS COPYING ChangeLog README
13

    
14
bin_SCRIPTS=aqbanking-config
15
aclocaldir = $(datadir)/aclocal
16
dist_aclocal_DATA = aqbanking.m4
17

    
18
ACLOCAL_AMFLAGS = $(ADD_ACLOCAL_FLAGS) -I m4
19

    
20
iheaderdir=@aqbanking_headerdir_am@/aqbanking
21
iheader_HEADERS=\
22
  version.h system.h
23

    
24
CLEANFILES = aqbanking-config aqbanking-config.in
25

    
26
aqbanking-config: aqbanking-config.in
27
	echo "#! /bin/sh" >aqbanking-config && \
28
	echo 'dir="@prefix@"' >>aqbanking-config && \
29
	cat aqbanking-config.in >>aqbanking-config && \
30
	chmod a+x aqbanking-config
31

    
32
pkgconfigdir = $(libdir)/pkgconfig
33
pkgconfig_DATA = aqbanking.pc
34

    
35
cmakeconfigdir = $(libdir)/cmake/aqbanking-$(AQBANKING_VERSION_MAJOR).$(AQBANKING_VERSION_MINOR)
36
cmakeconfig_DATA = aqbanking-config.cmake aqbanking-config-version.cmake
37

    
38
listdoc.h:
39
	$(gwenhywfar_bindir)/mklistdoc -I $(gwenhywfar_headers) -v `find $(aqbanking_symlinkdir) -name '*.h' | LC_ALL=C sort ` >listdoc.h
40

    
41
srcdoc: Doxyfile listdoc.h
42
	if test -d apidoc; then rm -Rf apidoc; fi
43
	mkdir -p apidoc/html/aqbanking-@AQBANKING_VERSION_RELEASE_STRING@
44
	doxygen
45

    
46
install-srcdoc: srcdoc
47
	test -d "$(DESTDIR)@docpath@/$(PACKAGE)" || \
48
	  mkdir -p "$(DESTDIR)@docpath@/$(PACKAGE)"
49
	for f in apidoc/html/aqbanking-@AQBANKING_VERSION_RELEASE_STRING@/*; do \
50
	  cp -dR $$f "$(DESTDIR)@docpath@/$(PACKAGE)/"; \
51
	done
52
	cp "apidoc/$(PACKAGE).tag" "$(DESTDIR)@docpath@/"
53

    
54

    
55
rpm:    $(PACKAGE).spec dist
56
	rpmbuild="rpm" && \
57
	if [ `rpm --version | awk '{ print $$3 }'` > /dev/null ]; then rpmbuild="rpmbuild"; fi && \
58
	$$rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
59

    
60
# Rule for using the Inno Setup compiler. The path to iscc.exe is set
61
# manually here for now.
62
ISCC = "C:\Programme\Inno Setup 5\iscc.exe"
63
wintmpdir = win32-tmp
64
setup: aqbanking.iss
65
	mkdir -p $(wintmpdir)
66
	for A in `find src/plugins -name *.la`; do \
67
	  grep -v relink_command $${A} > $${A}.tmp && \
68
	    mv $${A}.tmp $${A}; \
69
	done
70
	$(MAKE) DESTDIR="`pwd`/$(wintmpdir)" \
71
	     aqbanking_pkgdatadir="/share/$(PACKAGE)" \
72
	     gwenhywfar_plugins="/gwen" \
73
	     WIN_PATH_WINDOWS_MINGW="/windows" \
74
	     install \
75
	 && for A in `find $(wintmpdir) -name '*.exe'`; do \
76
		strip $${A}; \
77
	    done \
78
	 && $(ISCC) aqbanking.iss \
79
	 && rm -rf $(wintmpdir)
80

    
81

    
82
if IF_MAKE_I18N_FILES
83

    
84
# We directly read that file list. For old make programs, you would
85
# set this to an empty variable, because they are only needed by the
86
# developers and release technicians.
87
I18NFILES=$(shell cat $(srcdir)/i18nsources)
88
DLGFILES=$(shell cat $(srcdir)/dlgsources)
89
PDFILES=$(shell cat $(srcdir)/pdsources)
90

    
91
# Current build rule:
92
sources:
93
	rm -f $(srcdir)/i18nsources $(srcdir)/dlgsources $(srcdir)/pdsources
94
	$(MAKE) -C $(top_builddir)/src sources
95
$(srcdir)/i18nsources $(srcdir)/dlgsources $(srcdir)/pdsources:
96
	$(MAKE) sources
97

    
98
# Could also be solved this way: Read the I18NFILES variable from file
99
#include $(srcdir)/i18nsources
100
# (Needs the following build rule:)
101
#sources:
102
#	rm -f $(srcdir)/i18nsources
103
#	$(MAKE) -C $(top_srcdir)/src sources
104
#	mv $(srcdir)/i18nsources $(srcdir)/i18nsources.tmp
105
#	echo "I18NFILES = \\" > $(srcdir)/i18nsources
106
#	$(SED) 's!\(^.*$$\)!$$(top_srcdir)/\1 \\!' \
107
#	  $(srcdir)/i18nsources.tmp >> $(srcdir)/i18nsources
108
#	echo '$$(top_srcdir)/config.h' >> $(srcdir)/i18nsources
109
#	rm -f $(srcdir)/i18nsources.tmp
110
#	$(MAKE) Makefile
111

    
112
# The list of available languages (makes file name transformations much easier)
113
ALL_LINGUAS = $(basename $(notdir $(shell ls $(srcdir)/po/*.po)))
114
# For old make programs, the locales would directly be written here:
115
#ALL_LINGUAS = de
116

    
117
# List of po files. Only necessary in the dependency of the catalogs
118
# rule. For old make programs, you would simpy set this to an empty
119
# variable.
120
I18NLINGUAS = $(foreach lang,$(ALL_LINGUAS),$(srcdir)/po/$(lang).po)
121

    
122
# List of mo files. Only necessary for cleanup. For old make programs,
123
# you would simply set this to an empty variable.
124
I18NCATALOGS = $(foreach lang,$(ALL_LINGUAS),$(top_builddir)/po/$(lang).mo)
125
I18NCATALOGS += $(foreach lang,$(ALL_LINGUAS),$(top_builddir)/po/$(lang).qm)
126

    
127
po/$(PACKAGE).pot: i18nsources dlgsources pdsources $(I18NFILES)
128
	rm -f po/tmp*
129
	if test -n "$(I18NFILES)"; then \
130
	  $(XGETTEXT) -C -c -ki18n -ktr2i18n -kI18N -kI18S\
131
	    -kI18N_NOOP -ktranslate -kaliasLocale \
132
            -ktr -ktrUtf8 \
133
	    '--msgid-bugs-address=aqbanking-user@lists.aqbanking.de' \
134
	    -o po/tmppot \
135
	    $(I18NFILES) ; \
136
	fi
137
	for i in $(DLGFILES); do \
138
          po4a-gettextize -f xml -m $$i -p po/tmppot1 -o attributes=text && \
139
	  msghack -o po/tmppot2 --append po/tmppot po/tmppot1 && \
140
	  mv po/tmppot2 po/tmppot; \
141
	done
142
	for i in $(PDFILES); do \
143
          po4a-gettextize -f xml -m $$i -p po/tmppot1 -o wrap \
144
	    -o translated="<plugin><short> <plugin><descr>" \
145
	    -o untranslated="<plugin><version> <plugin><author>" \
146
	    && \
147
	  msghack -o po/tmppot2 --append po/tmppot po/tmppot1 && \
148
	  mv po/tmppot2 po/tmppot; \
149
	done
150
	mv po/tmppot po/$(PACKAGE).pot
151
	rm -f po/tmppot1
152

    
153

    
154
# This rule is not called automatically. It is necessary only for
155
# the translators, so translators only call this manually.
156
merge: po/$(PACKAGE).pot
157
	@catalogs=$(I18NLINGUAS); \
158
	for cat in $$catalogs; do \
159
	echo msgmerge -o $$cat.new $$cat ./po/$(PACKAGE).pot ; \
160
	msgmerge -o $$cat.new $$cat ./po/$(PACKAGE).pot ; \
161
	if test -s $$cat.new; then \
162
	  grep -v "\"POT-Creation" $$cat.new | grep -v '^#' > $$cat.new.2 ; \
163
	  grep -v "\"POT-Creation" $$cat | grep -v '^#' >> $$cat.new.1; \
164
	  if diff $$cat.new.1 $$cat.new.2; then \
165
		echo "  $$cat unchanged; leaving existing po file untouched."; \
166
		rm $$cat.new;  \
167
	  else  \
168
		mv $$cat.new $$cat ; \
169
	fi; \
170
	rm -f $$cat.new.1 $$cat.new.2 ;\
171
	fi ;\
172
	done
173

    
174
catalogs: $(I18NLINGUAS)
175
	@for i in $(ALL_LINGUAS); do \
176
	  filelingua=$(srcdir)/po/$$i.po; \
177
	  filecat=$(top_builddir)/po/$$i.mo; \
178
	  fileqm=$(top_builddir)/po/$$i.qm; \
179
	  echo "Creating translation catalogs for language \"$$i\""; \
180
	  $(MSGFMT) -o $${filecat} $${filelingua} || touch $${filelingua}; \
181
	  if test $(MSGFMT_SUPPORTS_QT) = "yes"; then \
182
	    $(MSGFMT) -o $${fileqm} --qt $${filelingua} || touch $${filelingua}; \
183
	  else \
184
	    echo "$(MSGFMT) does not have the option --qt; ignoring qt translations"; \
185
	  fi; \
186
	done
187

    
188

    
189

    
190
ilocaledir = $(datadir)/locale
191
install-mo-catalogs: catalogs
192
	@for i in $(ALL_LINGUAS); do \
193
	  filecat=$(top_builddir)/po/$$i.mo; \
194
	  fileqm=$(top_builddir)/po/$$i.qm; \
195
          echo "Installing translation catalog for language \"$$i\""; \
196
          $(mkinstalldirs) "$(DESTDIR)$(ilocaledir)/$$i/LC_MESSAGES"; \
197
          $(INSTALL_DATA) $${filecat} $(DESTDIR)$(ilocaledir)/$$i/LC_MESSAGES/$(PACKAGE).mo; \
198
        done
199
uninstall-mo-catalogs:
200
	@$(NORMAL_UNINSTALL)
201
	@for i in $(ALL_LINGUAS); do \
202
	  echo " rm -f '$(DESTDIR)$(ilocaledir)/$$i/LC_MESSAGES/$(PACKAGE).mo'"; \
203
	  rm -f "$(DESTDIR)$(ilocaledir)/$$i/LC_MESSAGES/$(PACKAGE).mo"; \
204
	done
205

    
206

    
207
install-data-local: install-mo-catalogs
208
uninstall-local: uninstall-mo-catalogs
209

    
210
CLEANFILES += $(I18NCATALOGS)
211

    
212
endif # if USE_I18N
213

    
214

    
215
# Rule for only building the source rpm
216
srpm: $(PACKAGE).spec dist
217
	rpmbuild="rpm" && \
218
	if [ `rpm --version | awk '{ print $$3 }'` > /dev/null ]; then rpmbuild="rpmbuild"; fi && \
219
	$$rpmbuild --nodeps -ts $(PACKAGE)-$(VERSION).tar.gz
220

    
221
BUILT_SOURCES = $(iheader_HEADERS) sl-headers
222
CLEANFILES += $(BUILT_SOURCES)
223

    
224
symlinks: mksymlinks.sh
225
	${SHELL} mksymlinks.sh $(srcdir) $(builddir)
226

    
227
sl-headers: mksymlinks.sh
228
	$(MAKE) -C src built_sources
229
	${SHELL} mksymlinks.sh $(srcdir) $(builddir)
230

    
231
# Call this to have Qt's uic files and glade files cleaned up from
232
# bad elements
233
code-cleanup:
234
	-admin/fixuifiles
235
	-admin/glade-fixup
236

    
237
cppcheck:
238
	for f in `find . -name \*.c -o -name \*.cpp`; do cppcheck $$f; done
239

    
240
ChangeLog:
241
	git log -n 100 --pretty="format:------------------------------------------------------------------%n%ai %an%n%s%n%b" >ChangeLog
242

    
243
dist-hook:
244
	rm -f ChangeLog 2>/dev/null
245
	$(MAKE) ChangeLog
246

    
247

    
248
types:
249
	for d in $(SUBDIRS); do \
250
	  $(MAKE) -C $$d types; \
251
	done
252

    
253