[WINEDOCS] Avoid LANG in Makefiles
Francois Gouget
fgouget at codeweavers.com
Mon Jul 11 10:15:25 CDT 2005
When running make in the fr directory you may get the following warning:
PERLLIB=../po4a/lib perl ../po4a/po4a-translate -v -f sgml
-m ../en/winelib-guide.sgml -p ./winelib-guide.po -l winelib-guide.sgml
-k 1
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "fr"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
This is because in the Makfile we set LANG=fr which is then reflected in
the environment variables of the commands run by make. So when perl
starts it sees LANG=fr, tries to find the corresponding locale
information, fails and thus issues the above warning.
The fix is to not use a variable called LANG in the Makefile.
(LANGUAGE is also best avoided since it is used by the GNU gettext)
Changelog:
* Make.rules.in
en/Makefile.in
fr/Makefile.in
Francois Gouget <fgouget at codeweavers.com>
Rename LANG to DOCLOCALE to avoid messing with the $LANG environment
variable of the commands started by make.
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: Make.rules.in
===================================================================
RCS file: /cvsroot/wine/docs/Make.rules.in,v
retrieving revision 1.6
diff -u -p -r1.6 Make.rules.in
--- Make.rules.in 4 Jul 2005 12:55:16 -0000 1.6
+++ Make.rules.in 11 Jul 2005 15:07:54 -0000
@@ -1,7 +1,7 @@
# Global rules shared by all makefiles -*-Makefile-*-
#
# Each individual makefile should define the following variables:
-# LANG : the language for the documentation
+# DOCLOCALE : the language for the documentation
# ALLBOOKS : the books to build
# WINExxx_SRCS : the SGML source files for each supported book
@@ -50,18 +50,18 @@ clean:: $(SUBDIRS:%=%/__clean__)
# Rules for distribution tarballs of formatted docs
-dist: wine-doc-$(LANG)-ps.tar.gz wine-doc-$(LANG)-pdf.tar.gz wine-doc-$(LANG)-html.tar.gz wine-doc-$(LANG)-txt.tar.gz
+dist: wine-doc-$(DOCLOCALE)-ps.tar.gz wine-doc-$(DOCLOCALE)-pdf.tar.gz wine-doc-$(DOCLOCALE)-html.tar.gz wine-doc-$(DOCLOCALE)-txt.tar.gz
-wine-doc-$(LANG)-ps.tar.gz: $(ALLBOOKS:%=%.ps)
+wine-doc-$(DOCLOCALE)-ps.tar.gz: $(ALLBOOKS:%=%.ps)
tar cf - $(ALLBOOKS:%=%.ps) | gzip -9 > $@ || ($(RM) $@ && false)
-wine-doc-$(LANG)-pdf.tar.gz: $(ALLBOOKS:%=%.pdf)
+wine-doc-$(DOCLOCALE)-pdf.tar.gz: $(ALLBOOKS:%=%.pdf)
tar cf - $(ALLBOOKS:%=%.pdf) | gzip -9 > $@ || ($(RM) $@ && false)
-wine-doc-$(LANG)-html.tar.gz: $(ALLBOOKS:%=%.html)
+wine-doc-$(DOCLOCALE)-html.tar.gz: $(ALLBOOKS:%=%.html)
tar cf - $(ALLBOOKS:%=%.html) | gzip -9 > $@ || ($(RM) $@ && false)
-wine-doc-$(LANG)-txt.tar.gz: $(ALLBOOKS:%=%.txt)
+wine-doc-$(DOCLOCALE)-txt.tar.gz: $(ALLBOOKS:%=%.txt)
tar cf - $(ALLBOOKS:%=%.txt) | gzip -9 > $@ || ($(RM) $@ && false)
# Directory recursion
Index: en/Makefile.in
===================================================================
RCS file: /cvsroot/wine/docs/en/Makefile.in,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.in
--- en/Makefile.in 13 May 2005 18:55:09 -0000 1.3
+++ en/Makefile.in 11 Jul 2005 15:07:54 -0000
@@ -3,7 +3,7 @@ TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
-LANG = en
+DOCLOCALE = en
WINEUSR_SRCS = \
wineusr-bugs.sgml \
Index: fr/Makefile.in
===================================================================
RCS file: /cvsroot/wine/docs/fr/Makefile.in,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile.in
--- fr/Makefile.in 5 Jul 2005 03:13:46 -0000 1.5
+++ fr/Makefile.in 11 Jul 2005 15:07:57 -0000
@@ -3,7 +3,7 @@ TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
-LANG = fr
+DOCLOCALE = fr
SGMLDIR = $(TOPSRCDIR)/en
MIN_TRANS = 1
More information about the wine-patches
mailing list