changeset 3514:161fe6c7023b

(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
author Jim Meyering <jim@meyering.net>
date Wed, 26 Sep 2001 08:11:01 +0000
parents 9c35b8dc7b1a
children da8b2fd54bb7
files lib/Makefile.am
diffstat 1 files changed, 3 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -98,7 +98,7 @@
 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 @@
   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 $@