@@ -5,9 +5,8 @@ The preferred way is to use the Gnulib module 'localcharset'.
55Here are instructions if you don't want to use Gnulib. It's tedious,
66many small changes to your package:
77
8- * Copy the lib/ sourcefiles (localcharset.c, config.charset, ref-add.sin,
9- ref-del.sin) and the include file (include/localcharset.h) into your
10- package.
8+ * Copy the lib/ source file (localcharset.c) and the include file
9+ (include/localcharset.h) into your package.
1110
1211* Add the m4/ files (codeset.m4, fcntl_h.m4, glibc21.m4) to your aclocal.m4
1312 file or, if you are using automake, to your m4/ directory.
@@ -25,135 +24,11 @@ many small changes to your package:
2524* If you are not using automake, add rules to your Makefile.in:
2625
2726 - Augment target "all" by
28- localcharset.o charset.alias ref-add.sed ref-del.sed
29- with special rules for the last three:
30-
31- charset.alias: $(srcdir)/config.charset
32- $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
33- mv t-$@ $@
34-
35- ref-add.sed : $(srcdir)/ref-add.sin
36- sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-$@
37- mv t-$@ $@
38-
39- ref-del.sed : $(srcdir)/ref-del.sin
40- sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-$@
41- mv t-$@ $@
42-
43- - Augment target "install" by
44-
45- if test @GLIBC21@ = no; then \
46- case '@host_os@' in \
47- darwin[56]*) \
48- need_charset_alias=true ;; \
49- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
50- need_charset_alias=false ;; \
51- *) \
52- need_charset_alias=true ;; \
53- esac ; \
54- else \
55- need_charset_alias=false ; \
56- fi ; \
57- if $$need_charset_alias; then \
58- $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
59- fi ; \
60- if test -f $(DESTDIR)$(libdir)/charset.alias; then \
61- sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
62- $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
63- rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
64- else \
65- if $$need_charset_alias; then \
66- sed -f ref-add.sed charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
67- $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
68- rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
69- fi; \
70- fi
71-
72- - Augment target "installdirs" by
73-
74- if test @GLIBC21@ = no; then \
75- case '@host_os@' in \
76- darwin[56]*) \
77- need_charset_alias=true ;; \
78- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
79- need_charset_alias=false ;; \
80- *) \
81- need_charset_alias=true ;; \
82- esac ; \
83- else \
84- need_charset_alias=false ; \
85- fi ; \
86- if $$need_charset_alias; then \
87- $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
88- fi ; \
89-
90- - Augment target "uninstall" by
91-
92- if test -f $(DESTDIR)$(libdir)/charset.alias; then \
93- sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
94- if grep '^# Packages using this file: $$' $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \
95- rm -f $(DESTDIR)$(libdir)/charset.alias; \
96- else \
97- $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
98- fi; \
99- rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
100- fi
101-
102- - Augment target "clean" by
103-
104- rm -f charset.alias ref-add.sed ref-del.sed
27+ localcharset.o
10528
10629* If you are using automake, add rules to your Makefile.am:
10730
10831 - Augment the main *_SOURCES variable by
10932
11033 localcharset.h localcharset.c
11134
112- - Augment EXTRA_DIST by
113-
114- config.charset ref-add.sin ref-del.sin
115-
116- - Augment target "all-local" by
117-
118- charset.alias ref-add.sed ref-del.sed
119-
120- - Add the lines:
121-
122- charset_alias = $(DESTDIR)$(libdir)/charset.alias
123- charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
124- install-exec-local: all-local
125- test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
126- if test -f $(charset_alias); then \
127- sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
128- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
129- rm -f $(charset_tmp) ; \
130- else \
131- if test @GLIBC21@ = no; then \
132- sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
133- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
134- rm -f $(charset_tmp) ; \
135- fi ; \
136- fi
137-
138- uninstall-local: all-local
139- if test -f $(charset_alias); then \
140- sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
141- if grep '^# Packages using this file: $$' $(charset_tmp) \
142- > /dev/null; then \
143- rm -f $(charset_alias); \
144- else \
145- $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
146- fi; \
147- rm -f $(charset_tmp); \
148- fi
149-
150- charset.alias: config.charset
151- $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
152- mv t-$@ $@
153-
154- SUFFIXES = .sed .sin
155- .sin.sed:
156- sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
157- mv t-$@ $@
158-
159- CLEANFILES = charset.alias ref-add.sed ref-del.sed
0 commit comments