1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
3 AUTOMAKE_OPTIONS = ../src/ansi2knr
5 noinst_LIBRARIES = libfetish.a
7 INCLUDES = -I.. -I$(srcdir) -I../intl
8 DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
10 ## Put relatively complex files at the beginning of the list so
11 ## that parallel compiles finish a tiny bit sooner. I don't see
12 ## a way to make regex.c appear earlier in the list, since it's
13 ## added by automake, but on systems with an up to date GNU libc,
14 ## regex.c isn't even compiled.
15 libfetish_a_SOURCES = \
19 posixver.c posixver.h \
21 getopt.c getopt.h getopt1.c \
23 hash-pjw.c hash-pjw.h \
26 argmatch.c argmatch.h \
27 backupfile.c backupfile.h \
31 closeout.c closeout.h \
37 filemode.c filemode.h \
41 full-write.c full-write.h \
48 hard-locale.c hard-locale.h \
53 linebuffer.c linebuffer.h \
55 long-options.c long-options.h \
56 makepath.c makepath.h \
57 mbswidth.c mbswidth.h \
59 memcasecmp.c memcasecmp.h \
61 modechange.c modechange.h \
63 path-concat.c path-concat.h \
67 quotearg.c quotearg.h \
68 readtokens.c readtokens.h \
71 safe-read.c safe-read.h \
73 save-cwd.c save-cwd.h \
81 unicodeio.c unicodeio.h \
84 version-etc.c version-etc.h \
89 xmemcoll.c xmemcoll.h \
90 xreadlink.c xreadlink.h \
99 libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
100 libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
103 BUILT_SOURCES = getdate.c lstat.c stat.c unlocked-io.h
104 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
105 DISTCLEANFILES = lstat.c stat.c unlocked-io.h
107 EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin gen-uio
111 -e 's/@xstat@/lstat/g' \
112 -e '/_LSTAT_ONLY@/d' \
113 -e '/@BEGIN_STAT_ONLY@/,/@END_STAT_ONLY@/d' \
114 $(srcdir)/xstat.in > $@-t
120 -e 's/@xstat@/stat/g' \
121 -e '/_STAT_ONLY@/d' \
122 -e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
123 $(srcdir)/xstat.in > $@-t
126 # The following is needed in order to install a simple file in $(libdir)
127 # which is shared with other installed packages. We use a list of referencing
128 # packages so that "make uninstall" will remove the file if and only if it
129 # is not used by another installed package.
130 # On systems with glibc-2.1 or newer, the file is redundant, therefore we
131 # avoid installing it.
133 all-local: charset.alias ref-add.sed ref-del.sed lstat.c stat.c unlocked-io.h
135 charset_alias = $(DESTDIR)$(libdir)/charset.alias
136 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
137 install-exec-local: all-local
138 $(mkinstalldirs) $(DESTDIR)$(libdir)
139 if test -f $(charset_alias); then \
140 sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
141 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
142 rm -f $(charset_tmp) ; \
144 if test @GLIBC21@ = no; then \
145 sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
146 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
147 rm -f $(charset_tmp) ; \
151 uninstall-local: all-local
152 if test -f $(charset_alias); then \
153 sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
154 if grep '^# Packages using this file: $$' $(charset_tmp) \
156 rm -f $(charset_alias); \
158 $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
160 rm -f $(charset_tmp); \
163 charset.alias: config.charset
164 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
169 sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > $@-t
172 CLEANFILES = charset.alias ref-add.sed ref-del.sed
174 ###############################################
176 # FIXME: remove this dependency once automake handles it.
177 # As of cvs automake of about 2002-01-13,
178 # this dependency is necessary to avoid a build failure
179 # when running `make check' before running `make all'.
180 # Otherwise, unlocked-io.h is not built before it's needed.
181 getdate$U.o: unlocked-io.h
183 # FIXME: CAUTION this list is a duplicate of one in ../Makefile.cfg.
185 clearerr feof ferror fflush fgets fputc fputs \
186 fread fwrite getc getchar putc putchar
188 unlocked-io.h: $(srcdir)/gen-uio Makefile.am
189 srcdir=$(srcdir) $(SHELL) $(srcdir)/gen-uio $(io_functions) > $@t