use ExtUtils::MakeMaker; WriteMakefile( ATTRIBUTE => VALUE, ... ); # which internally is really more like... %att = (ATTRIBUTE => VALUE, ...); MM->new(\%att)->flush; ***** use ExtUtils::MakeMaker; WriteMakefile( NAME => 'POSIX', LIBS => ["-lm -lposix -lcposix"], MAN3PODS => ' ', # Pods will be built by installman. XSPROTOARG => '-noprototypes', # XXX remove later? VERSION_FROM => 'POSIX.pm', ); ***** $self->{LIBS} = ['-ldbm -lucb -lc']; ***** perl Makefile.PL PREFIX=/tmp/myperl5 ***** perl Makefile.PL verbose ***** perl Makefile.PL PREFIX=~ ***** perl Makefile.PL INSTALLSITELIB=/afs/here/today INSTALLBIN=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages make ***** make perl ***** make inst_perl ***** perl Makefile.PL MAP_TARGET=myperl make myperl make inst_perl ***** perl Makefile.PL make myperl MAP_TARGET=myperl make inst_perl MAP_TARGET=myperl ***** perl Makefile.PL LINKTYPE=static ***** CONFIG => [qw(archname manext)], ***** ar dlext ldflags ranlib cc dlsrc libc sitelibexp cccdlflags ld lib_ext sitearchexp ccdlflags lddlflags obj_ext so ***** DIR => ['sdbm'], ***** perl -MExtUtils::MakeMaker -e 'WriteMakefile()' ***** "$(PKG)" => ["boot_$(PKG)"] ***** DL_FUNCS => { RPC => [qw(boot_rpcb rpcb_gettime getnetconfigent)], NetconfigPtr => ['DESTROY'], }, ***** DL_VARS => [ qw( Foo_version Foo_numstreams Foo_tree ) ], ***** INC => "-I/usr/5include -I/path/to/inc", ***** LIBS => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"], ***** LIBS => ["-ltcl", "-ltk", "-lX11"], ***** LIBS => "-ltcl -ltk -lX11", ***** NORECURS => 1, ***** OBJECT => "tkpBind.o tkpButton.o tkpCanvas.o", ***** PL_FILES => {'whatever.PL' => 'whatever'}, ***** all :: whatever whatever :: whatever.PL $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \ -I$(PERL_ARCHLIB) -I$(PERL_LIB) whatever.PL ***** PM => {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}, ***** PMLIBDIRS => [ 'lib', $(BASEEXT) ], ***** SKIP => [qw(name1 name2)], ***** /(\$[\w:]*\bVERSION)\b.*=/ ***** $VERSION = '1.00'; ( $VERSION ) = '$Revision: 3.0 $ ' =~ /\$Revision:\s+([^\s]+)/; $FOO::VERSION = '1.10'; ***** my $VERSION = '1.01'; local $VERSION = '1.02'; local $FOO::VERSION = '1.30'; ***** XS => {'name_of_file.xs' => 'name_of_file.c'}, ***** clean => {FILES => "*.xyz foo"}, ***** depend => {ANY_TARGET => ANY_DEPENDENCY, ...}, ***** dist => { TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => 'gz', SHAR => 'shar -m', DIST_CP => 'ln', }, ***** dynamic_lib => { ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...', }, ***** {SPLITLIB => '$(INST_LIB)' (default) or '$(INST_ARCHLIB)'} ***** linkext => {LINKTYPE => 'static', 'dynamic', or ''}, ***** linkext => {LINKTYPE => ''}, ***** macro => {ANY_MACRO => ANY_VALUE, ...}, ***** {FILES => '$(INST_ARCHAUTODIR)/*.xyz'} ***** sub MY::c_o { "new literal text" } ***** sub MY::c_o { my $self = shift; local *c_o; $_=$self->MM::c_o; s/old text/new text/; $_; } ***** WriteMakefile( 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" })