Mercurial > hg > octave-lojdl > gnulib-hg
annotate modules/localcharset @ 7497:6a764f23e302
gnulib-tool now synthesizes the EXTRA_DIST line.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 13 Oct 2006 12:40:22 +0000 |
parents | 9ff9e0f3d681 |
children | d19ce23d01b0 |
rev | line source |
---|---|
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: | |
7230
1a8d338654d5
Prefer using configmake.h instead of augmenting DEFS.
Bruno Haible <bruno@clisp.org>
parents:
5251
diff
changeset
|
15 configmake |
4110 | 16 |
17 configure.ac: | |
18 gl_LOCALCHARSET | |
19 | |
20 Makefile.am: | |
21 lib_SOURCES += localcharset.h localcharset.c | |
22 | |
4383
2618bff2cc87
Avoid passive voice in comment.
Bruno Haible <bruno@clisp.org>
parents:
4369
diff
changeset
|
23 # We need the following in order to install a simple file in $(libdir) |
4110 | 24 # which is shared with other installed packages. We use a list of referencing |
25 # packages so that "make uninstall" will remove the file if and only if it | |
26 # is not used by another installed package. | |
27 # On systems with glibc-2.1 or newer, the file is redundant, therefore we | |
28 # avoid installing it. | |
29 | |
30 all-local: charset.alias ref-add.sed ref-del.sed | |
31 | |
32 charset_alias = $(DESTDIR)$(libdir)/charset.alias | |
33 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp | |
34 install-exec-local: all-local | |
4369
546156f97d12
Use $(...) notation, not @...@ for AC_REPLACE'd variables.
Jim Meyering <jim@meyering.net>
parents:
4197
diff
changeset
|
35 test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) |
4110 | 36 if test -f $(charset_alias); then \ |
37 sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ | |
38 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ | |
39 rm -f $(charset_tmp) ; \ | |
40 else \ | |
4369
546156f97d12
Use $(...) notation, not @...@ for AC_REPLACE'd variables.
Jim Meyering <jim@meyering.net>
parents:
4197
diff
changeset
|
41 if test $(GLIBC21) = no; then \ |
4110 | 42 sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ |
43 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ | |
44 rm -f $(charset_tmp) ; \ | |
45 fi ; \ | |
46 fi | |
47 | |
48 uninstall-local: all-local | |
49 if test -f $(charset_alias); then \ | |
50 sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ | |
51 if grep '^# Packages using this file: $$' $(charset_tmp) \ | |
52 > /dev/null; then \ | |
53 rm -f $(charset_alias); \ | |
54 else \ | |
55 $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ | |
56 fi; \ | |
57 rm -f $(charset_tmp); \ | |
58 fi | |
59 | |
60 charset.alias: config.charset | |
7267
8dffb67501b7
Make generated files be read-only.
Jim Meyering <jim@meyering.net>
parents:
7230
diff
changeset
|
61 rm -f t-$@ $@ |
4369
546156f97d12
Use $(...) notation, not @...@ for AC_REPLACE'd variables.
Jim Meyering <jim@meyering.net>
parents:
4197
diff
changeset
|
62 $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ |
4110 | 63 mv t-$@ $@ |
64 | |
65 SUFFIXES += .sed .sin | |
66 .sin.sed: | |
7267
8dffb67501b7
Make generated files be read-only.
Jim Meyering <jim@meyering.net>
parents:
7230
diff
changeset
|
67 rm -f t-$@ $@ |
4369
546156f97d12
Use $(...) notation, not @...@ for AC_REPLACE'd variables.
Jim Meyering <jim@meyering.net>
parents:
4197
diff
changeset
|
68 sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ |
4110 | 69 mv t-$@ $@ |
70 | |
71 CLEANFILES += charset.alias ref-add.sed ref-del.sed | |
72 | |
73 Include: | |
74 "localcharset.h" | |
75 | |
5251
42b53a22aee5
Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents:
4383
diff
changeset
|
76 License: |
42b53a22aee5
Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents:
4383
diff
changeset
|
77 LGPL |
42b53a22aee5
Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents:
4383
diff
changeset
|
78 |
4197 | 79 Maintainer: |
80 Bruno Haible |