summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-05-08 13:49:47 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:07 +0100
commit79dd9820094020395d7e3251959f65b11bed054e (patch)
tree91115d7f7b1ba78376c9b08e9311ad5478b66430 /Makefile
parentcaa5ad90b53a883135c4b476dfbe9babbeff4097 (diff)
downloadvyos-live-build-79dd9820094020395d7e3251959f65b11bed054e.tar.gz
vyos-live-build-79dd9820094020395d7e3251959f65b11bed054e.zip
Reworking manpages for live-helper 2.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile56
1 files changed, 16 insertions, 40 deletions
diff --git a/Makefile b/Makefile
index 0c6f6edc7..450fe3d3c 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
SHELL := sh -e
-#TRANSLATIONS="de"
+LANGUAGES = de
all: test install
@@ -10,7 +10,7 @@ test:
# Checking for syntax errors
for SCRIPT in live-helper.sh cgi/* functions/* examples/*/*.sh helpers/* hooks/*; \
do \
- sh -n $$SCRIPT; \
+ sh -n $${SCRIPT}; \
done
# Checking for bashisms
@@ -38,25 +38,18 @@ install:
cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-helper
# Installing manpages
- for MANPAGE in manpages/*.en.1; \
+ for MANPAGE in manpages/en/*; \
do \
- install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man1/$$(basename $$MANPAGE .en.1).1; \
+ SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
+ install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE} .en.$${SECTION}).$${SECTION}; \
done
- for MANPAGE in manpages/*.en.7; \
+ for LANGUAGE in $(LANGUAGES); \
do \
- install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man7/$$(basename $$MANPAGE .en.7).7; \
- done
-
- for TRANSLATIONS in $$TRANSLATIONS; \
- do \
- for MANPAGE in manpages/*.$$TRANSLATION.1; \
+ for MANPAGE in manpages/$${LANGUAGE}/*; \
do \
- install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1; \
- done; \
- for MANPAGE in manpages/*.$$TRANSLATION.7; \
- do \
- install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/$$(basename $$MANPAGE .$$TRANSLATION.7).7; \
+ SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
+ install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
done; \
done
@@ -74,25 +67,18 @@ uninstall:
rm -rf $(DESTDIR)/usr/share/doc/live-helper
# Uninstalling manpages
- for MANPAGE in manpages/*.en.1; \
- do \
- rm -f $(DESTDIR)/usr/share/man/man1/$$(basename $$MANPAGE .en.1).1*; \
- done
-
- for MANPAGE in manpages/*.en.7; \
+ for MANPAGE in manpages/en/*; \
do \
- rm -f $(DESTDIR)/usr/share/man/man7/$$(basename $$MANPAGE .en.7).7*; \
+ SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
+ rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE} .en.$${SECTION}).$${SECTION}; \
done
- for TRANSLATIONS in $$TRANSLATIONS; \
+ for LANGUAGE in $(LANGUAGES); \
do \
- for MANPAGE in manpages/*.$$TRANSLATION.1; \
- do \
- rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1*; \
- done; \
- for MANPAGE in manpages/*.$$TRANSLATION.7; \
+ for MANPAGE in manpages/$${LANGUAGE}/*; \
do \
- rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/$$(basename $$MANPAGE .$$TRANSLATION.7).7*; \
+ SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
+ rm -f $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
done; \
done
@@ -101,13 +87,3 @@ clean:
distclean:
reinstall: uninstall install
-
-po4a:
- # Automatic generation of translated manpages
- if [ $$(which po4a) ]; \
- then \
- cd manpages; \
- po4a po4a/live-helper.cfg; \
- else \
- echo "ERROR: skipping po generation - you need to install po4a <http://po4a.alioth.debian.org/>."; \
- fi