Commit | Line | Data |
---|---|---|
79072805 | 1 | #!/bin/sh |
2 | ||
3 | cat <<'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 */ | |
11 | END | |
12 | ||
8990e307 | 13 | sed <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 | ||
19 | cat <<'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 | |
27 | END | |
28 | ||
29 | ||
8990e307 | 30 | sed <interp.sym >>embed.h \ |
79072805 | 31 | -e 's/[ ]*#.*//' \ |
32 | -e '/^[ ]*$/d' \ | |
33 | -e 's/\(.*\)/#define \1 (curinterp->I\1)/' \ | |
34 | -e 's/\(................ \) /\1/' | |
35 | ||
36 | cat <<'END' >> embed.h | |
37 | ||
8990e307 | 38 | #else /* not multiple, so translate interpreter symbols the other way... */ |
79072805 | 39 | |
40 | END | |
41 | ||
8990e307 | 42 | sed <interp.sym >>embed.h \ |
79072805 | 43 | -e 's/[ ]*#.*//' \ |
44 | -e '/^[ ]*$/d' \ | |
45 | -e 's/\(.*\)/#define I\1 \1/' \ | |
46 | -e 's/\(................ \) /\1/' | |
47 | ||
48 | cat <<'END' >> embed.h | |
49 | ||
8990e307 | 50 | #endif /* MULTIPLICITY */ |
79072805 | 51 | END |
52 |