OSDN Git Service

(split) LDP: Add Makefile to dispatch po4a jobs. LDP-3.37-final
authorAkihiro MOTOKI <amotoki@gmail.com>
Sun, 22 Apr 2012 22:42:11 +0000 (07:42 +0900)
committerAkihiro MOTOKI <amotoki@gmail.com>
Mon, 23 Apr 2012 01:49:54 +0000 (10:49 +0900)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d22c563
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+PERKAMON_DIR = perkamon
+LANGS = ja
+THRESH = 100
+FLAGS ?=
+PO4AFLAGS ?= -k $(THRESH) $(FLAGS)
+
+all: translate
+
+translate: jm-setup
+       cd perkamon && $(MAKE) translate PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)"
+
+translate-%: jm-setup
+       cd perkamon && $(MAKE) translate-$* PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)"
+
+stats: jm-setup
+       cd perkamon && $(MAKE) stats PO4AFLAGS="$(PO4AFLAGS)" LANGS="$(LANGS)"
+
+jm-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; \
+         fi; \
+       done