summaryrefslogtreecommitdiff
path: root/lib/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-26 08:11:01 +0000
committerJim Meyering <jim@meyering.net>2001-09-26 08:11:01 +0000
commit5b60bebabb2a5bb76aed788d70929f9dfd159928 (patch)
treec1e6ad995cd80df506b042407e8d71c354dcef2b /lib/Makefile.am
parent29f888398dabcff2ab5224ef434cbe97a2f0fbf8 (diff)
downloadcoreutils-5b60bebabb2a5bb76aed788d70929f9dfd159928.tar.xz
(unlocked-io.h): Rewrite to use a separate script,
rather than trying to embed it here. (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
Diffstat (limited to 'lib/Makefile.am')
-rw-r--r--lib/Makefile.am20
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index d17b9e035..aca653950 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -98,7 +98,7 @@ BUILT_SOURCES = getdate.c lstat.c stat.c unlocked-io.h
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = lstat.c stat.c unlocked-io.h
-EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin unlocked-io.hin
+EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin gen-uio
lstat.c: xstat.in
sed \
-e '/@IGNORE@/d' \
@@ -173,20 +173,6 @@ io_functions = \
clearerr feof ferror fflush fgets fputc fputs \
fread fwrite getc getchar putc putchar
-a_z=abcdefghijklmnopqrstuvwxyz
-A_Z=ABCDEFGHIJKLMNOPQRSTUVWXYZ
-
-unlocked-io.h: $(srcdir)/unlocked-io.hin Makefile.am
- tmp=t$$$$; \
- for f in $(io_functions); do \
- u=`echo $$f|tr $(a_z) $(A_Z)`; \
- echo "# if HAVE_$${u}_UNLOCKED" ; \
- echo "# undef $$f" ; \
- echo "# define $$f(S) $${f}_unlocked (S)" ; \
- echo '# endif' ; \
- done > $$tmp; \
- sed '/^@replace_this@$$/r '$$tmp $(srcdir)/unlocked-io.hin \
- | sed '/^@replace_this@$$/d' \
- > $@t; \
- rm -f $$tmp; \
+unlocked-io.h: $(srcdir)/gen-uio Makefile.am
+ srcdir=$(srcdir) $(srcdir)/gen-uio $(io_functions) > $@t
mv $@t $@