diff options
author | Larry Wall <lwall@netlabs.com> | 1993-10-07 23:00:00 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1993-10-07 23:00:00 +0000 |
commit | 79072805bf63abe5b5978b5928ab00d360ea3e7f (patch) | |
tree | 96688fcd69f9c8d2110e93c350b4d0025eaf240d /embed_h.SH | |
parent | e334a159a5616cab575044bafaf68f75b7bb3a16 (diff) | |
download | perl-79072805bf63abe5b5978b5928ab00d360ea3e7f.tar.gz |
perl 5.0 alpha 2perl-5a2
[editor's note: from history.perl.org. The sparc executables
originally included in the distribution are not in this commit.]
Diffstat (limited to 'embed_h.SH')
-rwxr-xr-x | embed_h.SH | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/embed_h.SH b/embed_h.SH new file mode 100755 index 0000000000..78838aabf7 --- /dev/null +++ b/embed_h.SH @@ -0,0 +1,48 @@ +#!/bin/sh + +cat <<'END' >embed.h +/* This file is derived from global.var and interp.var */ + +/* (Doing namespace management portably in C is really gross.) */ + +#ifdef EMBEDDED + +/* globals we need to hide from the world */ +END + +sed <global.var >>embed.h \ + -e 's/[ ]*#.*//' \ + -e '/^[ ]*$/d' \ + -e 's/\(.*\)/#define \1 PERL\1/' \ + -e 's/\(................ \) /\1/' + +cat <<'END' >> embed.h + +/* interpreter specific variables */ + +END + + +sed <interp.var >>embed.h \ + -e 's/[ ]*#.*//' \ + -e '/^[ ]*$/d' \ + -e 's/\(.*\)/#define \1 (curinterp->I\1)/' \ + -e 's/\(................ \) /\1/' + +cat <<'END' >> embed.h + +#else /* not embedded, so translate interpreter variables the other way... */ + +END + +sed <interp.var >>embed.h \ + -e 's/[ ]*#.*//' \ + -e '/^[ ]*$/d' \ + -e 's/\(.*\)/#define I\1 \1/' \ + -e 's/\(................ \) /\1/' + +cat <<'END' >> embed.h + +#endif +END + |