]> git.saurik.com Git - apt.git/commitdiff
* doc/makefile, doc/*:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 15 Mar 2010 10:02:31 +0000 (11:02 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 15 Mar 2010 10:02:31 +0000 (11:02 +0100)
  - generate subdirectories for building the manpages in on the fly
    depending on the po files we have.

debian/changelog
doc/de/makefile [deleted file]
doc/es/makefile [deleted file]
doc/fr/makefile [deleted file]
doc/it/makefile [deleted file]
doc/ja/makefile [deleted file]
doc/lang.makefile [new file with mode: 0644]
doc/makefile
doc/pl/makefile [deleted file]
doc/pt_BR/makefile [deleted file]

index 415a6fd8d7c7e343a8dd442ac144249668999fd4..ddbf1921486b2f84083055da910ee7d2f0e16930 100644 (file)
@@ -32,6 +32,9 @@ apt (0.7.26) UNRELEASED; urgency=low
     - save Commandline in Commandline::AsString for logging
   * apt-pkg/deb/debversion.cc:
     - consider absent of debian revision equivalent to 0 (Closes: #573592)
+  * doc/makefile, doc/*:
+    - generate subdirectories for building the manpages in on the fly
+      depending on the po files we have.
 
   [ Julian Andres Klode ]
   * cmdline/apt-mark:
diff --git a/doc/de/makefile b/doc/de/makefile
deleted file mode 100644 (file)
index a827a0f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- make -*-
-BASE=../..
-SUBDIR=doc/de
-
-# Bring in the default rules
-include ../../buildlib/defaults.mak
-
-# Language Code of this translation
-LC=de
-
-include $(PO4A_MANPAGE_H)
diff --git a/doc/es/makefile b/doc/es/makefile
deleted file mode 100644 (file)
index 0b5b522..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- make -*-
-BASE=../..
-SUBDIR=doc/es
-
-# Bring in the default rules
-include ../../buildlib/defaults.mak
-
-# Language Code of this translation
-LC=es
-
-include $(PO4A_MANPAGE_H)
diff --git a/doc/fr/makefile b/doc/fr/makefile
deleted file mode 100644 (file)
index 2145347..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- make -*-
-BASE=../..
-SUBDIR=doc/fr
-
-# Bring in the default rules
-include ../../buildlib/defaults.mak
-
-# Language Code of this translation
-LC=fr
-
-include $(PO4A_MANPAGE_H)
diff --git a/doc/it/makefile b/doc/it/makefile
deleted file mode 100644 (file)
index 2179ec1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- make -*-
-BASE=../..
-SUBDIR=doc/it
-
-# Bring in the default rules
-include ../../buildlib/defaults.mak
-
-# Language Code of this translation
-LC=it
-
-include $(PO4A_MANPAGE_H)
diff --git a/doc/ja/makefile b/doc/ja/makefile
deleted file mode 100644 (file)
index f44bb1c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- make -*-
-BASE=../..
-SUBDIR=doc/ja
-
-# Bring in the default rules
-include ../../buildlib/defaults.mak
-
-# Language Code of this translation
-LC=ja
-
-include $(PO4A_MANPAGE_H)
diff --git a/doc/lang.makefile b/doc/lang.makefile
new file mode 100644 (file)
index 0000000..9fdc6ea
--- /dev/null
@@ -0,0 +1,11 @@
+# -*- make -*-
+BASE=../..
+SUBDIR=doc/@@LANG@@
+
+# Bring in the default rules
+include ../../buildlib/defaults.mak
+
+# Language Code of this translation
+LC=@@LANG@@
+
+include $(PO4A_MANPAGE_H)
index 6e61864668a8181a07141ef00f5708427fb8451b..93504e23eafbce4bc999371dc15ca21f1c7fb7f9 100644 (file)
@@ -46,9 +46,14 @@ TO = $(DOC)
 TARGET = binary
 include $(COPY_H)
 
-#.PHONY: headers library clean veryclean all binary program doc doc.pt_BR doc.fr
+.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
 doc:
-       for dir in $(SUBDIRS); do\
+       for i in $(shell ls po/*.po | sed -r 's#po/([a-z]+[A-Z_]*).po#\1#'); do \
+               test -d $$i || mkdir $$i; \
+               test -f $$i/makefile || sed "s#@@LANG@@#$$i#" lang.makefile > $$i/makefile; \
+       done
+       # it is likely that we have changed the list, so SUBDIRS is incorrect
+       for dir in $(dir $(wildcard */makefile)); do\
                $(MAKE) -C $$dir $@; \
        done
 
@@ -70,7 +75,7 @@ doc: po4a
 
 clean: po4a-clean
 
-.PHONY: update-po po4a
+.PHONY: update-po po4a stats
 update-po:
        po4a --previous --no-backups --force --no-translations po4a.conf
 
@@ -79,6 +84,10 @@ po4a-clean:
 
 po4a:
        po4a --previous --no-backups po4a.conf
+
+stats:
+       for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
+
 endif
 
 ifdef DOXYGEN
diff --git a/doc/pl/makefile b/doc/pl/makefile
deleted file mode 100644 (file)
index 7e77b29..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- make -*-
-BASE=../..
-SUBDIR=doc/pl
-
-# Bring in the default rules
-include ../../buildlib/defaults.mak
-
-# Language Code of this translation
-LC=pl
-
-include $(PO4A_MANPAGE_H)
diff --git a/doc/pt_BR/makefile b/doc/pt_BR/makefile
deleted file mode 100644 (file)
index 6e485bb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- make -*-
-BASE=../..
-SUBDIR=doc/pt_BR
-
-# Bring in the default rules
-include ../../buildlib/defaults.mak
-
-# Language Code of this translation
-LC=pt_BR
-
-include $(PO4A_MANPAGE_H)