diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2014-02-19 17:13:27 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2014-02-19 17:13:27 (GMT) |
commit | 121bd23862ad49e2acb3d47bc19cad5294383e4e (patch) | |
tree | 0117028904112512a7cccffabcc215943bd8bcb1 /nls/nls.mk | |
parent | 559947186ef39e18f273e32026590f824782d905 (diff) | |
download | fluxbox-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.mk | 40 |
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 @@ | |||
1 | LOCALE_PATH = @LOCALE_PATH@ | ||
2 | NLSTEST = @NLS@ | ||
3 | MFILES = Translation.m | ||
4 | GENERATED_MFILES = $(patsubst %,generated-%.m,$(DEST_CODESETS)) | ||
5 | MAINTAINERCLEANFILES = Makefile.in $(GENERATED_MFILES) | ||
6 | CATFILES = $(patsubst %,fluxbox-%.cat,$(DEST_CODESETS)) | ||
7 | |||
8 | # We distribute the generated files so that users don't need iconv | ||
9 | EXTRA_DIST= $(MFILES) $(GENERATED_MFILES) | ||
10 | CLEANFILES = $(CATFILES) | ||
11 | |||
12 | all-local: $(CATFILES) | ||
13 | install-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 | ||
23 | translations: $(GENERATED_MFILES) | ||
24 | |||
25 | generated-%.m: Translation.m | ||
26 | iconv -f $(SRC_CODESET) -t $* $(srcdir)/Translation.m | sed s/$(SRC_CODESET)/$*/ > $@ | ||
27 | |||
28 | uninstall-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 | |||
36 | fluxbox-%.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 | ||