perl 5.0 alpha 6
[p5sagit/p5-mst-13.2.git] / embed_h.SH
CommitLineData
79072805 1#!/bin/sh
2
3cat <<'END' >embed.h
8990e307 4/* This file is derived from global.sym and interp.sym */
79072805 5
6/* (Doing namespace management portably in C is really gross.) */
7
463ee0b2 8#ifdef EMBED
79072805 9
10/* globals we need to hide from the world */
11END
12
8990e307 13sed <global.sym >>embed.h \
79072805 14 -e 's/[ ]*#.*//' \
15 -e '/^[ ]*$/d' \
8990e307 16 -e 's/\(.*\)/#define \1 perl_\1/' \
79072805 17 -e 's/\(................ \) /\1/'
18
19cat <<'END' >> embed.h
20
8990e307 21#endif /* EMBED */
463ee0b2 22
8990e307 23/* Put interpreter specific symbols into a struct? */
463ee0b2 24
25#ifdef MULTIPLICITY
79072805 26
27END
28
29
8990e307 30sed <interp.sym >>embed.h \
79072805 31 -e 's/[ ]*#.*//' \
32 -e '/^[ ]*$/d' \
33 -e 's/\(.*\)/#define \1 (curinterp->I\1)/' \
34 -e 's/\(................ \) /\1/'
35
36cat <<'END' >> embed.h
37
8990e307 38#else /* not multiple, so translate interpreter symbols the other way... */
79072805 39
40END
41
8990e307 42sed <interp.sym >>embed.h \
79072805 43 -e 's/[ ]*#.*//' \
44 -e '/^[ ]*$/d' \
45 -e 's/\(.*\)/#define I\1 \1/' \
46 -e 's/\(................ \) /\1/'
47
48cat <<'END' >> embed.h
49
8990e307 50#endif /* MULTIPLICITY */
79072805 51END
52