This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
applied patch, tweaked opcode.pl for PERL_OBJECT, and regen opcode.h
[perl5.git] / perl_exp.SH
1 #!/bin/sh
2 #
3 # Written: Nov 1994 Wayne Scott (wscott@ichips.intel.com)
4 #
5 # Create the export list for perl.
6 # Needed by AIX to do dynamic linking.
7 #
8 # This simple program relys on 'global.sym' and other *.sym files
9 # being up to date with all of the global symbols that a dynamic
10 # link library might want to access.
11 #
12 # Most symbols have a Perl_ prefix because that's what embed.h sticks
13 # in front of them.  Variations depend on binary compatibility with
14 # Perl 5.003.
15 #
16
17 case $CONFIG in
18 '')
19         if test -f config.sh; then TOP=.;
20         elif test -f ../config.sh; then TOP=..;
21         elif test -f ../../config.sh; then TOP=../..;
22         elif test -f ../../../config.sh; then TOP=../../..;
23         elif test -f ../../../../config.sh; then TOP=../../../..;
24         else
25                 echo "Can't find config.sh."; exit 1
26         fi
27         . $TOP/config.sh
28         ;;
29 esac
30 : This forces SH files to create target in same directory as SH file.
31 : This is so that make depend always knows where to find SH derivatives.
32 case "$0" in
33 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
34 esac
35
36 echo "Extracting perl.exp"
37
38 rm -f perl.exp
39 echo "#!" > perl.exp
40
41 # No compat3 since and including the 5.004_50.
42 # perlio.sym added later if needed.
43 syms=`ls -1 *.sym|egrep -v 'compat3|perlio'`
44
45 sed -n '/^[A-Za-z]/ s/^/Perl_/p' $syms                  >> perl.exp
46
47 sed -n 's/^PERLVAR.*(G\([^,[]*\).*/Perl_\1/p' perlvars.h >> perl.exp
48 sed -n 's/^PERLVAR.*(T\([^,[]*\).*/Perl_\1/p' thrdvar.h  >> perl.exp
49
50
51 # If we use the PerlIO abstraction layer, add its symbols
52 #
53
54 if [ $useperlio = "define" ]
55 then
56         grep '^[A-Za-z]' perlio.sym >> perl.exp
57 fi
58
59 #
60 # Extra globals not included above (including a few that might
61 # not actually be defined, but there's no harm in that).
62 #
63
64 cat <<END >> perl.exp
65 perl_init_i18nl10n
66 perl_init_i18nl14n
67 perl_new_collate
68 perl_new_ctype
69 perl_new_numeric
70 perl_set_numeric_local
71 perl_set_numeric_standard
72 perl_alloc
73 perl_construct
74 perl_destruct
75 perl_free
76 perl_parse
77 perl_run
78 perl_get_sv
79 perl_get_av
80 perl_get_hv
81 perl_get_cv
82 perl_call_argv
83 perl_call_pv
84 perl_call_method
85 perl_call_sv
86 perl_eval_pv
87 perl_eval_sv
88 perl_require_pv
89 Mymalloc
90 Mycalloc
91 Myremalloc
92 Myfree
93 Perl_malloc
94 Perl_calloc
95 Perl_realloc
96 Perl_free
97 END
98
99 # The shebang line nicely sorts as the first one.
100 sort -o perl.exp -u perl.exp
101
102 # eof