aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-09-20 18:11:57 -0300
committerEuAndreh <eu@euandre.org>2021-09-20 18:13:08 -0300
commit218696c0284ac1e6c361fe09dfebee43bebdc2af (patch)
treeed2bc9a62c684fb65dad40d4d03c15b819d92d58 /Makefile
parentRework how translation is done (diff)
downloadgit-permalink-218696c0284ac1e6c361fe09dfebee43bebdc2af.tar.gz
git-permalink-218696c0284ac1e6c361fe09dfebee43bebdc2af.tar.xz
Adapt installation to new i18n.
Use the locale files over the locale variables. Adapt the "install" and "uninstall" targets to it, and remove the locale test.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4f91b3a..f29cafc 100644
--- a/Makefile
+++ b/Makefile
@@ -43,16 +43,30 @@ check: all
sh tests/remotes.sh
clean:
- rm -rf public/ $(manpages) README.*.md CHANGELOG.*.md messages.mo \
- src/git-permalink tests/destdirs/ tests/prefix/ tests/remotes/
+ rm -rf \
+ public/ $(manpages) README.*.md CHANGELOG.*.md messages.mo \
+ tests/destdirs/ tests/prefix/ tests/remotes/ \
+ src/git-permalink src/load-locale-messages.sh
install: all
- mkdir -p $(DESTDIR)$(BINDIR)
+ mkdir -p \
+ $(DESTDIR)$(BINDIR) \
+ $(DESTDIR)$(LOCALEDIR) \
+ $(DESTDIR)$(LIBEXECDIR)/$(NAME)
cp src/git-permalink $(DESTDIR)$(BINDIR)
+ for l in $(TRANSLATIONS) $(CONTRIBLANGS); do \
+ mkdir -p $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES; \
+ cp src/locale/$$l.sh \
+ $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME).sh; \
+ done
+ cp src/load-locale-messages.sh $(DESTDIR)$(LIBEXECDIR)/$(NAME)
sh doc/manpages.sh -ip $(DESTDIR)$(MANDIR) $(manpages)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/git-permalink
+ for l in $(TRANSLATIONS) $(CONTRIBLANGS); do \
+ rm -f $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME).sh; \
+ done
sh doc/manpages.sh -up $(DESTDIR)$(MANDIR) $(manpages)