changed genfiles to shell script
This commit is contained in:
parent
a8f0aa6016
commit
e109e76069
3 changed files with 15 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
LIST
|
||||
Makefile
|
||||
char.tab
|
||||
genfiles.c
|
||||
genfiles
|
||||
|
|
|
@ -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
|
||||
|
|
12
lang/cem/libcc.ansi/ctype/genfiles
Normal file
12
lang/cem/libcc.ansi/ctype/genfiles
Normal 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
|
Loading…
Reference in a new issue