Mercurial > hg > octave-lojdl > gnulib-hg
annotate modules/localcharset @ 11084:1392a1800208
Don't install charset.alias on mingw and Cygwin.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 25 Jan 2009 18:15:44 +0100 |
parents | bd08c714fb5a |
children | b79789bdd93c |
rev | line source |
---|---|
4110 | 1 Description: |
4172 | 2 Return current locale's character encoding. |
4110 | 3 |
9551
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
4 Notice: |
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
5 If your package's tests make use of the locale_charset() function directly or |
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
6 indirectly, you may need to define the CHARSETALIASDIR environment variable, |
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
7 so that "make check" works before "make install". In Makefile.am syntax: |
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
8 TESTS_ENVIRONMENT += @LOCALCHARSET_TESTS_ENVIRONMENT@ |
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
9 |
4110 | 10 Files: |
11 lib/localcharset.h | |
12 lib/localcharset.c | |
13 lib/config.charset | |
14 lib/ref-add.sin | |
15 lib/ref-del.sin | |
16 m4/codeset.m4 | |
17 m4/glibc21.m4 | |
18 m4/localcharset.m4 | |
19 | |
20 Depends-on: | |
7230
1a8d338654d5
Prefer using configmake.h instead of augmenting DEFS.
Bruno Haible <bruno@clisp.org>
parents:
5251
diff
changeset
|
21 configmake |
4110 | 22 |
23 configure.ac: | |
24 gl_LOCALCHARSET | |
9551
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
25 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" |
bd08c714fb5a
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents:
9091
diff
changeset
|
26 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) |
4110 | 27 |
28 Makefile.am: | |
29 lib_SOURCES += localcharset.h localcharset.c | |
30 | |
4383
2618bff2cc87
Avoid passive voice in comment.
Bruno Haible <bruno@clisp.org>
parents:
4369
diff
changeset
|
31 # We need the following in order to install a simple file in $(libdir) |
4110 | 32 # which is shared with other installed packages. We use a list of referencing |
33 # packages so that "make uninstall" will remove the file if and only if it | |
34 # is not used by another installed package. | |
35 # On systems with glibc-2.1 or newer, the file is redundant, therefore we | |
36 # avoid installing it. | |
37 | |
38 all-local: charset.alias ref-add.sed ref-del.sed | |
39 | |
40 charset_alias = $(DESTDIR)$(libdir)/charset.alias | |
41 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp | |
42 install-exec-local: all-local | |
11084
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
43 if test $(GLIBC21) = no; then \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
44 case '$(host_os)' in \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
45 cygwin* | mingw* | pw32* | cegcc*) \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
46 need_charset_alias=false ;; \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
47 *) \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
48 need_charset_alias=true ;; \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
49 esac ; \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
50 else \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
51 need_charset_alias=false ; \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
52 fi ; \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
53 if $$need_charset_alias; then \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
54 $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ |
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
55 fi ; \ |
4110 | 56 if test -f $(charset_alias); then \ |
57 sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ | |
58 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ | |
59 rm -f $(charset_tmp) ; \ | |
60 else \ | |
11084
1392a1800208
Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
9551
diff
changeset
|
61 if $$need_charset_alias; then \ |
4110 | 62 sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ |
63 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ | |
64 rm -f $(charset_tmp) ; \ | |
65 fi ; \ | |
66 fi | |
67 | |
68 uninstall-local: all-local | |
69 if test -f $(charset_alias); then \ | |
70 sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ | |
71 if grep '^# Packages using this file: $$' $(charset_tmp) \ | |
72 > /dev/null; then \ | |
73 rm -f $(charset_alias); \ | |
74 else \ | |
75 $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ | |
76 fi; \ | |
77 rm -f $(charset_tmp); \ | |
78 fi | |
79 | |
80 charset.alias: config.charset | |
7267
8dffb67501b7
Make generated files be read-only.
Jim Meyering <jim@meyering.net>
parents:
7230
diff
changeset
|
81 rm -f t-$@ $@ |
4369
546156f97d12
Use $(...) notation, not @...@ for AC_REPLACE'd variables.
Jim Meyering <jim@meyering.net>
parents:
4197
diff
changeset
|
82 $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ |
4110 | 83 mv t-$@ $@ |
84 | |
85 SUFFIXES += .sed .sin | |
86 .sin.sed: | |
7267
8dffb67501b7
Make generated files be read-only.
Jim Meyering <jim@meyering.net>
parents:
7230
diff
changeset
|
87 rm -f t-$@ $@ |
4369
546156f97d12
Use $(...) notation, not @...@ for AC_REPLACE'd variables.
Jim Meyering <jim@meyering.net>
parents:
4197
diff
changeset
|
88 sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ |
4110 | 89 mv t-$@ $@ |
90 | |
91 CLEANFILES += charset.alias ref-add.sed ref-del.sed | |
92 | |
93 Include: | |
94 "localcharset.h" | |
95 | |
5251
42b53a22aee5
Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents:
4383
diff
changeset
|
96 License: |
9091
d19ce23d01b0
Use the synonymous term "LGPLv2+".
Bruno Haible <bruno@clisp.org>
parents:
7497
diff
changeset
|
97 LGPLv2+ |
5251
42b53a22aee5
Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents:
4383
diff
changeset
|
98 |
4197 | 99 Maintainer: |
100 Bruno Haible |