f5362df5a5e3d45465d19b3f641609a856bd6d34
[platform/upstream/glib.git] / glib / libcharset / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
3
4 INCLUDES =                      \
5         -DLIBDIR=\"$(libdir)\" $(config_h_INCLUDES)
6
7 noinst_LTLIBRARIES = libcharset.la
8
9 libcharset_la_SOURCES =         \
10         libcharset.h            \
11         localcharset.h          \
12         localcharset.c
13
14 EXTRA_DIST +=                   \
15         README                  \
16         config.charset          \
17         ref-add.sin             \
18         ref-del.sin             \
19         glibc21.m4              \
20         codeset.m4              \
21         update.sh               \
22         make-patch.sh           \
23         libcharset-glib.patch
24
25 charset_alias = $(DESTDIR)$(libdir)/charset.alias
26 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
27 install-exec-local: all-local
28         $(mkinstalldirs) $(DESTDIR)$(libdir)
29         if test -f $(charset_alias); then \
30           sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
31           $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
32           rm -f $(charset_tmp) ; \
33         else \
34           if test @GLIBC21@ = no; then \
35             sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
36             $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
37             rm -f $(charset_tmp) ; \
38           fi ; \
39         fi
40
41 uninstall-local: all-local
42         if test -f $(charset_alias); then \
43           sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
44           if grep '^# Packages using this file: $$' $(charset_tmp) \
45               > /dev/null; then \
46             rm -f $(charset_alias); \
47           else \
48             $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
49           fi; \
50           rm -f $(charset_tmp); \
51         fi
52
53 charset.alias: config.charset
54         $(AM_V_GEN) $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
55         @mv t-$@ $@
56
57 all-local: ref-add.sed ref-del.sed charset.alias
58
59 SUFFIXES = .sed .sin
60 .sin.sed:
61         $(AM_V_GEN) $(SED) -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
62         @mv t-$@ $@
63
64 CLEANFILES = charset.alias ref-add.sed ref-del.sed