JayBonci has asked for the wisdom of the Perl Monks concerning the following question:
Basically, I wish XSOPTS was smarter, or 'CC' was a smarter variable. Is there an Win32 or general $ENV thing I can pull for this, or is there a good c++ xs module that would serve as an example. Thanks.use 5.005; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. my $mod = my $pm = "IP::Unique"; $pm =~ s/::/\//g; $pm = "lib/$pm.pm"; + unless(-e "CHANGES") { open CHANGES,">>CHANGES"; print CHANGES "Temp CHANGES file\n"; close CHANGES; } my $CC = "g++"; WriteMakefile( NAME => $mod, VERSION_FROM => $pm, # finds $VERSION PREREQ_PM => {}, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => $pm, # retrieve abstract from module AUTHOR => 'Jay Bonci <jaybonci@cpan.org>') : ()), CC => $CC, CCFLAGS => "-Wall", LD => '$(CC)', LIBS => [''], # e.g., '-lm' DEFINE => '', # e.g., '-DHAVE_SOMETHING' INC => '-I.', XSOPT => '-C++', OBJECT => '$(O_FILES)', # link all the C files too 'dist' => { #Auto-generate the CHANGES file PREOP => "podselect $pm -section CHANGES | pod2text -w 1000 -i + 5 | perl -pe \"s/^\s+(Version.*)/\$1/g;\" > CHANGES", }, );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Makefile.pl for a C++ XS module... How to make windows happy?
by Corion (Patriarch) on Feb 27, 2004 at 10:36 UTC | |
by JayBonci (Curate) on Feb 27, 2004 at 10:41 UTC | |
by Anonymous Monk on Feb 28, 2004 at 22:32 UTC | |
Re: Makefile.pl for a C++ XS module... How to make windows happy?
by PodMaster (Abbot) on Feb 27, 2004 at 10:51 UTC | |
by flyingmoose (Priest) on Feb 27, 2004 at 14:59 UTC | |
by PodMaster (Abbot) on Feb 27, 2004 at 19:16 UTC | |
Re: Makefile.pl for a C++ XS module... How to make windows happy?
by ambrus (Abbot) on Feb 27, 2004 at 18:53 UTC |