Permalink
Browse files

Eliminate global.sym, as makedef.pl can generate it internally.

global.sym was a file listing the exported symbols, generated by regen/embed.pl
from embed.fnc and regen/opcodes, which was only used by makedef.pl

Move the code that generates global.sym from regen/embed.pl to makedef.pl,
and thereby eliminate the need to ship a 907 line generated file.
  • Loading branch information...
1 parent cdde42a commit d500e60df9f652d9d80c9a5f4324d49e51e7f990 Nicholas Clark committed Aug 21, 2011
Showing with 55 additions and 969 deletions.
  1. +4 −7 Cross/Makefile-cross-SH
  2. +1 −2 MANIFEST
  3. +4 −7 Makefile.SH
  4. +1 −1 NetWare/Makefile
  5. +0 −1 Porting/makerel
  6. +8 −8 Porting/pumpkin.pod
  7. +5 −5 embed.fnc
  8. +0 −907 global.sym
  9. +0 −1 globvar.sym
  10. +26 −2 makedef.pl
  11. +0 −21 regen/embed.pl
  12. +1 −1 t/porting/regen.t
  13. +1 −1 util.c
  14. +1 −2 vms/descrip_mms.template
  15. +1 −1 win32/Makefile
  16. +1 −1 win32/Makefile.ce
  17. +1 −1 win32/makefile.mk
View
@@ -836,15 +836,14 @@ perly.c: perly.y
perly.h: perly.y
-@sh -c true
-SYM = global.sym globvar.sym perlio.sym
+SYM = globvar.sym perlio.sym
SYMH = perlvars.h intrpvar.h
CHMOD_W = chmod +w
# The following files are generated automatically
-# embed.pl: proto.h embed.h embedvar.h global.sym
-# perlapi.h perlapi.c
+# embed.pl: proto.h embed.h embedvar.h perlapi.h perlapi.c
# opcode.pl: opcode.h opnames.h pp_proto.h
# regcomp.pl: regnodes.h
# warnings.pl: warnings.h lib/warnings.pm
@@ -855,10 +854,8 @@ CHMOD_W = chmod +w
# with your existing copy of perl
# (make regen_headers is kept for backwards compatibility)
-AUTOGEN_FILES = opcode.h opnames.h pp_proto.h proto.h \
- embed.h embedvar.h global.sym \
- perlapi.h perlapi.c regnodes.h \
- warnings.h lib/warnings.pm
+AUTOGEN_FILES = opcode.h opnames.h pp_proto.h proto.h embed.h embedvar.h \
+ perlapi.h perlapi.c regnodes.h warnings.h lib/warnings.pm
.PHONY: regen_headers regen_all
View
@@ -3807,7 +3807,6 @@ form.h Public declarations for formats
generate_uudmap.c Generate uudmap.h, the uuencode decoding map
genpacksizetables.pl Generate the size tables for pack/unpack
globals.c File to declare global symbols (for shared library)
-global.sym Symbols that need hiding when embedded
globvar.sym Global variables that need hiding when embedded
gv.c Glob value code
gv.h Glob value header
@@ -4635,7 +4634,7 @@ regcomp.c Regular expression compiler
regcomp.h Private declarations for above
regcomp.sym Data for regnodes.h
regen/embed_lib.pl Reads embed.fnc and regen/opcodes
-regen/embed.pl Produces {embed,embedvar,proto}.h, global.sym
+regen/embed.pl Produces {embed,embedvar,proto}.h
regen/keywords.pl Program to write keywords.h
regen/mg_vtable.pl generate mg_vtable.h
regen/mk_PL_charclass.pl Populate the PL_charclass table
View
@@ -1120,15 +1120,14 @@ perly.c: perly.y
perly.h: perly.y
-@sh -c true
-SYM = global.sym globvar.sym perlio.sym
+SYM = globvar.sym perlio.sym
SYMH = perlvars.h intrpvar.h
CHMOD_W = chmod +w
# The following files are generated automatically
-# embed.pl: proto.h embed.h embedvar.h global.sym
-# perlapi.h perlapi.c
+# embed.pl: proto.h embed.h embedvar.h perlapi.h perlapi.c
# opcode.pl: opcode.h opnames.h pp_proto.h
# regcomp.pl: regnodes.h
# warnings.pl: warnings.h lib/warnings.pm
@@ -1139,10 +1138,8 @@ CHMOD_W = chmod +w
# with your existing copy of perl
# (make regen_headers is kept for backwards compatibility)
-AUTOGEN_FILES = opcode.h opnames.h pp_proto.h proto.h \
- embed.h embedvar.h global.sym \
- perlapi.h perlapi.c regnodes.h \
- warnings.h lib/warnings.pm
+AUTOGEN_FILES = opcode.h opnames.h pp_proto.h proto.h embed.h embedvar.h \
+ perlapi.h perlapi.c regnodes.h warnings.h lib/warnings.pm
.PHONY: regen_headers regen_all
View
@@ -1061,7 +1061,7 @@ $(PERLIMPLIB): perllib.imp
# $(XCOPY) $(PERLIMPLIB) $(COREDIR)
# @echo $(PERLIMPLIB) Done
-perllib.imp : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\makedef.pl
+perllib.imp : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
# $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=def $(ADD_BUILDOPT) \
# CCTYPE=$(CCTYPE) TARG_DIR=..\ > perllib.def
@echo (Perl) > perl.imp
View
@@ -139,7 +139,6 @@ my @writables = qw(
proto.h
embed.h
embedvar.h
- global.sym
overload.c
overload.h
mg_vtable.h
View
@@ -450,14 +450,14 @@ and effort by manually running C<make regen_headers> myself rather
than answering all the questions and complaints about the failing
command.
-=head2 global.sym, and perlio.sym
+=head2 globvar.sym, and perlio.sym
Make sure these files are up-to-date. Read the comments in these
files and in F<perl_exp.SH> to see what to do.
=head2 Binary compatibility
-If you do change F<global.sym> think carefully about
+If you do change F<embed.fnc> think carefully about
what you are doing. To the extent reasonable, we'd like to maintain
source and binary compatibility with older releases of perl. That way,
extensions built under one version of perl will continue to work with
@@ -814,18 +814,18 @@ conflicting needs of dynamic loading and namespace protection.
For dynamic loading to work on AIX (and VMS) we need to provide a list
of symbols to be exported. This is done by the script F<perl_exp.SH>,
-which reads F<global.sym>. Thus, the C<pause>
-symbol would have to be added to F<global.sym> So far, so good.
+which reads F<embed.fnc>. Thus, the C<pause>
+symbol would have to be added to F<embed.fnc> So far, so good.
On the other hand, one of the goals of Perl5 is to make it easy to
either extend or embed perl and link it with other libraries. This
means we have to be careful to keep the visible namespace "clean".
That is, we don't want perl's global variables to conflict with
those in the other application library. Although this work is still
in progress, the way it is currently done is via the F<embed.h> file.
-This file is built from the F<global.sym> file,
+This file is built from the F<embed.fnc> file,
since those files already list the globally visible symbols. If we
-had added C<pause> to global.sym, then F<embed.h> would contain the
+had added C<pause> to F<embed.fnc>, then F<embed.h> would contain the
line
#define pause Perl_pause
@@ -872,7 +872,7 @@ My explanatory comment in patch 5.003_05 said:
applies to SCO. This shows the perils of having internal
functions with the same name as external library functions :-).
-Now, we can safely put C<my_chsize> in F<global.sym>, export it, and
+Now, we can safely put C<my_chsize> in C<embed.fnc>, export it, and
hide it with F<embed.h>.
To be consistent with what I did for C<pause>, I probably should have
@@ -942,7 +942,7 @@ then in some file (e.g. F<util.c> or F<doio.c>) do
#endif
Alternatively, we could just always use C<chsize> everywhere and move
-C<chsize> from F<global.sym> to the end of F<perl_exp.SH>. That would
+C<chsize> from F<embed.fnc> to the end of F<perl_exp.SH>. That would
probably be fine as long as our C<chsize> function agreed with all the
C<chsize> function prototypes in the various systems we'll be using.
As long as the prototypes in actual use don't vary that much, this is
View
@@ -12,7 +12,7 @@
:
: A Member of public API:
:
-: add entry to global.sym (unless x or m);
+: add entry to the list of exported symbols (unless x or m);
: any doc entry goes in perlapi.pod rather than perlintern.pod
: makes '#define foo Perl_foo' scope not just for PERL_CORE/PERL_EXT
:
@@ -23,7 +23,7 @@
: b Binary backward compatibility; function is a macro
: but has also Perl_ implementation (which is exported):
:
-: add entry to global.sym;
+: add entry to the list of exported symbols;
: don't define PERL_ARGS_ASSERT_FOO
:
: D Function is deprecated:
@@ -59,7 +59,7 @@
: m Implemented as a macro:
:
: suppress proto.h entry
-: suppress global.sym entry
+: suppress entry in the list of exported symbols
: suppress embed.h entry
:
: n Has no implicit interpreter/thread context argument:
@@ -107,11 +107,11 @@
:
: X Explicitly exported:
:
-: add entry to global.sym, unless x or m
+: add entry to the list of exported symbols, unless x or m
:
: x Not exported
:
-: suppress entry in global.sym
+: suppress entry in the list of exported symbols
:
: (see also L<perlguts/Internal Functions> for those flags.)
:
Oops, something went wrong.

0 comments on commit d500e60

Please sign in to comment.