changed genfiles to shell script

This commit is contained in:
eck 1990-01-03 16:58:22 +00:00
parent a8f0aa6016
commit e109e76069
3 changed files with 15 additions and 8 deletions

View file

@ -1,4 +1,4 @@
LIST
Makefile
char.tab
genfiles.c
genfiles

View file

@ -5,16 +5,11 @@ clean:
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

View file

@ -0,0 +1,12 @@
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