OSDN Git Service

LDP: Update POT and ja.po to LDP v3.79
[linuxjm/LDP_man-pages.git] / Makefile
index 04c0ffe..932a9cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,9 @@ update-stats: untrans.html
 untrans.html:  $(patsubst %, stats/%, $(PO4A_SUBDIRS))
        @echo "*************** Updating translation statistics ***************"
        ./tools/generate-list.pl $^ > $@
+       if [ -f EXCLUDED_PAGES.txt ]; then \
+         ./tools/generate-list.pl -e EXCLUDED_PAGES.txt $^ > untrans-partial.html; \
+       fi
 
 stats/%:       stamp-jm-setup po4a/%/po/ja.po
        @echo "*************** stats: $* ***************"
@@ -103,6 +106,7 @@ stamp-jm-setup:
          mkdir -vp po4a/$$d/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 \
@@ -110,7 +114,6 @@ stamp-jm-setup:
            ln -s ../../../$$t/po $$d/po; \
          fi; \
        done
-       cd $(PERKAMON_DIR) && make setup
        @set -e; if [ ! -e $(PERKAMON_DIR)/build/ja ]; then \
          ln -s ../../draft $(PERKAMON_DIR)/build/ja; \
        fi
@@ -135,10 +138,15 @@ upgrade:
          sh ../perkamon/man-pages/scripts/remove_COLOPHON.sh man?/*.[1-8]
        git add --all original/
        git status original | ../../admin/git2upd > upd.txt
-       ../../admin/upd_tl.perl translation_list upd.txt `grep "^V = " $(PERKAMON_DIR)/Makefile | awk '{print $$2}'`
+       $(eval VERSION = $(shell grep "^V = " $(PERKAMON_DIR)/Makefile | awk '{print $$3}'))
+       ../../admin/upd_tl.perl translation_list upd.txt $(VERSION)
        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
 
 help:
        @echo "Available targets:"