From e109e7606914792bbd5f2d805e64ae185b7cfb1c Mon Sep 17 00:00:00 2001 From: eck Date: Wed, 3 Jan 1990 16:58:22 +0000 Subject: [PATCH] changed genfiles to shell script --- lang/cem/libcc.ansi/ctype/.distr | 2 +- lang/cem/libcc.ansi/ctype/Makefile | 9 ++------- lang/cem/libcc.ansi/ctype/genfiles | 12 ++++++++++++ 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 lang/cem/libcc.ansi/ctype/genfiles diff --git a/lang/cem/libcc.ansi/ctype/.distr b/lang/cem/libcc.ansi/ctype/.distr index 3c8007007..b052351a1 100644 --- a/lang/cem/libcc.ansi/ctype/.distr +++ b/lang/cem/libcc.ansi/ctype/.distr @@ -1,4 +1,4 @@ LIST Makefile char.tab -genfiles.c +genfiles diff --git a/lang/cem/libcc.ansi/ctype/Makefile b/lang/cem/libcc.ansi/ctype/Makefile index c3e25a334..3a20ca5ab 100644 --- a/lang/cem/libcc.ansi/ctype/Makefile +++ b/lang/cem/libcc.ansi/ctype/Makefile @@ -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 diff --git a/lang/cem/libcc.ansi/ctype/genfiles b/lang/cem/libcc.ansi/ctype/genfiles new file mode 100644 index 000000000..7c115e991 --- /dev/null +++ b/lang/cem/libcc.ansi/ctype/genfiles @@ -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 + +int (xxxx)(int c) { + return xxxx(c); +} +EOF +done -- 2.34.1