开发者

gnu make installed with OS language

开发者 https://www.devze.com 2022-12-27 23:48 出处:网络
I installed the latest GNU make to my windows machine. The installer decided to setup the language as the OS language, which I did not get prompted for. I want it to be english. My OS is in swedish.

I installed the latest GNU make to my windows machine.

The installer decided to setup the language as the OS language, which I did not get prompted for. I want it to be english. My OS is in swedish.

I remember I had similar problem with another GNU p开发者_高级运维rogram (can't recall which), which was solved by adding the env var "lang" with value "c".

How can I switch the language of GNU make to english?


My OS is Japanese, so the terminal was outputting gibberish. What worked for me was setting the LANGUAGE variable:

> make
make: *** ?^?[?Q?b?g?a?w’e?3?e?A?¨?c?,, makefile ?a?c?A?c?e?U?1?n.  ’†?~.
> set LANGUAGE=en_US
> make
make: *** No targets specified and no makefile found.  Stop.

Although the documentation suggests otherwise, I had no luck setting other environment variables.


I am not aware of whether Windows has case sensitive environment variables, but I would expect GNU make to switch to completely switch to US English with LANG=C. If that does not help, try LC_ALL=C, or check whether there is a locale command in the mingw environment which could help show you the exact locale settings.

If you set these environment variables from within the mingw bash shell, make sure that the shell exports those environment variables to the processes it starts (such ask make). I.e. either set the values with export FOO=bar to begin with, or export them with a separate export FOO after having set them with FOO=bar.

(I am presuming mingw behaves like a standard GNU environment when it comes to locales.)


For me under Linux with German locale, passing this directly to make as follows works with bash:

$ make tfred
make: *** Keine Regel, um „tfred“ zu erstellen.  Schluss.
$ LANGUAGE=en_US make trffef
make: *** No rule to make target 'trffef'.  Stop.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号