Skip to content

Commit 42e7ab1

Browse files
committed
don't install charclass_invlists.h
... by renaming it to charclass_invlists.inc, which no longer matches the standard *.h pattern. charclass_invlists.inc is a large (4.5MB) generated file that is only needed at build time (specifically, by utf8.c as well as regcomp.c and regexec.c). Skipping this single file makes a standard perl install slightly smaller (from ~90MB to ~85MB in my tests).
1 parent 16cb535 commit 42e7ab1

File tree

14 files changed

+30
-24
lines changed

14 files changed

+30
-24
lines changed

MANIFEST

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ builtin.c Functions in the builtin:: namespace
1111
caretx.c C file to create $^X
1212
cflags.SH A script that emits C compilation flags per file
1313
Changes Describe how to peruse changes between releases
14-
charclass_invlists.h Compiled-in inversion lists
14+
charclass_invlists.inc Generated compiled-in inversion lists
1515
class.c Internals of the `use feature 'class'` object system
1616
CODE_OF_CONDUCT.md Information on where to find the Standards of Conduct
1717
config_h.SH Produces config.h
@@ -5580,7 +5580,7 @@ lib/unicore/Scripts.txt Unicode character database
55805580
lib/unicore/SpecialCasing.txt Unicode character database
55815581
lib/unicore/StandardizedVariants.txt Unicode character database
55825582
lib/unicore/TestNorm.pl Unicode character database
5583-
lib/unicore/uni_keywords.pl Indices into array in charclass_invlists.h
5583+
lib/unicore/uni_keywords.pl Indices into array in charclass_invlists.inc
55845584
lib/unicore/UnicodeData.txt Unicode character database
55855585
lib/unicore/version The version of the Unicode
55865586
lib/unicore/VerticalOrientation.txt Unicode character database
@@ -5956,7 +5956,7 @@ regen/lib_cleanup.pl Generate lib/.gitignore from MANIFEST
59565956
regen/locale.pl Program to write locale_table.h
59575957
regen/mg_vtable.pl generate mg_vtable.h
59585958
regen/miniperlmain.pl generate miniperlmain.c
5959-
regen/mk_invlists.pl Generates charclass_invlists.h
5959+
regen/mk_invlists.pl Generate charclass_invlists.inc, regexp_constants.h, uni_keywords.h
59605960
regen/mk_PL_charclass.pl Populate the PL_charclass table
59615961
regen/mph.pl Generate perfect hashes
59625962
regen/op_private Definitions of bits in an OP's op_private field

Makefile.SH

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -530,12 +530,11 @@ unidatadirs = lib/unicore/To lib/unicore/lib
530530
531531
h = \
532532
EXTERN.h INTERN.h XSUB.h \
533-
av.h charclass_invlists.h cop.h cv.h dosish.h embed.h form.h gv.h \
534-
handy.h hv.h hv_func.h iperlsys.h keywords.h l1_char_class_tab.h \
535-
mg.h mydtrace.h op.h op_reg_common.h opcode.h pad.h patchlevel.h \
536-
perl.h perlapi.h perly.h pp.h proto.h regcomp.h regcomp_internal.h \
537-
regexp.h regexp_constants.h scope.h sv.h thread.h unixish.h utf8.h \
538-
util.h warnings.h \
533+
av.h cop.h cv.h dosish.h embed.h form.h gv.h handy.h hv.h hv_func.h \
534+
iperlsys.h keywords.h l1_char_class_tab.h mg.h mydtrace.h op.h \
535+
op_reg_common.h opcode.h pad.h patchlevel.h perl.h perlapi.h perly.h pp.h \
536+
proto.h regcomp.h regcomp_internal.h regexp.h regexp_constants.h scope.h \
537+
sv.h thread.h unixish.h utf8.h util.h warnings.h \
539538
$(CONFIGH)
540539
541540
c_base = \

charclass_invlists.h renamed to charclass_invlists.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436059,5 +436059,5 @@ static const U8 WB_table[23][23] = {
436059436059
* 55d90fdc3f902e5c0b16b3378f9eaa36e970a1c09723c33de7d47d0370044012 lib/unicore/version
436060436060
* 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
436061436061
* c7ff8e0d207d3538c7feb4a1a152b159e5e902d20293b303569ea8323e84633e regen/mk_PL_charclass.pl
436062-
* e7ba2c6c0577fbb8b767a1305dbebcfeec166d11aa010cfbad9001c5f5971ee6 regen/mk_invlists.pl
436062+
* 0c9dc59e0c05912141ae41bce0bc55e48cae956407b7a1f12807a3d7ffea3b19 regen/mk_invlists.pl
436063436063
* ex: set ro ft=c: */

lib/unicore/README.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
#
163163
# perl regen/mk_L_charclass.pl
164164
#
165-
# and, regen charclass_invlists.h by
165+
# and, regen charclass_invlists.inc by
166166
#
167167
# perl regen/mk_invlists.pl
168168
#

lib/unicore/uni_keywords.pl

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

perl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3294,7 +3294,7 @@ typedef struct padname PADNAME;
32943294

32953295
#include "handy.h"
32963296
#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
3297-
# include "charclass_invlists.h"
3297+
# include "charclass_invlists.inc"
32983298
#endif
32993299

33003300
#if defined(USE_LARGE_FILES) && !defined(NO_64_BIT_RAWIO)

regcomp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14919,9 +14919,9 @@ S_parse_uniprop_string(pTHX_
1491914919
Titlecase Mapping (both full and simple)
1492014920
Uppercase Mapping (both full and simple)
1492114921
* Handle these the same way Name is done, using say, _wild.pm, but
14922-
* having both loose and full, like in charclass_invlists.h.
14922+
* having both loose and full, like in charclass_invlists.inc.
1492314923
* Perhaps move block and script to that as they are somewhat large
14924-
* in charclass_invlists.h.
14924+
* in charclass_invlists.inc.
1492514925
* For properties where the default is the code point itself, such
1492614926
* as any of the case changing mappings, the string would otherwise
1492714927
* consist of all Unicode code points in UTF-8 strung together.
@@ -14935,7 +14935,7 @@ S_parse_uniprop_string(pTHX_
1493514935
} /* End of is a wildcard subppattern */
1493614936

1493714937
/* \p{name=...} is handled specially. Instead of using the normal
14938-
* mechanism involving charclass_invlists.h, it uses _charnames.pm
14938+
* mechanism involving charclass_invlists.inc, it uses _charnames.pm
1493914939
* which has the necessary (huge) data accessible to it, and which
1494014940
* doesn't get loaded unless necessary. The legal syntax for names is
1494114941
* somewhat different than other properties due both to the vagaries of

regen/mk_invlists.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
print "Starting...\n" if DEBUG;
2121

22-
# This program outputs charclass_invlists.h, which contains various inversion
22+
# This program outputs charclass_invlists.inc, which contains various inversion
2323
# lists in the form of C arrays that are to be used as-is for inversion lists.
2424
# Thus, the lists it contains are essentially pre-compiled, and need only a
2525
# light-weight fast wrapper to make them usable at run-time.
@@ -32,7 +32,7 @@
3232

3333
my $VERSION_DATA_STRUCTURE_TYPE = 148565664;
3434

35-
# charclass_invlists.h now also contains inversion maps and enum definitions
35+
# charclass_invlists.inc now also contains inversion maps and enum definitions
3636
# for those maps that have a finite number of possible values
3737

3838
# integer or float (no exponent)
@@ -54,7 +54,7 @@
5454
# ASCII \w
5555
my $enum_name_re = qr / ^ [[:alpha:]] \w* $ /ax;
5656

57-
my $out_fh = open_new('charclass_invlists.h', '>',
57+
my $out_fh = open_new('charclass_invlists.inc', '>',
5858
{style => '*', by => 'regen/mk_invlists.pl',
5959
from => "Unicode::UCD"});
6060

regexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11543,7 +11543,7 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
1154311543
* pointers to auxiliary tables for each such situation. Each aux array
1154411544
* lists all the scripts for the given situation. There is another,
1154511545
* parallel, table that gives the number of entries in each aux table.
11546-
* These are all defined in charclass_invlists.h */
11546+
* These are all defined in charclass_invlists.inc */
1154711547

1154811548
/* XXX Here are the additional things UTS 39 says could be done:
1154911549
*

regexp_constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@
8282
* 55d90fdc3f902e5c0b16b3378f9eaa36e970a1c09723c33de7d47d0370044012 lib/unicore/version
8383
* 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
8484
* c7ff8e0d207d3538c7feb4a1a152b159e5e902d20293b303569ea8323e84633e regen/mk_PL_charclass.pl
85-
* e7ba2c6c0577fbb8b767a1305dbebcfeec166d11aa010cfbad9001c5f5971ee6 regen/mk_invlists.pl
85+
* 0c9dc59e0c05912141ae41bce0bc55e48cae956407b7a1f12807a3d7ffea3b19 regen/mk_invlists.pl
8686
* ex: set ro ft=c: */

0 commit comments

Comments
 (0)