source: trunk/third/gettext/lib/Makefile.am @ 16931

Revision 16931, 3.1 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16930, which included commits to RCS files with non-trunk default branches.
Line 
1## Makefile for the support lib subdirectory of the GNU NLS Utilities
2## Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
3##
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2, or (at your option)
7## any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18## Process this file with automake to produce Makefile.in.
19
20AUTOMAKE_OPTIONS = 1.2 gnits
21
22noinst_LIBRARIES = libnlsut.a
23
24EXTRA_DIST = alloca.c config.charset error.c getline.c memset.c memmove.c \
25printf-prs.c ref-add.sin ref-del.sin stpcpy.c stpncpy.c strcasecmp.c \
26strcspn.c strncasecmp.c strstr.c strtol.c strtoul.c vasprintf.c \
27gen-lbrkprop.c 3level.h
28
29libnlsut_a_SOURCES = basename.c c-ctype.c concatpath.c fstrcmp.c \
30getopt.c getopt1.c hash.c linebreak.c localcharset.c mbswidth.c obstack.c \
31xgetcwd.c xmalloc.c xstrdup.c
32
33libnlsut_a_LIBADD = @ALLOCA@ @LIBOBJS@
34
35noinst_HEADERS = c-ctype.h error.h fstrcmp.h getline.h getopt.h hash.h \
36lbrkprop.h linebreak.h mbswidth.h obstack.h printf-parse.h printf.h system.h \
37pathmax.h
38
39DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
40INCLUDES = -I. -I$(srcdir) -I.. -I../intl
41
42
43# The following is needed in order to install a simple file in $(libdir)
44# which is shared with other installed packages. We use a list of referencing
45# packages so that "make uninstall" will remove the file if and only if it
46# is not used by another installed package.
47# On systems with glibc-2.1 or newer, the file is redundant, therefore we
48# avoid installing it.
49
50all-local: charset.alias ref-add.sed ref-del.sed
51
52charset_alias = $(DESTDIR)$(libdir)/charset.alias
53charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
54install-exec-local: all-local
55        $(mkinstalldirs) $(DESTDIR)$(libdir)
56        if test -f $(charset_alias); then \
57          sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
58          $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
59          rm -f $(charset_tmp) ; \
60        else \
61          if test @GLIBC21@ = no; then \
62            sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
63            $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
64            rm -f $(charset_tmp) ; \
65          fi ; \
66        fi
67
68uninstall-local: all-local
69        if test -f $(charset_alias); then \
70          sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
71          if grep '^# Packages using this file: $$' $(charset_tmp) \
72              > /dev/null; then \
73            rm -f $(charset_alias); \
74          else \
75            $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
76          fi; \
77          rm -f $(charset_tmp); \
78        fi
79
80charset.alias: config.charset
81        $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
82        mv t-$@ $@
83
84SUFFIXES = .sed .sin
85.sin.sed:
86        sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
87        mv t-$@ $@
88
89CLEANFILES = charset.alias ref-add.sed ref-del.sed
Note: See TracBrowser for help on using the repository browser.