annotate modules/localcharset @ 17138:42f6597efac3

* lib/regexec.c (re_search_internal): Fix grammar in comment.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 16 Oct 2012 16:01:05 -0700
parents 968a358953d5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 Description:
4172
5321105558d8 Add module descriptions.
Bruno Haible <bruno@clisp.org>
parents: 4110
diff changeset
2 Return current locale's character encoding.
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
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
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 Files:
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 lib/localcharset.h
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 lib/localcharset.c
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 lib/config.charset
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 lib/ref-add.sin
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 lib/ref-del.sin
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 m4/codeset.m4
12502
5bdbb871dd27 Move gl_FCNTL_O_FLAGS to a separate .m4 file.
Bruno Haible <bruno@clisp.org>
parents: 12499
diff changeset
17 m4/fcntl-o.m4
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 m4/glibc21.m4
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 m4/localcharset.m4
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 Depends-on:
7230
1a8d338654d5 Prefer using configmake.h instead of augmenting DEFS.
Bruno Haible <bruno@clisp.org>
parents: 5251
diff changeset
22 configmake
12499
9deb67d8d0d7 Add missing dependencies to 'extensions' module.
Bruno Haible <bruno@clisp.org>
parents: 12180
diff changeset
23 extensions
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 configure.ac:
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 gl_LOCALCHARSET
16165
968a358953d5 localcharset: Use an absolute path in TESTS_ENVIRONMENT.
Ludovic Courtès <ludo@gnu.org>
parents: 12502
diff changeset
27 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
9551
bd08c714fb5a The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible <bruno@clisp.org>
parents: 9091
diff changeset
28 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 Makefile.am:
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 lib_SOURCES += localcharset.h localcharset.c
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
4383
2618bff2cc87 Avoid passive voice in comment.
Bruno Haible <bruno@clisp.org>
parents: 4369
diff changeset
33 # We need the following in order to install a simple file in $(libdir)
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 # which is shared with other installed packages. We use a list of referencing
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 # packages so that "make uninstall" will remove the file if and only if it
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 # is not used by another installed package.
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 # On systems with glibc-2.1 or newer, the file is redundant, therefore we
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 # avoid installing it.
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 all-local: charset.alias ref-add.sed ref-del.sed
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 charset_alias = $(DESTDIR)$(libdir)/charset.alias
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
11529
84f60140a7e2 Use automake *-local hooks without commands, for extensibility.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 11085
diff changeset
44 install-exec-local: install-exec-localcharset
84f60140a7e2 Use automake *-local hooks without commands, for extensibility.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 11085
diff changeset
45 install-exec-localcharset: all-local
11084
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
46 if test $(GLIBC21) = no; then \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
47 case '$(host_os)' in \
11085
b79789bdd93c Don't install charset.alias on MacOS X >= 10.3.
Bruno Haible <bruno@clisp.org>
parents: 11084
diff changeset
48 darwin[56]*) \
b79789bdd93c Don't install charset.alias on MacOS X >= 10.3.
Bruno Haible <bruno@clisp.org>
parents: 11084
diff changeset
49 need_charset_alias=true ;; \
b79789bdd93c Don't install charset.alias on MacOS X >= 10.3.
Bruno Haible <bruno@clisp.org>
parents: 11084
diff changeset
50 darwin* | cygwin* | mingw* | pw32* | cegcc*) \
11084
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 *) \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
53 need_charset_alias=true ;; \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
54 esac ; \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
55 else \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
56 need_charset_alias=false ; \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
57 fi ; \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
58 if $$need_charset_alias; then \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
59 $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
60 fi ; \
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 if test -f $(charset_alias); then \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 rm -f $(charset_tmp) ; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 else \
11084
1392a1800208 Don't install charset.alias on mingw and Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 9551
diff changeset
66 if $$need_charset_alias; then \
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 rm -f $(charset_tmp) ; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 fi ; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 fi
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72
11529
84f60140a7e2 Use automake *-local hooks without commands, for extensibility.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 11085
diff changeset
73 uninstall-local: uninstall-localcharset
84f60140a7e2 Use automake *-local hooks without commands, for extensibility.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 11085
diff changeset
74 uninstall-localcharset: all-local
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 if test -f $(charset_alias); then \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 if grep '^# Packages using this file: $$' $(charset_tmp) \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 > /dev/null; then \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 rm -f $(charset_alias); \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 else \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 fi; \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 rm -f $(charset_tmp); \
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 fi
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 charset.alias: config.charset
11868
67c2b22aff08 annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents: 11529
diff changeset
87 $(AM_V_GEN)rm -f t-$@ $@ && \
67c2b22aff08 annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents: 11529
diff changeset
88 $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 mv t-$@ $@
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 SUFFIXES += .sed .sin
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 .sin.sed:
11868
67c2b22aff08 annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents: 11529
diff changeset
93 $(AM_V_GEN)rm -f t-$@ $@ && \
67c2b22aff08 annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents: 11529
diff changeset
94 sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 mv t-$@ $@
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 CLEANFILES += charset.alias ref-add.sed ref-del.sed
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 Include:
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 "localcharset.h"
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101
5251
42b53a22aee5 Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents: 4383
diff changeset
102 License:
9091
d19ce23d01b0 Use the synonymous term "LGPLv2+".
Bruno Haible <bruno@clisp.org>
parents: 7497
diff changeset
103 LGPLv2+
5251
42b53a22aee5 Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents: 4383
diff changeset
104
4197
3ccc6d0d52bb Add a Maintainer.
Bruno Haible <bruno@clisp.org>
parents: 4172
diff changeset
105 Maintainer:
3ccc6d0d52bb Add a Maintainer.
Bruno Haible <bruno@clisp.org>
parents: 4172
diff changeset
106 Bruno Haible