Currently EU::MM maintains a list of headers that will cause XS
modules to be rebuilt.

If this list is not up to date then modifications to core headers
during core development do not cause extensions to be rebuilt.

This means that we (perl core devs) cannot add new headers to Perl
without build problems when they change and are used in XS code.

I personally have encountered this in a few places, the regex engine
and the hash code.

I plan to merge a change which splits hv.h in two. Once this happens
XS modules that depend on the perl hash function will break if the
file is modified.

I want to fix this.

My current plan is to create a new module ExtUtils::PerlHeaders and
then move the list there.

EU::MakeMaker can then require this module, and if it exists use it
for the header list.

I am curious if anyone has any better suggestions or comments?

The code involved is in lib/ExtUtils/MM_Unix.pm as the sub perldepend():

sub perldepend {
    my($self) = shift;
    my(@m);

    my $make_config = $self->cd('$(PERL_SRC)', '$(MAKE) lib/Config.pm');

    push @m, sprintf <<'MAKE_FRAG', $make_config if $self->{PERL_SRC};
# Check for unpropogated config.sh changes. Should never happen.
# We do NOT just update config.h because that is not sufficient.
# An out of date config.h is not fatal but complains loudly!
$(PERL_INC)/config.h: $(PERL_SRC)/config.sh
        -$(NOECHO) $(ECHO) "Warning: $(PERL_INC)/config.h out of date with
$(PERL_SRC)/config.sh"; $(FALSE)

$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
        $(NOECHO) $(ECHO) "Warning: $(PERL_ARCHLIB)/Config.pm may be out of
date with $(PERL_SRC)/config.sh"
        %s
MAKE_FRAG

    return join "", @m unless $self->needs_linking;

    push @m, q{
PERL_HDRS = \
        $(PERL_INC)/EXTERN.h            \
        $(PERL_INC)/INTERN.h            \
        $(PERL_INC)/XSUB.h              \
        $(PERL_INC)/av.h                \
        $(PERL_INC)/config.h            \
        $(PERL_INC)/cop.h               \
        $(PERL_INC)/cv.h                \
        $(PERL_INC)/dosish.h            \
        $(PERL_INC)/embed.h             \
        $(PERL_INC)/embedvar.h          \
        $(PERL_INC)/fakethr.h           \
        $(PERL_INC)/form.h              \
        $(PERL_INC)/gv.h                \
        $(PERL_INC)/handy.h             \
        $(PERL_INC)/hv.h                \
        $(PERL_INC)/intrpvar.h          \
        $(PERL_INC)/iperlsys.h          \
        $(PERL_INC)/keywords.h          \
        $(PERL_INC)/mg.h                \
        $(PERL_INC)/nostdio.h           \
        $(PERL_INC)/op.h                \
        $(PERL_INC)/opcode.h            \
        $(PERL_INC)/patchlevel.h        \
        $(PERL_INC)/perl.h              \
        $(PERL_INC)/perlio.h            \
        $(PERL_INC)/perlsdio.h          \
        $(PERL_INC)/perlsfio.h          \
        $(PERL_INC)/perlvars.h          \
        $(PERL_INC)/perly.h             \
        $(PERL_INC)/pp.h                \
        $(PERL_INC)/pp_proto.h          \
        $(PERL_INC)/proto.h             \
        $(PERL_INC)/regcomp.h           \
        $(PERL_INC)/regexp.h            \
        $(PERL_INC)/regnodes.h          \
        $(PERL_INC)/scope.h             \
        $(PERL_INC)/sv.h                \
        $(PERL_INC)/thread.h            \
        $(PERL_INC)/unixish.h           \
        $(PERL_INC)/util.h

$(OBJECT) : $(PERL_HDRS)
} if $self->{OBJECT};

    push @m, join(" ", values %{$self->{XS}})." : \$(XSUBPPDEPS)\n"
if %{$self->{XS}};

    join "\n", @m;
}


IMO this list has no business being hard coded into EU::MM now that
EU::MM is not a core maintained module!

Cheers,
Yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to