aboutsummaryrefslogtreecommitdiff
path: root/nls/nls.mk
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2014-02-19 17:13:27 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2014-02-19 17:13:27 (GMT)
commit121bd23862ad49e2acb3d47bc19cad5294383e4e (patch)
tree0117028904112512a7cccffabcc215943bd8bcb1 /nls/nls.mk
parent559947186ef39e18f273e32026590f824782d905 (diff)
downloadfluxbox-121bd23862ad49e2acb3d47bc19cad5294383e4e.zip
fluxbox-121bd23862ad49e2acb3d47bc19cad5294383e4e.tar.bz2
move shared build instructions for nls into a common file
Diffstat (limited to 'nls/nls.mk')
-rw-r--r--nls/nls.mk40
1 files changed, 40 insertions, 0 deletions
diff --git a/nls/nls.mk b/nls/nls.mk
new file mode 100644
index 0000000..5e98393
--- /dev/null
+++ b/nls/nls.mk
@@ -0,0 +1,40 @@
1LOCALE_PATH = @LOCALE_PATH@
2NLSTEST = @NLS@
3MFILES = Translation.m
4GENERATED_MFILES = $(patsubst %,generated-%.m,$(DEST_CODESETS))
5MAINTAINERCLEANFILES = Makefile.in $(GENERATED_MFILES)
6CATFILES = $(patsubst %,fluxbox-%.cat,$(DEST_CODESETS))
7
8# We distribute the generated files so that users don't need iconv
9EXTRA_DIST= $(MFILES) $(GENERATED_MFILES)
10CLEANFILES = $(CATFILES)
11
12all-local: $(CATFILES)
13install-data-local: $(CATFILES)
14 @if test x$(NLSTEST) = "x-DNLS"; then \
15 for codeset in $(DEST_CODESETS); do \
16 echo "Installing catalog in $(DESTDIR)$(LOCALE_PATH)/$(THE_LANG).$${codeset}"; \
17 $(mkinstalldirs) $(DESTDIR)$(LOCALE_PATH)/$(THE_LANG).$${codeset}; \
18 $(INSTALL_DATA) fluxbox-$${codeset}.cat $(DESTDIR)$(LOCALE_PATH)/$(THE_LANG).$${codeset}/fluxbox.cat; \
19 done; \
20 fi
21
22# not part of the normal build process
23translations: $(GENERATED_MFILES)
24
25generated-%.m: Translation.m
26 iconv -f $(SRC_CODESET) -t $* $(srcdir)/Translation.m | sed s/$(SRC_CODESET)/$*/ > $@
27
28uninstall-local:
29 @if test x$(NLSTEST) = "x-DNLS"; then \
30 for codeset in $(DEST_CODESETS); do \
31 rm -f $(DESTDIR)$(LOCALE_PATH)/$(THE_LANG).$${codeset}/fluxbox.cat; \
32 rmdir $(DESTDIR)$(LOCALE_PATH)/$(THE_LANG).$${codeset}; \
33 done; \
34 fi
35
36fluxbox-%.cat: generated-%.m Translation.m
37 @if test x$(NLSTEST) = "x-DNLS"; then \
38 echo "Creating catfile for $*"; \
39 $(gencat_cmd) fluxbox-$*.cat $(srcdir)/generated-$*.m; \
40 fi