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 | |
---|
20 | AUTOMAKE_OPTIONS = 1.2 gnits |
---|
21 | |
---|
22 | noinst_LIBRARIES = libnlsut.a |
---|
23 | |
---|
24 | EXTRA_DIST = alloca.c config.charset error.c getline.c memset.c memmove.c \ |
---|
25 | printf-prs.c ref-add.sin ref-del.sin stpcpy.c stpncpy.c strcasecmp.c \ |
---|
26 | strcspn.c strncasecmp.c strstr.c strtol.c strtoul.c vasprintf.c \ |
---|
27 | gen-lbrkprop.c 3level.h |
---|
28 | |
---|
29 | libnlsut_a_SOURCES = basename.c c-ctype.c concatpath.c fstrcmp.c \ |
---|
30 | getopt.c getopt1.c hash.c linebreak.c localcharset.c mbswidth.c obstack.c \ |
---|
31 | xgetcwd.c xmalloc.c xstrdup.c |
---|
32 | |
---|
33 | libnlsut_a_LIBADD = @ALLOCA@ @LIBOBJS@ |
---|
34 | |
---|
35 | noinst_HEADERS = c-ctype.h error.h fstrcmp.h getline.h getopt.h hash.h \ |
---|
36 | lbrkprop.h linebreak.h mbswidth.h obstack.h printf-parse.h printf.h system.h \ |
---|
37 | pathmax.h |
---|
38 | |
---|
39 | DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@ |
---|
40 | INCLUDES = -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 | |
---|
50 | all-local: charset.alias ref-add.sed ref-del.sed |
---|
51 | |
---|
52 | charset_alias = $(DESTDIR)$(libdir)/charset.alias |
---|
53 | charset_tmp = $(DESTDIR)$(libdir)/charset.tmp |
---|
54 | install-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 | |
---|
68 | uninstall-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 | |
---|
80 | charset.alias: config.charset |
---|
81 | $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ |
---|
82 | mv t-$@ $@ |
---|
83 | |
---|
84 | SUFFIXES = .sed .sin |
---|
85 | .sin.sed: |
---|
86 | sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@ |
---|
87 | mv t-$@ $@ |
---|
88 | |
---|
89 | CLEANFILES = charset.alias ref-add.sed ref-del.sed |
---|