File: Makefile.am

package info (click to toggle)
qbankmanager 0.9.55beta-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,136 kB
  • sloc: cpp: 34,179; sh: 10,137; ansic: 1,177; makefile: 888
file content (133 lines) | stat: -rw-r--r-- 3,970 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
SUBDIRS=m4 src data po

EXTRA_DIST=AUTHORS COPYING ChangeLog ChangeLog.old INSTALL NEWS README \
  qbankmanager.spec qbankmanager.spec.in i18nsources

ACLOCAL_AMFLAGS = $(ADD_ACLOCAL_FLAGS) -I m4



if USE_I18N

# We directly read that file list.
I18NFILES=$(shell cat i18nsources)
# Build rule for file list:
sources:
	rm -f $(srcdir)/i18nsources
	for d in $(SUBDIRS); do \
	  make -C $$d sources; \
	done
i18nsources:
	make sources

# The list of available languages (makes file name transformations
# much easier)
ALL_LINGUAS = $(basename $(notdir $(shell ls $(srcdir)/po/*.po)))

# List of po files. Only necessary in the dependency of the catalogs
# rule. 
I18NLINGUAS = $(foreach lang,$(ALL_LINGUAS),$(srcdir)/po/$(lang).po)

# List of qm files. Only necessary for cleanup.
I18NCATALOGS = $(foreach lang,$(ALL_LINGUAS),$(top_builddir)/po/$(lang).qm)

po/$(PACKAGE).pot: i18nsources $(I18NFILES);
	if test -n "$(I18NFILES)"; then \
	  $(XGETTEXT) -C -c -ki18n -ktr2i18n -kI18N \
	    -kI18N_NOOP -ktranslate -kaliasLocale \
            -ktr -ktrUtf8 -k_tr -k_xl \
	    '--msgid-bugs-address=openhbci-general@lists.sourceforge.net' \
	    --from-code=ISO-8859-15 \
	    -o $@ \
            $(I18NFILES); \
	fi

# This rule is not called automatically. It is necessary only for
# the translators, so translators call this manually.
merge: po/$(PACKAGE).pot
	@catalogs=$(I18NLINGUAS); \
	for cat in $$catalogs; do \
	echo msgmerge -o $$cat.new $$cat ./po/$(PACKAGE).pot ; \
	msgmerge -o $$cat.new $$cat ./po/$(PACKAGE).pot ; \
	if test -s $$cat.new; then \
	  grep -v "\"POT-Creation" $$cat.new | grep -v '^#' > $$cat.new.2 ; \
	  grep -v "\"POT-Creation" $$cat | grep -v '^#' >> $$cat.new.1; \
	  if diff $$cat.new.1 $$cat.new.2; then \
		echo "  $$cat unchanged; leaving existing po file untouched."; \
		rm $$cat.new;  \
	  else  \
		mv $$cat.new $$cat ; \
	fi; \
	rm -f $$cat.new.1 $$cat.new.2 ;\
	fi ;\
	done

catalogs: $(I18NLINGUAS)
	@for i in $(ALL_LINGUAS); do \
	  filelingua=$(srcdir)/po/$$i.po; \
	  fileqm=$(top_builddir)/po/$$i.qm; \
	  echo "Creating translation catalogs for language \"$$i\""; \
	  $(MSGFMT) -o $${fileqm} --qt $${filelingua} || touch $${filelingua}; \
	done

qtlocaledir = $(pkgdatadir)/i18n
install-qt-catalogs: catalogs
	$(mkinstalldirs) "$(DESTDIR)$(qtlocaledir)";
	@if test "x$(MSGFMT_SUPPORTS_QT)" = "xyes"; then \
	  for i in $(ALL_LINGUAS); do \
	    fileqm=$(top_builddir)/po/$$i.qm; \
            echo "Installing translation catalog for language \"$$i\""; \
            $(INSTALL_DATA) $${fileqm} $(DESTDIR)$(qtlocaledir)/$$i.qm; \
          done \
	fi
uninstall-qt-catalogs:
	@$(NORMAL_UNINSTALL)
	@for i in $(ALL_LINGUAS); do \
	  echo " rm -f '$(DESTDIR)$(qtlocaledir)/$$i.qm'"; \
	  rm -f "$(DESTDIR)$(qtlocaledir)/$$i.qm"; \
	done

install-data-local: install-qt-catalogs
uninstall-local: uninstall-qt-catalogs

po: merge catalogs

CLEANFILES=i18nsources $(I18NCATALOGS)

endif


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

# Call the qt4 porting utility in every concerned subdirectory
qt4-port:
	make -C src/kbanking qt4-port

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

# Rule for using the Inno Setup compiler. The path to iscc.exe is set
# manually here for now.
ISCC = "C:\Programme\Inno Setup 5\iscc.exe"
wintmpdir = win32-tmp
setup: $(PACKAGE).iss
	mkdir -p $(wintmpdir)
	make prefix="`pwd`/$(wintmpdir)" \
	     install \
	 && $(ISCC) $(PACKAGE).iss \
	 && rm -rf $(wintmpdir)


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

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