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)
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 \
38 file-type.c file-type.h \
42 full-write.c full-write.h \
50 hard-locale.c hard-locale.h \
55 linebuffer.c linebuffer.h \
57 long-options.c long-options.h \
58 makepath.c makepath.h \
59 mbswidth.c mbswidth.h \
61 memcasecmp.c memcasecmp.h \
63 modechange.c modechange.h \
65 path-concat.c path-concat.h \
69 quotearg.c quotearg.h \
70 readtokens.c readtokens.h \
73 safe-read.c safe-read.h \
75 save-cwd.c save-cwd.h \
84 unicodeio.c unicodeio.h \
87 version-etc.c version-etc.h \
92 xmemcoll.c xmemcoll.h \
93 xreadlink.c xreadlink.h \
102 libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
103 libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
106 BUILT_SOURCES = getdate.c lstat.c stat.c unlocked-io.h
107 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
108 DISTCLEANFILES = lstat.c stat.c unlocked-io.h
110 EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin gen-uio
114 -e 's/@xstat@/lstat/g' \
115 -e '/_LSTAT_ONLY@/d' \
116 -e '/@BEGIN_STAT_ONLY@/,/@END_STAT_ONLY@/d' \
117 $(srcdir)/xstat.in > t-$@
123 -e 's/@xstat@/stat/g' \
124 -e '/_STAT_ONLY@/d' \
125 -e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
126 $(srcdir)/xstat.in > t-$@
129 # The following is needed in order to install a simple file in $(libdir)
130 # which is shared with other installed packages. We use a list of referencing
131 # packages so that "make uninstall" will remove the file if and only if it
132 # is not used by another installed package.
133 # On systems with glibc-2.1 or newer, the file is redundant, therefore we
134 # avoid installing it.
136 all-local: charset.alias ref-add.sed ref-del.sed lstat.c stat.c unlocked-io.h
138 charset_alias = $(DESTDIR)$(libdir)/charset.alias
139 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
140 install-exec-local: all-local
141 $(mkinstalldirs) $(DESTDIR)$(libdir)
142 if test -f $(charset_alias); then \
143 sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
144 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
145 rm -f $(charset_tmp) ; \
147 if test @GLIBC21@ = no; then \
148 sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
149 $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
150 rm -f $(charset_tmp) ; \
154 uninstall-local: all-local
155 if test -f $(charset_alias); then \
156 sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
157 if grep '^# Packages using this file: $$' $(charset_tmp) \
159 rm -f $(charset_alias); \
161 $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
163 rm -f $(charset_tmp); \
166 charset.alias: config.charset
167 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
172 sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
175 CLEANFILES = charset.alias ref-add.sed ref-del.sed
177 ###############################################
179 # FIXME: remove this dependency once automake handles it.
180 # As of cvs automake of about 2002-01-13,
181 # this dependency is necessary to avoid a build failure
182 # when running `make check' before running `make all'.
183 # Otherwise, unlocked-io.h is not built before it's needed.
184 getdate$U.o: unlocked-io.h
186 # FIXME: CAUTION this list is a duplicate of one in ../Makefile.cfg.
188 clearerr feof ferror fflush fgets fputc fputs \
189 fread fwrite getc getchar putc putchar
191 unlocked-io.h: $(srcdir)/gen-uio Makefile.am
192 srcdir=$(srcdir) $(SHELL) $(srcdir)/gen-uio $(io_functions) > $@t