4110
|
1 Description: |
4172
|
2 Return current locale's character encoding. |
4110
|
3 |
|
4 Files: |
|
5 lib/localcharset.h |
|
6 lib/localcharset.c |
|
7 lib/config.charset |
|
8 lib/ref-add.sin |
|
9 lib/ref-del.sin |
|
10 m4/codeset.m4 |
|
11 m4/glibc21.m4 |
|
12 m4/localcharset.m4 |
|
13 |
|
14 Depends-on: |
|
15 |
|
16 configure.ac: |
|
17 gl_LOCALCHARSET |
|
18 |
|
19 Makefile.am: |
|
20 lib_SOURCES += localcharset.h localcharset.c |
|
21 EXTRA_DIST += config.charset ref-add.sin ref-del.sin |
|
22 DEFS += -DLIBDIR=\"$(libdir)\" |
|
23 |
|
24 # The following is needed in order to install a simple file in $(libdir) |
|
25 # which is shared with other installed packages. We use a list of referencing |
|
26 # packages so that "make uninstall" will remove the file if and only if it |
|
27 # is not used by another installed package. |
|
28 # On systems with glibc-2.1 or newer, the file is redundant, therefore we |
|
29 # avoid installing it. |
|
30 |
|
31 all-local: charset.alias ref-add.sed ref-del.sed |
|
32 |
|
33 charset_alias = $(DESTDIR)$(libdir)/charset.alias |
|
34 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp |
|
35 install-exec-local: all-local |
|
36 test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir) |
|
37 if test -f $(charset_alias); then \ |
|
38 sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ |
|
39 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ |
|
40 rm -f $(charset_tmp) ; \ |
|
41 else \ |
|
42 if test @GLIBC21@ = no; then \ |
|
43 sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ |
|
44 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ |
|
45 rm -f $(charset_tmp) ; \ |
|
46 fi ; \ |
|
47 fi |
|
48 |
|
49 uninstall-local: all-local |
|
50 if test -f $(charset_alias); then \ |
|
51 sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ |
|
52 if grep '^# Packages using this file: $$' $(charset_tmp) \ |
|
53 > /dev/null; then \ |
|
54 rm -f $(charset_alias); \ |
|
55 else \ |
|
56 $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ |
|
57 fi; \ |
|
58 rm -f $(charset_tmp); \ |
|
59 fi |
|
60 |
|
61 charset.alias: config.charset |
|
62 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ |
|
63 mv t-$@ $@ |
|
64 |
|
65 SUFFIXES += .sed .sin |
|
66 .sin.sed: |
|
67 sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@ |
|
68 mv t-$@ $@ |
|
69 |
|
70 CLEANFILES += charset.alias ref-add.sed ref-del.sed |
|
71 |
|
72 Include: |
|
73 "localcharset.h" |
|
74 |