isalnum.c isalpha.c iscntrl.c isdigit.c isgraph.c \
islower.c isprint.c ispunct.c isspace.c isupper.c \
isxdigit.c isascii.c tolower.c toupper.c chartab.c \
- genfiles OLIST
-
-# genfiles should not be compiled with $(CC) because we might be
-# cross-compiling, in which case $(CC) does not yield a runnable object.
-genfiles: genfiles.c
- cc genfiles.c -o genfiles
+ OLIST
chartab.c: char.tab
tabgen -fchar.tab > chartab.c
isalnum.c isalpha.c iscntrl.c isdigit.c isgraph.c islower.c isprint.c \
ispunct.c isspace.c isupper.c isxdigit.c isascii.c tolower.c toupper.c: genfiles
- genfiles
+ sh genfiles
--- /dev/null
+
+for i in isalnum isalpha iscntrl isdigit isgraph islower isprint \
+ ispunct isspace isupper isxdigit isascii toupper tolower
+do
+sed "s/xxxx/$i/" > $i.c << 'EOF'
+#include <ctype.h>
+
+int (xxxx)(int c) {
+ return xxxx(c);
+}
+EOF
+done