- locale: improve maintainer-targets

This commit is contained in:
svenhoefer
2012-10-25 10:43:56 +02:00
parent dc8ddc5325
commit 22bafbcfc7
3 changed files with 18 additions and 12 deletions

View File

@@ -28,16 +28,22 @@ if MAINTAINER_MODE
master.locale=english.locale
locals: sort-locals locals.h locals_intern.h install-locals
locals: sort-locals work-locals locals.h locals_intern.h
$(master.locale) \
sort-locals: $(top_srcdir)/data/locale/$(master.locale)
for locale in $(locale); do \
cat $(top_srcdir)/data/locale/$${locale} | LC_ALL=C sort | uniq > $${locale}; \
done
ordercheck: $(top_srcdir)/data/locale/$(master.locale)
cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | LC_ALL=C sort | uniq > /tmp/log
cut -d' ' -f1 $(top_srcdir)/data/locale/$(master.locale) | uniq | diff - /tmp/log || \
work-locals: $(master.locale)
for locale in $(locale); do \
$(top_srcdir)/data/locale/helpers/create-locals-work $${locale}; \
done
ordercheck: $(master.locale)
cut -d' ' -f1 $(master.locale) | LC_ALL=C sort | uniq > /tmp/log
cut -d' ' -f1 $(master.locale) | uniq | diff - /tmp/log || \
(echo "ERROR: $(master.locale) not ordered or contains empty lines" && false)
locals.h: ordercheck
@@ -52,7 +58,7 @@ check: locals.h locals_intern.h
diff locals.h $(top_srcdir)/src/system
diff locals_intern.h $(top_srcdir)/src/system
install-locals: sort-locals locals.h locals_intern.h
install-locals: $(locale) locals.h locals_intern.h
cp locals.h locals_intern.h $(top_srcdir)/src/system
@echo "Consider committing src/system/[locals.h locals_intern.h]"
cp -f $(locale) $(top_srcdir)/data/locale

View File

@@ -37,21 +37,21 @@ Enter the directory build_tmp/neutrino-hd/data/locale.
Use for sorting 'make sort-locals', use 'make ordercheck' to for verification.
4.)
To the extent possible, update other locale file. For this, 'make work-locals'
may be useful. if you find a file called *.locale-work, merge this into *.locale
5.)
Create new versions of the files src/system/locals.h and src/system/locals_intern.h
using the command 'make locals.h locals_intern.h'.
5.)
Check the modifications with 'make check'
6.)
Copy the replacement file to their destination with 'make install-locals'
Check the modifications with 'make check'
7.)
Or use for item 3-6 'make locals'
8.)
To the extent possible, update other locale file. For this, the
Perl-script ./helpers/create-locals-work may be useful.
Copy the replacement file to their destination with 'make install-locals'
9.)
If committing the changes to Git, commit both the involved

View File

@@ -43,7 +43,7 @@ while (<masterfile>) {
close(outfile);
print "There were ", $no_errors, " error(s).\n";
print "There were ", $no_errors, " error(s) in ", $localefilename, ".\n";
if ($no_errors == 0) {
unlink($outfilename);