Re: Recursive Makefiles, just build object files
[email protected] (Andy Armstrong)
| Newsgroups | perl.makemaker |
|---|---|
| Message-ID | <[email protected]> |
On 26 Nov 2007, at 22:32, Michael G Schwern wrote:
>> For the current release I've dumped a Makefile.PL in the bundled
>> library's root that invokes its configure script and then adds a
>> 'test'
>> target to the generated Makefile.
>
> I contemplated just this problem for Alien::SVN which does nothing
> but build a
> bundled Subversion library. The necessary hoops you have to jump
> through to
> override enough of MakeMaker to do this are absurd. You'll spend
> most of your
> time fighting MakeMaker.
I've got it sort of working. It still does the static link step for
the subdirectories - but that's quick and the results aren't too
offensive.
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/Makefile.PL
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/onig/Makefile.PL
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/onig/enc/Makefile.PL
Some oddities: BSD make doesn't see the real subdirs targets in the
Makefile if there's a NOP one before them. Maybe it's only seeing the
first - not sure. Accordingly my root Makefile.PL has
package MY;
# Need to strip the default subdirs target otherwise BSD make doesn't
# see the real target for some reason.
sub top_targets {
my $tt = shift->SUPER::top_targets( @_ );
$tt =~ s{^ subdirs \s .*? ^(\S) }{$1}msgx;
return $tt;
}
package main;
On 26 Nov 2007, at 22:32, Michael G Schwern wrote:
>> For the current release I've dumped a Makefile.PL in the bundled
>> library's root that invokes its configure script and then adds a
>> 'test'
>> target to the generated Makefile.
>
> I contemplated just this problem for Alien::SVN which does nothing
> but build a
> bundled Subversion library. The necessary hoops you have to jump
> through to
> override enough of MakeMaker to do this are absurd. You'll spend
> most of your
> time fighting MakeMaker.
I've got it sortOn 26 Nov 2007, at 22:32, Michael G Schwern wrote:
>> For the current release I've dumped a Makefile.PL in the bundled
>> library's root that invokes its configure script and then adds a
>> 'test'
>> target to the generated Makefile.
>
> I contemplated just this problem for Alien::SVN which does nothing
> but build a
> bundled Subversion library. The necessary hoops you have to jump
> through to
> override enough of MakeMaker to do this are absurd. You'll spend
> most of your
> time fighting MakeMaker.
I've got it working. It still does the static link step for the
subdirectories - but that's quick and the results aren't too offensive.
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/Makefile.PL
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/onig/Makefile.PL
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/onig/enc/Makefile.PL
Some oddities: BSD make doesn't see the real subdirs targets in the
Makefile if there's a NOP one before them. Maybe it's only seeing the
first - not sure. Accordingly my root Makefile.PL has
package MY;
# Need to strip the default subdirs target otherwise BSD make
doesn't
# see the real target for some reason.
sub top_targets {
my $tt = shift->SUPER::top_targets( @_ );
$tt =~ s{^ subdirs \s .*? ^(\S) }{$1}msgx;
return $tt;
}
package main;
The source only Makefile.PLs are bodged up like this:
sub MY::static {
return entab( <<'EOM');
static :: $(FIRST_MAKEFILE) $(OBJECT)
$(NOECHO) $(NOOP)
EOM
}
Which trims the static target down a bit. It's not /too/ ugly :)
--
Andy Armstrong, Hexten
of working. It still does the static link step for the
subdirectories - but that's quick and the results aren't too offensive.
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/Makefile.PL
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/onig/Makefile.PL
http://search.cpan.org/src/ANDYA/re-engine-Oniguruma-0.03/onig/enc/Makefile.PL
Some oddities: BSD make doesn't see the real subdirs targets in the
Makefile if there's a NOP one before them. Maybe it's only seeing the
first - not sure. Accordingly my root Makefile.PL has
package MY;
# Need to strip the default subdirs target otherwise BSD make
doesn't
# see the real target for some reason.
sub top_targets {
my $tt = shift->SUPER::top_targets( @_ );
$tt =~ s{^ subdirs \s .*? ^(\S) }{$1}msgx;
return $tt;
}
package main;
The source only Makefile.PLs are bodged up like this:
sub MY::static {
return entab( <<'EOM');
static :: $(FIRST_MAKEFILE) $(OBJECT)
$(NOECHO) $(NOOP)
EOM
}
Which trims the static target down a bit. It's not /too/ ugly :)
--
Andy Armstrong, Hexten