Author: cazfi
Date: Thu Mar 12 04:05:12 2015
New Revision: 28500

URL: http://svn.gna.org/viewcvs/freeciv?rev=28500&view=rev
Log:
Generate langstat.txt as part of 'make dist'

See bug #19087

Added:
    trunk/bootstrap/Makefile.am
    trunk/bootstrap/generate_langstat.sh   (with props)
Modified:
    trunk/Makefile.am
    trunk/configure.ac
    trunk/translations/stats.sh

Modified: trunk/Makefile.am
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/Makefile.am?rev=28500&r1=28499&r2=28500&view=diff
==============================================================================
--- trunk/Makefile.am   (original)
+++ trunk/Makefile.am   Thu Mar 12 04:05:12 2015
@@ -25,45 +25,14 @@
 DSUBDIRS =
 endif
 
-SUBDIRS = $(DSUBDIRS) dependencies utility common tests win32 $(SSUBDIRS) 
$(CSUBDIRS) translations doc tools gen_headers
+SUBDIRS = $(DSUBDIRS) dependencies utility common tests win32 $(SSUBDIRS) 
$(CSUBDIRS) translations doc tools gen_headers bootstrap
 
 ## Automake should distribute config.rpath automatically - and new
 ## versions probably do. We still support versions that do not, so
 ## it's in the list below.
 ## It should also install it automatically when running autogen.sh.
-EXTRA_DIST=    autogen.sh                      \
+EXTRA_DIST =   autogen.sh                      \
                configure.ac                    \
-               bootstrap/fcgui.in              \
-               bootstrap/fcser.in              \
-               bootstrap/fcruledit.in          \
-               bootstrap/fc_svnrev_gen.h.tmpl  \
-               bootstrap/generate_svnrev.sh    \
-               bootstrap/fc_gitrev_gen.h.tmpl  \
-               bootstrap/generate_gitrev.sh    \
-               bootstrap/freeciv.desktop.in    \
-               bootstrap/freeciv-gtk2.desktop.in \
-               bootstrap/freeciv-sdl.desktop.in \
-               bootstrap/freeciv-sdl2.desktop.in \
-               bootstrap/freeciv-qt.desktop.in \
-               bootstrap/freeciv-server.desktop.in     \
-               bootstrap/freeciv-mp-gtk2.desktop.in    \
-               bootstrap/freeciv-mp-gtk3.desktop.in    \
-               bootstrap/freeciv-mp-qt.desktop.in      \
-               bootstrap/freeciv-ruledit.desktop.in    \
-               bootstrap/freeciv-gtk2.appdata.xml.in \
-               bootstrap/freeciv-gtk3.appdata.xml.in \
-               bootstrap/freeciv-sdl.appdata.xml.in \
-               bootstrap/freeciv-sdl2.appdata.xml.in \
-               bootstrap/freeciv-qt.appdata.xml.in \
-               bootstrap/freeciv-server.appdata.xml.in \
-               bootstrap/freeciv-mp-gtk2.appdata.xml.in \
-               bootstrap/freeciv-mp-gtk3.appdata.xml.in \
-               bootstrap/freeciv-mp-qt.appdata.xml.in \
-               bootstrap/freeciv-ruledit.appdata.xml.in \
-               bootstrap/freeciv.spec.in       \
-               bootstrap/config.rpath          \
-               bootstrap/Makerules.mk          \
-               bootstrap/langnames.txt         \
                m4/c99.m4                       \
                m4/c11.m4                       \
                m4/c++11.m4                     \

Added: trunk/bootstrap/Makefile.am
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/bootstrap/Makefile.am?rev=28500&view=auto
==============================================================================
--- trunk/bootstrap/Makefile.am (added)
+++ trunk/bootstrap/Makefile.am Thu Mar 12 04:05:12 2015
@@ -0,0 +1,46 @@
+## Process this file with automake to produce Makefile.in
+
+## Automake should distribute config.rpath automatically - and new
+## versions probably do. We still support versions that do not, so
+## it's in the list below.
+## It should also install it automatically when running autogen.sh.
+EXTRA_DIST =    fcgui.in               \
+               fcser.in                \
+               fcruledit.in            \
+               fc_svnrev_gen.h.tmpl    \
+               generate_svnrev.sh      \
+               fc_gitrev_gen.h.tmpl    \
+               generate_gitrev.sh      \
+               generate_langstat.sh  \
+               langstat.txt            \
+               freeciv.desktop.in      \
+               freeciv-gtk2.desktop.in \
+               freeciv-sdl.desktop.in \
+               freeciv-sdl2.desktop.in \
+               freeciv-qt.desktop.in \
+               freeciv-server.desktop.in       \
+               freeciv-mp-gtk2.desktop.in      \
+               freeciv-mp-gtk3.desktop.in      \
+               freeciv-mp-qt.desktop.in        \
+               freeciv-ruledit.desktop.in      \
+               freeciv-gtk2.appdata.xml.in \
+               freeciv-gtk3.appdata.xml.in \
+               freeciv-sdl.appdata.xml.in \
+               freeciv-sdl2.appdata.xml.in \
+               freeciv-qt.appdata.xml.in \
+               freeciv-server.appdata.xml.in \
+               freeciv-mp-gtk2.appdata.xml.in \
+               freeciv-mp-gtk3.appdata.xml.in \
+               freeciv-mp-qt.appdata.xml.in \
+               freeciv-ruledit.appdata.xml.in \
+               freeciv.spec.in \
+               config.rpath            \
+               Makerules.mk            \
+               langnames.txt
+
+langstat.txt:
+       "$(top_srcdir)/bootstrap/generate_langstat.sh" "$(top_srcdir)" 
"$(top_builddir)"
+
+.PHONY: langstat.txt
+
+MAINTAINERCLEANFILES = langstat.txt

Added: trunk/bootstrap/generate_langstat.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/bootstrap/generate_langstat.sh?rev=28500&view=auto
==============================================================================
--- trunk/bootstrap/generate_langstat.sh        (added)
+++ trunk/bootstrap/generate_langstat.sh        Thu Mar 12 04:05:12 2015
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+rm -f "$2/bootstrap/langstat.txt"
+
+(
+    cd "$1/translations"
+    ./stats.sh release | (
+        while read CODE PRCT ; do
+            NLANG=$(grep "^$CODE " ../bootstrap/langnames.txt 2>/dev/null | 
sed "s/$CODE //")
+            echo "$CODE $PRCT $NLANG"
+        done )
+) >> "$2/bootstrap/langstat.txt"

Propchange: trunk/bootstrap/generate_langstat.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=28500&r1=28499&r2=28500&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Thu Mar 12 04:05:12 2015
@@ -1508,6 +1508,7 @@
          doc/ja/Makefile
          doc/nl/Makefile
          doc/sv/Makefile
+          bootstrap/Makefile
          freeciv.spec:bootstrap/freeciv.spec.in
          data/Freeciv
          client/freeciv.desktop:bootstrap/freeciv.desktop.in

Modified: trunk/translations/stats.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/translations/stats.sh?rev=28500&r1=28499&r2=28500&view=diff
==============================================================================
--- trunk/translations/stats.sh (original)
+++ trunk/translations/stats.sh Thu Mar 12 04:05:12 2015
@@ -53,11 +53,19 @@
 done
 }
 
-for domain in freeciv nations ruledit
+if test "x$1" = "xrelease" ; then
+    DOMAINLIST="freeciv"
+else
+    DOMAINLIST="freeciv nations ruledit"
+fi
+
+for domain in $DOMAINLIST
 do
-  echo
-  echo "$domain"
-  echo "----------"
+  if test "x$1" != "xrelease" ; then
+    echo
+    echo "$domain"
+    echo "----------"
+  fi
   ( cd "$SRCDIR/$domain"
     dir_stats *.po
     rm messages.mo )


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to