OSDN Git Service

LDP: Merge perkamon/Makefile into the main Makefile
authorAkihiro Motoki <amotoki@gmail.com>
Mon, 15 Mar 2021 04:01:07 +0000 (13:01 +0900)
committerAkihiro Motoki <amotoki@gmail.com>
Mon, 15 Mar 2021 04:25:25 +0000 (13:25 +0900)
57 files changed:
manual/LDP_man-pages/.gitignore
manual/LDP_man-pages/Makefile
manual/LDP_man-pages/perkamon/.gitignore [deleted file]
manual/LDP_man-pages/perkamon/Makefile [deleted file]
manual/LDP_man-pages/perkamon/README.JM.md [deleted file]
manual/LDP_man-pages/perkamon/README.md [deleted file]
manual/LDP_man-pages/po4a/aio/aio.cfg [moved from manual/LDP_man-pages/perkamon/po4a/aio/aio.cfg with 100% similarity]
manual/LDP_man-pages/po4a/arch/arch.cfg [moved from manual/LDP_man-pages/perkamon/po4a/arch/arch.cfg with 100% similarity]
manual/LDP_man-pages/po4a/boot/boot.cfg [moved from manual/LDP_man-pages/perkamon/po4a/boot/boot.cfg with 100% similarity]
manual/LDP_man-pages/po4a/charset/charset.cfg [moved from manual/LDP_man-pages/perkamon/po4a/charset/charset.cfg with 100% similarity]
manual/LDP_man-pages/po4a/complex/complex.cfg [moved from manual/LDP_man-pages/perkamon/po4a/complex/complex.cfg with 100% similarity]
manual/LDP_man-pages/po4a/db/db.cfg [moved from manual/LDP_man-pages/perkamon/po4a/db/db.cfg with 100% similarity]
manual/LDP_man-pages/po4a/dirent/dirent.cfg [moved from manual/LDP_man-pages/perkamon/po4a/dirent/dirent.cfg with 100% similarity]
manual/LDP_man-pages/po4a/epoll/epoll.cfg [moved from manual/LDP_man-pages/perkamon/po4a/epoll/epoll.cfg with 100% similarity]
manual/LDP_man-pages/po4a/error/error.cfg [moved from manual/LDP_man-pages/perkamon/po4a/error/error.cfg with 100% similarity]
manual/LDP_man-pages/po4a/filesystem/filesystem.cfg [moved from manual/LDP_man-pages/perkamon/po4a/filesystem/filesystem.cfg with 100% similarity]
manual/LDP_man-pages/po4a/iconv/iconv.cfg [moved from manual/LDP_man-pages/perkamon/po4a/iconv/iconv.cfg with 100% similarity]
manual/LDP_man-pages/po4a/intro/intro.cfg [moved from manual/LDP_man-pages/perkamon/po4a/intro/intro.cfg with 100% similarity]
manual/LDP_man-pages/po4a/ioctl/ioctl.cfg [moved from manual/LDP_man-pages/perkamon/po4a/ioctl/ioctl.cfg with 100% similarity]
manual/LDP_man-pages/po4a/keyutils/keyutils.cfg [moved from manual/LDP_man-pages/perkamon/po4a/keyutils/keyutils.cfg with 100% similarity]
manual/LDP_man-pages/po4a/ld/ld.cfg [moved from manual/LDP_man-pages/perkamon/po4a/ld/ld.cfg with 100% similarity]
manual/LDP_man-pages/po4a/linux_module/linux_module.cfg [moved from manual/LDP_man-pages/perkamon/po4a/linux_module/linux_module.cfg with 100% similarity]
manual/LDP_man-pages/po4a/locale/locale.cfg [moved from manual/LDP_man-pages/perkamon/po4a/locale/locale.cfg with 100% similarity]
manual/LDP_man-pages/po4a/man2/man2.cfg [moved from manual/LDP_man-pages/perkamon/po4a/man2/man2.cfg with 100% similarity]
manual/LDP_man-pages/po4a/man3/man3.cfg [moved from manual/LDP_man-pages/perkamon/po4a/man3/man3.cfg with 100% similarity]
manual/LDP_man-pages/po4a/man5/man5.cfg [moved from manual/LDP_man-pages/perkamon/po4a/man5/man5.cfg with 100% similarity]
manual/LDP_man-pages/po4a/man7/man7.cfg [moved from manual/LDP_man-pages/perkamon/po4a/man7/man7.cfg with 100% similarity]
manual/LDP_man-pages/po4a/math/math.cfg [moved from manual/LDP_man-pages/perkamon/po4a/math/math.cfg with 100% similarity]
manual/LDP_man-pages/po4a/memory/memory.cfg [moved from manual/LDP_man-pages/perkamon/po4a/memory/memory.cfg with 100% similarity]
manual/LDP_man-pages/po4a/mqueue/mqueue.cfg [moved from manual/LDP_man-pages/perkamon/po4a/mqueue/mqueue.cfg with 100% similarity]
manual/LDP_man-pages/po4a/namespace/namespace.cfg [moved from manual/LDP_man-pages/perkamon/po4a/namespace/namespace.cfg with 100% similarity]
manual/LDP_man-pages/po4a/net/net.cfg [moved from manual/LDP_man-pages/perkamon/po4a/net/net.cfg with 100% similarity]
manual/LDP_man-pages/po4a/netlink/netlink.cfg [moved from manual/LDP_man-pages/perkamon/po4a/netlink/netlink.cfg with 100% similarity]
manual/LDP_man-pages/po4a/notify/notify.cfg [moved from manual/LDP_man-pages/perkamon/po4a/notify/notify.cfg with 100% similarity]
manual/LDP_man-pages/po4a/numa/numa.cfg [moved from manual/LDP_man-pages/perkamon/po4a/numa/numa.cfg with 100% similarity]
manual/LDP_man-pages/po4a/process/process.cfg [moved from manual/LDP_man-pages/perkamon/po4a/process/process.cfg with 100% similarity]
manual/LDP_man-pages/po4a/pthread/pthread.cfg [moved from manual/LDP_man-pages/perkamon/po4a/pthread/pthread.cfg with 100% similarity]
manual/LDP_man-pages/po4a/pwdgrp/pwdgrp.cfg [moved from manual/LDP_man-pages/perkamon/po4a/pwdgrp/pwdgrp.cfg with 100% similarity]
manual/LDP_man-pages/po4a/queue/queue.cfg [moved from manual/LDP_man-pages/perkamon/po4a/queue/queue.cfg with 100% similarity]
manual/LDP_man-pages/po4a/regexp/regexp.cfg [moved from manual/LDP_man-pages/perkamon/po4a/regexp/regexp.cfg with 100% similarity]
manual/LDP_man-pages/po4a/rpc/rpc.cfg [moved from manual/LDP_man-pages/perkamon/po4a/rpc/rpc.cfg with 100% similarity]
manual/LDP_man-pages/po4a/sched/sched.cfg [moved from manual/LDP_man-pages/perkamon/po4a/sched/sched.cfg with 100% similarity]
manual/LDP_man-pages/po4a/search/search.cfg [moved from manual/LDP_man-pages/perkamon/po4a/search/search.cfg with 100% similarity]
manual/LDP_man-pages/po4a/semaphore/semaphore.cfg [moved from manual/LDP_man-pages/perkamon/po4a/semaphore/semaphore.cfg with 100% similarity]
manual/LDP_man-pages/po4a/signal/signal.cfg [moved from manual/LDP_man-pages/perkamon/po4a/signal/signal.cfg with 100% similarity]
manual/LDP_man-pages/po4a/socket/socket.cfg [moved from manual/LDP_man-pages/perkamon/po4a/socket/socket.cfg with 100% similarity]
manual/LDP_man-pages/po4a/special/special.cfg [moved from manual/LDP_man-pages/perkamon/po4a/special/special.cfg with 100% similarity]
manual/LDP_man-pages/po4a/stdio/stdio.cfg [moved from manual/LDP_man-pages/perkamon/po4a/stdio/stdio.cfg with 100% similarity]
manual/LDP_man-pages/po4a/stdlib/stdlib.cfg [moved from manual/LDP_man-pages/perkamon/po4a/stdlib/stdlib.cfg with 100% similarity]
manual/LDP_man-pages/po4a/string/string.cfg [moved from manual/LDP_man-pages/perkamon/po4a/string/string.cfg with 100% similarity]
manual/LDP_man-pages/po4a/time/time.cfg [moved from manual/LDP_man-pages/perkamon/po4a/time/time.cfg with 100% similarity]
manual/LDP_man-pages/po4a/tty/tty.cfg [moved from manual/LDP_man-pages/perkamon/po4a/tty/tty.cfg with 100% similarity]
manual/LDP_man-pages/po4a/unistd/unistd.cfg [moved from manual/LDP_man-pages/perkamon/po4a/unistd/unistd.cfg with 100% similarity]
manual/LDP_man-pages/po4a/utmp/utmp.cfg [moved from manual/LDP_man-pages/perkamon/po4a/utmp/utmp.cfg with 100% similarity]
manual/LDP_man-pages/po4a/wchar/wchar.cfg [moved from manual/LDP_man-pages/perkamon/po4a/wchar/wchar.cfg with 100% similarity]
manual/LDP_man-pages/po4a/wctype/wctype.cfg [moved from manual/LDP_man-pages/perkamon/po4a/wctype/wctype.cfg with 100% similarity]
manual/LDP_man-pages/workaround.patch [moved from manual/LDP_man-pages/perkamon/workaround.patch with 100% similarity]

index e247f05..cfd40e9 100644 (file)
@@ -5,3 +5,7 @@ tmp/
 EXCLUDED_PAGES.txt
 untrans-partial.html
 venv/
+/po4a/add_ja
+/man-pages/
+/man-pages-*.tar.*
+/build/
index 4804b80..abfeef3 100644 (file)
@@ -1,3 +1,6 @@
+# Upstream version
+V = 5.10
+
 PERKAMON_DIR = perkamon
 LANGS = ja
 THRESH = 80
@@ -5,7 +8,7 @@ THRESH_REL = 80
 FLAGS ?=
 PO4AFLAGS ?= -k $(THRESH) $(FLAGS)
 
-PO4A_SUBDIRS = $(sort $(notdir $(wildcard po4a/*)))
+PO4A_SUBDIRS = $(sort $(patsubst %.cfg, %, $(notdir $(wildcard po4a/*/*.cfg))))
 
 .PHONY:        all release translate
 
@@ -14,11 +17,10 @@ translate:  translate-pages update-stats
 release:       release-pages update-tl-finish check-tl-nofinish
 
 translate-pages:       $(patsubst %, stamp/%, $(PO4A_SUBDIRS))
-stamp/%:       stamp-jm-setup po4a/%/po/ja.po
+stamp/%:       stamp-setup po4a/%/po/ja.po
        @echo "*************** translate: $* ***************"
        mkdir -p stamp
-       LC_ALL=C $(MAKE) process-$* \
-         PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)" -C $(PERKAMON_DIR)
+       po4a $(PO4AFLAGS) --variable langs='$(LANGS)' --previous --srcdir . --destdir . po4a/$*/$*.cfg
        touch $@
 
 release-pages:
@@ -33,18 +35,16 @@ untrans.html:       $(patsubst %, stats/%, $(PO4A_SUBDIRS))
          ./tools/generate-list.pl -e EXCLUDED_PAGES.txt $^ > untrans-partial.html; \
        fi
 
-stats/%:       stamp-jm-setup po4a/%/po/ja.po
+stats/%:       stamp-setup po4a/%/po/ja.po
        @echo "*************** stats: $* ***************"
        mkdir -p stats
        mkdir -p _transtmp
-       $(RM) $(PERKAMON_DIR)/build/ja
-       ln -s ../../_transtmp $(PERKAMON_DIR)/build/ja
-       LC_ALL=C $(MAKE) process-$* \
-         PO4AFLAGS="-k 100 $(FLAGS)" LANGS="$(LANGS)" -C $(PERKAMON_DIR) \
-         | tee _log.txt
+       $(RM) build/ja
+       ln -s ../_transtmp build/ja
+       po4a -k 100 $(FLAGS) --variable langs='$(LANGS)' --previous --srcdir . --destdir . po4a/$*/$*.cfg | tee _log.txt
        ./tools/extract-untrans.pl < _log.txt > $@
-       $(RM) $(PERKAMON_DIR)/build/ja
-       ln -s ../../draft $(PERKAMON_DIR)/build/ja
+       $(RM) build/ja
+       ln -s ../draft build/ja
        $(RM) -r _transtmp
        $(RM) _log.txt
 
@@ -84,68 +84,120 @@ format-%:
        done
 
 postats:       jm-setup
-       @LC_ALL=C $(MAKE) stats \
-         PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)" -C $(PERKAMON_DIR)
+       @LC_ALL=C $(MAKE) stats PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)"
 
 untrans-postats:       jm-setup
-       @LC_ALL=C $(MAKE) stats \
-         PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)" -C $(PERKAMON_DIR) \
+       @LC_ALL=C $(MAKE) stats PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)" \
          2>&1 | grep -vE ' translated messages\.$$'
 
-jm-setup:      stamp-jm-setup
-stamp-jm-setup:
-       @# Check perkamon/po4a and JM/po4a
-       ls -1 $(PERKAMON_DIR)/po4a | sort > _po4a_list_perkamon
-       ls -1 po4a | sort > _po4a_list_jm
-       set -e; for d in `comm -13 _po4a_list_perkamon _po4a_list_jm`; do \
-         echo $$d; \
-         rm -vrf po4a/$$d; \
-       done
-       set -e; for d in `comm -23 _po4a_list_perkamon _po4a_list_jm`; do \
-         echo $$d; \
-         mkdir -vp po4a/$$d/po; \
-         touch po4a/$$d/po/ja.po; \
+stats:: $(patsubst %, stats-%, $(LANGS))
+stats-%:
+       @set -e; for subs in $(PO4A_SUBDIRS); do \
+         echo -n "$$subs: " >&2; \
+         msgfmt --statistics -o /dev/null po4a/$$subs/po/$*.po; \
        done
-       rm _po4a_list_jm _po4a_list_perkamon
-       cd $(PERKAMON_DIR) && make setup
-       @# Create symlink to po4a/*/po in the top dir.
-       set -e; for d in $(PERKAMON_DIR)/po4a/*; do \
-         if [ ! -e $$d/po ]; then \
-           t=$$(echo $$d | sed -e "s|$(PERKAMON_DIR)/||"); \
-           ln -s ../../../$$t/po $$d/po; \
+       @set -e; for subs in $(PO4A_SUBDIRS); do \
+         LC_ALL=C msgfmt --statistics -o /dev/null po4a/$$subs/po/$*.po; \
+       done 2>&1 | perl -e '$$f=$$t=$$u; while (<>) {if (/([0-9]*) translated/) {$$t+=$$1;} if (/([0-9]*) untranslated/) {$$u+=$$1;} if (/([0-9]*) fuzzy/) {$$f+=$$1;}} printf "%d translated, %d fuzzy, %d untranslated ==> %.2f%%\n", $$t, $$f, $$u, (100*$$t/($$t+$$f+$$u))'
+
+man-pages-$(V).tar.xz:
+       wget https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/$@
+
+stamp-unpack:  man-pages-$(V).tar.xz
+       tar Jxf man-pages-$(V).tar.xz
+       @#  Remove version from top-level directory so that V variable
+       @#  does not have to be used in targets below
+       mv man-pages-$(V) man-pages
+       @#  Remove stamp-setup to force re-run of 'setup' target
+       -rm -f stamp-setup
+       touch $@
+
+setup:         stamp-setup
+jm-setup:      setup
+stamp-setup:   stamp-unpack
+       -rm -rf build
+       mkdir -p build/C
+       for i in $$(seq 8); do mkdir build/C/man$$i; done
+       @#  Some manual pages are only aliases, they contain a single line
+       @#      .so target_man_page
+       @#  Create a file named 'link', its format is:
+       @#      target_man_page src_man_page
+       @#  This file is used after pages are translated to create aliases
+       @#  of translated manual pages.
+       set -e; for f in man-pages/man?/*.?; do \
+         if sed -e '1,3!d' $$f | grep -q '^\.so'; \
+         then \
+           grep '^\.so' $$f | sed -e '1!d' -e 's/^\.so //' -e "s,$$, $${f#man-pages/}," >> build/C/link; \
+         else \
+           cp $$f build/C/$${f#man-pages/}; \
          fi; \
        done
-       @set -e; if [ ! -e $(PERKAMON_DIR)/build/ja ]; then \
-         ln -s ../../draft $(PERKAMON_DIR)/build/ja; \
+       LC_ALL=C sort build/C/link > temp && mv temp build/C/link
+       @#  Remove empty directories, if any
+       -rmdir build/C/man* 2>/dev/null
+       @#  Apply patches to fix groff syntax errors which  prevent po4a processing
+       if test -f workaround.patch; \
+       then \
+         cd build/C && patch -p2 < $(CURDIR)/workaround.patch; \
        fi
-       ln -s ../../add_ja $(PERKAMON_DIR)/po4a
+       @set -e; if [ ! -e build/ja ]; then \
+         ln -s ../draft build/ja; \
+       fi
+       ln -s ../add_ja po4a/add_ja
        touch $@
 
+clean: clean-setup
 clean-setup:
-       $(RM) stamp-jm-setup
-       @LC_ALL=C $(MAKE) clean -C $(PERKAMON_DIR)
-       find $(PERKAMON_DIR) -type l | xargs $(RM)
+       $(RM) stamp-*
+       $(RM) po4a/add_ja
+       $(RM) -r man-pages build
 
 upgrade:
-       $(MAKE) clean-setup
-       $(MAKE) jm-setup
-       cd $(PERKAMON_DIR)/man-pages \
-         && ../../../../admin/JM-orig-upd.sh ../../original \
-         && cp README man-pages-* Changes* ../../original
+       $(MAKE) clean
+       $(MAKE) setup
+       cd man-pages \
+         && ../../../admin/JM-orig-upd.sh ../original \
+         && cp README man-pages-* Changes* ../original
        cd original \
-         sed -e 's/\^\\\.SH /^\\.S[Hh] /' ../perkamon/man-pages/scripts/remove_COLOPHON.sh \
-         sh ../perkamon/man-pages/scripts/remove_COLOPHON.sh man?/*.[1-8]
+         sed -e 's/\^\\\.SH /^\\.S[Hh] /' ../man-pages/scripts/remove_COLOPHON.sh \
+         sh ../man-pages/scripts/remove_COLOPHON.sh man?/*.[1-8]
        git add --all original/
        git status original | ../../admin/git2upd > upd.txt
-       $(eval VERSION = $(shell grep "^V = " $(PERKAMON_DIR)/Makefile | awk '{print $$3}'))
-       ../../admin/upd_tl.perl translation_list upd.txt $(VERSION)
+       ../../admin/upd_tl.perl translation_list upd.txt $(V)
        mv translation_list.* translation_list
        $(MAKE) FLAGS="--no-translations -v --force" translate-pages
        $(MAKE) update-stats
        git add translation_list
-       git commit -m "LDP: Update original to LDP v$(VERSION)" original/ translation_list
-       git add po4a/ stats/ untrans.html perkamon
-       git commit -m "LDP: Update POT and ja.po to LDP v$(VERSION)" po4a/ stats/ untrans.html
+       git commit -m "LDP: Update original to LDP v$(V)" original/ translation_list
+       git add po4a/ stats/ untrans.html
+       git commit -m "LDP: Update POT and ja.po to LDP v$(V)" po4a/ stats/ untrans.html
+
+disable-removed:
+       @set -e; for f in po4a/*/*.cfg; do \
+         for i in $$(grep '^\[type: man\]' $$f | sed -e 's,.* build/C/,build/C/,' -e 's, \\,,'); do \
+           test -f $$i && continue; \
+           echo "Missing file $$i disabled in $$f"; \
+           sed -i -e '/\[type: man\] '"$$(echo $$i | sed -e 's,/,\\/,g')"'/,/[^\\]$$/s/^/#/' $$f; \
+         done; \
+       done
+
+#  Run this target after a new upstream release to see if pages have been added.
+#  Copy and paste output in po4a .cfg files
+print-new-files:
+       @set -e; for f in build/C/man?/*.?; do \
+         l="$${f#build/C/}"; \
+         grep -q "^\\[type: man\\] build/C/$$l" po4a/*/*.cfg && continue; \
+         o=$$(echo $$l | sed -e 's,/,/local-,'); \
+         printf '[type: man] %s \\\n\t%s \\\n' build/C/$$l "\$$lang:build/\$$lang/$$l"; \
+         if grep -q hlm $$f; then printf '\topt:"-o untranslated=hlm" \\\n'; fi; \
+         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/local-pre.list \\\n'; \
+         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/'$$o'.list \\\n'; \
+         printf '\tadd_$$lang:?po4a/add_$$lang/perkamon \\\n'; \
+         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/'$$l'.list \\\n'; \
+         printf '\tadd_$$lang:?po4a/add_$$lang/addendum \\\n'; \
+         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/local-post.list\n'; \
+         echo; \
+       done
 
 help:
        @echo "Available targets:"
@@ -158,5 +210,5 @@ help:
        @echo "   postats         Display per-po trans stats"
        @echo "   untrans-postats Display per-po trans stats (untrans only)"
        @echo ""
-       @echo "   jm-setup        Setup perkamon environment"
-       @echo "   clean-setup     Clean perkamon environment"
+       @echo "   jm-setup        Setup environment"
+       @echo "   clean-setup     Clean environment"
diff --git a/manual/LDP_man-pages/perkamon/.gitignore b/manual/LDP_man-pages/perkamon/.gitignore
deleted file mode 100644 (file)
index 1a64232..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-po4a/*/po
-po4a/add_*
-/build
-/man-pages-*.tar.*
-/man-pages
-stamp-*
diff --git a/manual/LDP_man-pages/perkamon/Makefile b/manual/LDP_man-pages/perkamon/Makefile
deleted file mode 100644 (file)
index 2542825..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-# Upstream version
-V = 5.10
-
-# Patch level, may be empty
-P =
-
-# These variables may be defined by derivatives
-PO4AFLAGS ?= -k 100
-LANGS ?=
-WORK_DIR ?= .
-UTF8_LOCALE ?= en_US.UTF-8
-PO4A_SUBDIRS ?= $(EXTRA_PO4A_SUBDIRS) $(sort $(patsubst %.cfg, %, $(notdir $(wildcard po4a/*/*.cfg))))
-
-all: translate
-
-#  Download tarball
-get-orig-source: man-pages-$(V).tar.xz
-man-pages-$(V).tar.xz:
-       wget https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/$@
-
-#  Unpack sources
-unpack: stamp-unpack
-
-ifeq ($(findstring git,$(V)),)
-stamp-unpack: stamp-unpack-release
-       touch $@
-else
-stamp-unpack: stamp-unpack-git
-       touch $@
-endif
-
-stamp-unpack-release:
-       -rm -rf man-pages-$(V) man-pages
-       $(MAKE) man-pages-$(V).tar.xz
-       tar Jxf man-pages-$(V).tar.xz
-       #  Remove version from top-level directory so that V variable
-       #  does not have to be used in targets below
-       mv man-pages-$(V) man-pages
-       #  Remove stamp-setup to force re-run of 'setup' target
-       -rm -f stamp-setup
-       touch $@
-
-stamp-unpack-git:
-       $(MAKE) clean
-       -@git submodule add git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git man-pages-git
-       git submodule init && git submodule update
-       ln -s man-pages-git man-pages
-       #  Remove stamp-setup to force re-run of 'setup' target
-       -rm -f stamp-setup
-       touch $@
-
-#  Prepare sources for being used by po4a.
-#  This target is called once after manual pages are unpacked.
-setup: stamp-setup
-stamp-setup: stamp-unpack
-       -rm -rf build
-       mkdir -p build/C
-       for i in $$(seq 8); do mkdir build/C/man$$i; done
-       #  Some manual pages are only aliases, they contain a single line
-       #      .so target_man_page
-       #  Create a file named 'link', its format is:
-       #      target_man_page src_man_page
-       #  This file is used after pages are translated to create aliases
-       #  of translated manual pages.
-       set -e; for f in man-pages/man?/*.?; do \
-         if sed -e '1,3!d' $$f | grep -q '^\.so'; \
-         then \
-           grep '^\.so' $$f | sed -e '1!d' -e 's/^\.so //' -e "s,$$, $${f#man-pages/}," >> build/C/link; \
-         else \
-           cp $$f build/C/$${f#man-pages/}; \
-         fi; \
-       done
-       LC_ALL=C sort build/C/link > temp && mv temp build/C/link
-       #  Remove empty directories, if any
-       -rmdir build/C/man* 2>/dev/null
-       #  Apply patches to fix groff syntax errors which  prevent po4a processing
-       if test -f workaround.patch; \
-       then \
-         cd build/C && patch -p2 < $(CURDIR)/workaround.patch; \
-       fi
-       touch $@
-
-clean::
-       -rm -f stamp-* temp link
-       -rm -rf man-pages build
-       -rm -rf po4a/*/po
-       #  Do not delete tarball in this target
-       #rm -f man-pages-*.tar.xz
-
-reallyclean:: clean
-       rm -f man-pages-*.tar.*
-
-release: clean man-pages-$(V).tar.xz
-       -rm -rf perkamon*
-       mkdir perkamon
-       cp man-pages-$(V).tar.xz perkamon/
-       cp Makefile* README perkamon/
-       -cp *.patch perkamon/
-       tar cf - --exclude=.svn po4a | tar xf - -C perkamon
-       ln -s perkamon perkamon-$(V)$(P)
-       tar Jchf perkamon-$(V)$(P).tar.xz  --numeric-owner perkamon-$(V)$(P)
-
-translate: $(patsubst %, process-%, $(PO4A_SUBDIRS))
-
-translate-%: setup
-       po4a $(PO4AFLAGS) --variable langs='$(LANGS)' --previous --srcdir $(WORK_DIR) --destdir $(WORK_DIR) po4a/$*/$*.cfg
-
-process-%: translate-%
-       @:
-
-cfg-%: FORCE
-       po4a $(PO4AFLAGS) --variable langs='$(LANGS)' --previous --srcdir $(WORK_DIR) --destdir $(WORK_DIR) po4a/$*/$*.cfg
-
-stats:: $(patsubst %, stats-%, $(LANGS))
-stats-%:
-       @set -e; for subs in $(PO4A_SUBDIRS); do \
-         echo -n "$$subs: " >&2; \
-         msgfmt --statistics -o /dev/null $(WORK_DIR)/po4a/$$subs/po/$*.po; \
-       done
-       @set -e; for subs in $(PO4A_SUBDIRS); do \
-         LC_ALL=C msgfmt --statistics -o /dev/null $(WORK_DIR)/po4a/$$subs/po/$*.po; \
-       done 2>&1 | perl -e '$$f=$$t=$$u; while (<>) {if (/([0-9]*) translated/) {$$t+=$$1;} if (/([0-9]*) untranslated/) {$$u+=$$1;} if (/([0-9]*) fuzzy/) {$$f+=$$1;}} printf "%d translated, %d fuzzy, %d untranslated ==> %.2f%%\n", $$t, $$f, $$u, (100*$$t/($$t+$$f+$$u))'
-
-disable-removed:
-       @set -e; for f in po4a/*/*.cfg; do \
-         for i in $$(grep '^\[type: man\]' $$f | sed -e 's,.* build/C/,build/C/,' -e 's, \\,,'); do \
-           test -f $(WORK_DIR)/$$i && continue; \
-           echo "Missing file $$i disabled in $$f"; \
-           sed -i -e '/\[type: man\] '"$$(echo $$i | sed -e 's,/,\\/,g')"'/,/[^\\]$$/s/^/#/' $$f; \
-         done; \
-       done
-
-#  Run this target after a new upstream release to see if pages have been added.
-#  Copy and paste output in po4a .cfg files
-print-new-files:
-       @set -e; for f in $(WORK_DIR)/build/C/man?/*.?; do \
-         l="$${f#$(WORK_DIR)/build/C/}"; \
-         grep -q "^\\[type: man\\] build/C/$$l" po4a/*/*.cfg && continue; \
-         o=$$(echo $$l | sed -e 's,/,/local-,'); \
-         printf '[type: man] %s \\\n\t%s \\\n' build/C/$$l "\$$lang:build/\$$lang/$$l"; \
-         if grep -q hlm $$f; then printf '\topt:"-o untranslated=hlm" \\\n'; fi; \
-         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/local-pre.list \\\n'; \
-         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/'$$o'.list \\\n'; \
-         printf '\tadd_$$lang:?po4a/add_$$lang/perkamon \\\n'; \
-         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/'$$l'.list \\\n'; \
-         printf '\tadd_$$lang:?po4a/add_$$lang/addendum \\\n'; \
-         printf '\tadd_$$lang:?@po4a/add_$$lang/lists/local-post.list\n'; \
-         echo; \
-       done
-
-# Check if groff reports warnings (may be words of sentences not displayed)
-# from http://lintian.debian.org/tags/manpage-has-errors-from-man.html
-check-groff-warnings:
-       @for f in $(WORK_DIR)/build/[!C]*/man*/*.*; \
-         do \
-            LC_ALL=$(UTF8_LOCALE) MANWIDTH=80 man --warnings -E UTF-8 -l $$f 2>&1 > /dev/null |\
-              sed -e "s,.,$${f#$(WORK_DIR)/build/}: &,"; \
-         done
-
-.PHONY: unpack setup translate stats disable-removed print-new-files clean release FORCE
diff --git a/manual/LDP_man-pages/perkamon/README.JM.md b/manual/LDP_man-pages/perkamon/README.JM.md
deleted file mode 100644 (file)
index 1710910..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-About this repository
-=====================
-
-This is a forked version of perkamon project [1] repository [2].
-It is forked to manage Linux JM (Japanese manual) project [3],
-but the repository are frequently synced with the upsream.
-
-* [1] http://perkamon.alioth.debian.org/
-* [2] http://gitorious.org/perkamon/man-pages
-* [3] http://linuxjm.sourceforge.jp/
-
-Main differences
-================
-
-Only difference from the upstream is:
-
-* to have entries for `mdoc.7` and `mdoc.samples.7` (mdoc style man pages)
-
-How to import changes in the upstream
-=====================================
-
-How to merge upstream into this repository:
-
-    $ git remote add upstream git://gitorious.org/perkamon/man-pages.git
-    $ git merge upstream/master
-
-How to update the target version of LDP man-pages
-=================================================
-
-1. Update the upstream version in Makefile:
-
-        V = 3.78
-
-2. Refresh working directories.
-   This downloads a new version of man-pages tarball and recreate the working directory under **build/**:
-
-        rm -f stamp-*
-        make setup
-
-3. Check if new man pages are added. If something is printed, please add it to an appropriate po4a cfg **po4a/\*/\*.cfg**:
-
-        make print-new-files
-
-4. Check if some pages have been removed.:
-
-        make disable-removed
-
-5. Finally commit:
-
-
-Using git-submodule
-===================
-
-Migrate to git version
-----------------------
-
-First add man-pages.git as a submodule:
-
-    $ git submodule add git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git man-pages-git
-
-Next update Makefile. The version number should be set to the next version.:
-
-    V = 3.78-git
-
-Sample commit message:
-
-    $ git commit -m 'Sync to git 80a7408 (upcoming 3.78)'
-
-Move back to release
---------------------
-
-Remove the submodule entry:
-
-    $ git submodule deinit man-pages-git
-    $ rm .gitmodules
-    $ rm -rf man-pages-git
-
-Then update Makefile to point the released version:
-
-    V = 3.78
-
-Sample commit message:
-
-    $ git commit -m 'Remove man-pages-git submodule and set V to 3.78'
diff --git a/manual/LDP_man-pages/perkamon/README.md b/manual/LDP_man-pages/perkamon/README.md
deleted file mode 100644 (file)
index 7e6edf6..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-This is a forked version of perkamon project repository.
-It is mainly forked to manage Linux JM (Japanese manual) project.
-The detail is available at [README.JM.md](README.JM.md).
-
-PERKAMON
-========
-
-The perkamon project's goal is to help translating the
-Linux man-pages into other languages. And more importantly,
-it helps maintaining these translations up-to-date.
-
-Manual pages are converted into PO files by po4a. These are
-regular PO files; translators can use any tool (text editor,
-specialized or not, online services, etc) they like to
-manage their translations.
-
-LANGUAGE TEAMS
-==============
-
-Manual pages are currently translated only into French
-within the perkamon project.  If you want to start a
-new translation, please check first that there is no
-other translation effort ongoing for your language.
-
-You can then ask (in English) on our mailing-list
-  http://lists.alioth.debian.org/mailman/listinfo/perkamon-devel
-for informations on how to proceed.
-
-French translators can be joined at the following
-mailing-list:
-  http://listes.traduc.org/mailman/listinfo/perkamon-fr
-
-LICENSE
-=======
-
-Manual pages are provided under various copyrights.
-The POT and PO files are provided under the same copyright
-as original files.
-
-EXTERNAL LINKS
-==============
-
-* Project home page http://perkamon.alioth.debian.org/
-* Upstream manual pages http://www.kernel.org/doc/man-pages/
-* Po4a home page http://po4a.alioth.debian.org/