Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 102 lines (66 sloc) 1.798 kb
52db4f96 » Tony Cook
2006-05-22 added "kwalitee" test script:
1 use strict;
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
2 use Config;
3 use ExtUtils::MakeMaker;
52db4f96 » Tony Cook
2006-05-22 added "kwalitee" test script:
4 my $Verbose = 1;
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
5
52db4f96 » Tony Cook
2006-05-22 added "kwalitee" test script:
6 my $lddl=$Config{"lddlflags"};
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
7
52db4f96 » Tony Cook
2006-05-22 added "kwalitee" test script:
8 my @plugins= qw(dyntest dt2 mandelbrot flines);
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
9
52db4f96 » Tony Cook
2006-05-22 added "kwalitee" test script:
10 my $libstr=join(' ',map { $_.'.$(SO)' } @plugins);
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
11
12 #print $libstr,"\n";
13 #print $objstr,"\n";
14 #print MY::top_targets();
15
16 WriteMakefile(
17 NAME => 'Imager::plugins',
18 SKIP => [qw(all dynamic static )],
19 clean => {'FILES' => $libstr},
20 );
21
22
23
24
25 sub lddl_magic {
26 my $t;
27 $t=$lddl;
28 $t=~s/-bI:\$\(PERL_INC\)\/perl.exp//;
29 $t=~s/\$\(BASEEXT\)/$_[0]/;
30 return $t;
31 }
32
33
34
35
36 sub MY::top_targets {
37 use Config;
38 if ($^O eq 'aix') {
39 '
40 all :: dynamic
41
42 dynamic :: '.$libstr.(join("\n",map { qq{
43
44 $_.\$(SO): $_\$(OBJ_EXT)
45 LD_RUN_PATH="\$(LD_RUN_PATH)" \$(LD) -o \$\@ }.lddl_magic($_).qq{ \$(OTHERLDFLAGS) $_\$(OBJ_EXT)
46
47 } } @plugins)).'
48
49
50 pure_all ::
3e567f83 » Tony Cook
2004-12-16 update for the other 2 cases too
51 $(NOOP)
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
52
53 ';
54
55 }
56 elsif ($^O =~ /win32/i && $Config{cc} =~ /cl/) {
8a00cb26 » Tony Cook
2005-05-11 Support mingw built perl
57 my @libpth = grep /\S/, split /("[^"]*"|\S+)/,$Config{libpth};
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
58 '
59 all :: dynamic
60
8a00cb26 » Tony Cook
2005-05-11 Support mingw built perl
61 dynamic :: '.$libstr.(join("\n",map { qq{
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
62
63 $_.\$(SO): $_\$(OBJ_EXT)
64 \$(LD) /OUT:\$\@ }.lddl_magic($_).qq{ \$(OTHERLDFLAGS) $_\$(OBJ_EXT) $Config{libs} }.join(' ', map "/libpath:$_", @libpth).qq{
65
66 } } @plugins)).'
67
68
69 pure_all ::
bd473100 » Tony Cook
2004-12-16 - the plugins Makefile has long produced an error after all tests were
70 $(NOOP)
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
71
72 ';
73
74 } else {
8a00cb26 » Tony Cook
2005-05-11 Support mingw built perl
75 my $ldrun = $^O =~ /win32/i ? '' : 'LD_RUN_PATH="$(LD_RUN_PATH)"';
76 my $phony_colon = $Config{make} eq 'dmake' ? ':' : '::';
77
78 "
79 all $phony_colon dynamic
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
80
8a00cb26 » Tony Cook
2005-05-11 Support mingw built perl
81 dynamic $phony_colon ".$libstr.(join("\n",map { qq{
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
82
83 $_.\$(SO): $_\$(OBJ_EXT)
8a00cb26 » Tony Cook
2005-05-11 Support mingw built perl
84 $ldrun \$(LD) -o \$\@ \$(LDDLFLAGS) \$(OTHERLDFLAGS) $_\$(OBJ_EXT)
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
85
86 } } @plugins)).'
87
88
89 pure_all ::
3e567f83 » Tony Cook
2004-12-16 update for the other 2 cases too
90 $(NOOP)
02d1d628 » Arnar Mar Hrafnkelsson
2001-03-25 Initial revision
91
92 ';
93
94 }
95 }
55932d2a » Tony Cook
2005-04-06 - Makefile.PL now adds rules to generate a suitable META.yml to the
96
97 # EU::MM crashes without this when we define it in the base Makefile.PL
7fdbfba8 » Tony Cook
2005-04-26 - Imager::Font::BBox objects now have right_bearing() and display_wid…
98 # but then warns about redefinition, so delete the GLOB entry
99 BEGIN { delete $MY::{metafile} }
55932d2a » Tony Cook
2005-04-06 - Makefile.PL now adds rules to generate a suitable META.yml to the
100 sub MY::metafile {
101 '';
102 }
Something went wrong with that request. Please try again.