File: Makefile.nt

package info (click to toggle)
graphicsmagick 1.3.20-3%2Bdeb8u1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 38,472 kB
  • ctags: 14,330
  • sloc: ansic: 220,724; sh: 24,578; cpp: 18,199; perl: 3,365; makefile: 2,359; tcl: 2,208; python: 1,280
file content (164 lines) | stat: -rw-r--r-- 6,152 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# Copyright (C) 2003 GraphicsMagick Group
# Copyright (C) 2002 ImageMagick Studio
# Copyright (C) 1998,1999 E. I. du Pont de Nemours and Company
#
# This program is covered by multiple licenses, which are described in
# Copyright.txt. You should have received a copy of Copyright.txt with this
# package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.

use ExtUtils::MakeMaker;
use Config;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
#
# NOTE: The current ActiveState binary distribution does not completely setup
# the values in C:/Perl/lib/Config.pm. You must manually modify the values of
# libpth to add the VisualC++ library path. It should look similar to one of
# the following examples in order to work properly.
#
#  Random developer
#   libpth='"C:\Perl\lib\CORE" "D:\DevStudio\VC98\lib"'
#
#  Visual Studio 6.0 default install:
#   libpth='"C:\Program Files\Microsoft Visual Studio\VC98\lib" "C:\Perl\lib\CORE"'
#
#  Visual Studio 7.0 default install:
#   libpth='"C:\Program Files\Microsoft Visual Studio .NET\vc7\lib" "C:\Perl\lib\CORE"'
#
#  Visual Studio 7.1 default install:
#   libpth='"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" "C:\Perl\lib\CORE"'
#
#  Visual Studio 9.0 default install (C:\Perl\lib\Config.pm):
#   libpth='"C:\Program Files\Microsoft Visual Studio 9.0\VC\lib" "C:\Perl\lib\CORE"'
#
WriteMakefile(
    'ABSTRACT'  => 'GraphicsMagick PERL Extension',
    'AUTHOR'    => 'GraphicsMagick Group',
    'NAME'      => 'Graphics::Magick',
    'VERSION_FROM' => 'Magick.pm', # finds $VERSION
    'LIBS'      => ['-L..\VisualMagick\lib -L..\VisualMagick\bin -lCORE_RL_magick_.lib'],
    'DEFINE'    => '-D_VISUALC_ -D_WINDOWS',     # e.g., '-DHAVE_SOMETHING' 
    'INC'       => '-I.. -I..\xlib\include',
    'BINARY_LOCATION'  => 'x86/Graphics-Magick.tar.gz',
    'dist' => {ZIP => "zip.exe", ZIPFLAGS=>"-r"},
    'clean' => {FILES => "Graphics-Magick.ppd Graphics-Magick.tar.gz PerlMagick.zip " },
    ($Config{'archname'} =~ /-object$/i ? ('CAPI' => 'TRUE') : ()),
);

#
# Add a targets for building ActiveState ppm distribution modules 
# Dylan Beattie <dylan@zepler.org>, April 2002
#
# Requires tar, gzip, and zip.  This produces PerlMagick.zip
# Get GNU tar and gzip from http://sourceware.cygnus.com/
# Get Win32 command line PKZIP from http://www.pkware.com/ 
# and rename PKZIP.EXE to ZIP.EXE and PKUNZIP.EXE to UNZIP.EXE
# Make sure tar.exe, gzip.exe and zip.exe are in your system path
#
# 'nmake ppm' will include only the PerlMagick module
# 'nmake ppm-full' also includes all GraphicsMagick DLLs and MGK files

sub MY::postamble
{
        '
Graphics-Magick.tar.gz: ppd pure_all #htmlifypods manifypods
	if exist Graphics-Magick.tar.gz del Graphics-Magick.tar.gz
	if exist Graphics-Magick.tar del Graphics-Magick.tar
        $(TAR) $(TARFLAGS) Graphics-Magick.tar blib
        $(COMPRESS) -q Graphics-Magick.tar

release: Graphics-Magick.tar.gz

ppm: ppd pure_all htmlifypods manifypods
        if exist PerlMagick.zip del PerlMagick.zip
        $(TAR) $(TARFLAGS) Graphics-Magick.tar blib
        $(COMPRESS) -q Graphics-Magick.tar
        if exist x86 del x86 /f /q
        if exist x86 rd x86
        md x86
        copy Graphics-Magick.tar$(SUFFIX) x86
        del Graphics-Magick.tar$(SUFFIX)
        if exist ppm-readme.txt copy ppm-readme.txt readme
        $(ZIP) $(ZIPFLAGS) PerlMagick.zip readme Graphics-Magick.ppd x86/Graphics-Magick.tar$(SUFFIX)
        del x86\Graphics-Magick.tar$(SUFFIX)
        rd x86

ppm-full: ppd pure_all htmlifypods manifypods
        if exist PerlMagick-full.zip del PerlMagick-full.zip
        copy ..\VisualMagick\bin\*.dll blib\arch\auto\Image\Magick
        copy ..\VisualMagick\bin\*.mgk blib\arch\auto\Image\Magick
        $(TAR) $(TARFLAGS) Graphics-Magick.tar blib
        $(COMPRESS) -q Graphics-Magick.tar
        if exist x86 del x86 /f /q
        if exist x86 rd x86
        md x86
        copy Graphics-Magick.tar$(SUFFIX) x86
        del Graphics-Magick.tar$(SUFFIX)
        if exist ppm-readme.txt copy ppm-readme.txt readme
        $(ZIP) $(ZIPFLAGS) PerlMagick-full.zip readme Graphics-Magick.ppd x86/Graphics-Magick.tar$(SUFFIX)
        del x86\Graphics-Magick.tar$(SUFFIX)
        rd x86
        '
}

#
# Modify the MakeMaker test fragment
#
sub MY::test
{
   #
   # List any GraphicsMagick features derived from add-on libraries
   # or programs you would like to test.
   #
   # Valid choices are:
   #
   #  Feature   Formats Tested		Prerequisites
   #  =======   ======================	======================================
   #   bzlib    BZip compression        BZip library
   #   cgm	CGM format		'ralcgm' program
   #   hdf	HDF format		HDF library
   #   jbig	JBIG format		JBIG library
   #   jpeg 	JPEG format		JPEG library
   #   mpeg	MPEG format		'mpeg2decode' & 'mpeg2encode' programs
   #   png	PNG format		PNG and Zlib libraries
   #   ps	Postscript format	'gs' program and/or DPS library
   #   rad	Radiance format		'ra_ppm' program
   #   tiff	TIFF format		TIFF library
   #   ttf	TrueType font format	FreeType library
   #   x	X11 support		X-windows libraries and server
   #   xfig	Xfig format		'transfig' program
   #   zlib	Zip compression		Zlib library
   #
   my @DELEGATES = qw/ bzlib cgm hpgl jbig jpeg mpeg png ps tiff ttf wmf x xfig zlib/;

   package MY; # so that "SUPER" works right
   my $inherited = shift->SUPER::test(@_);
   my $delegate_tests=
    " t/setattribute.t" .
    " t/getattribute.t" .
    " t/filter.t" .
    " t/read.t" .
    " t/montage.t" .
    " t/write.t" .
    " t/jbig/read.t" .
    " t/jbig/write.t" .
    " t/jng/read.t" .
    " t/jng/write.t" .
    " t/jpeg/read.t" .
    " t/jpeg/write.t" .
    " t/png/read.t" .
    " t/png/write.t" .
    " t/ps/read.t" .
    " t/ps/write.t" .
    " t/tiff/read.t" .
    " t/tiff/write.t" .
    " t/ttf/read.t" .
    " t/wmf/read.t" .
    " t/zlib/read.t" .
    " t/zlib/write.t";
   if ( defined $ENV{'DISPLAY'} ) {
    $delegate_tests .= " t/x/write.t t/x/read.t";
   }
   $inherited =~ s:^TEST_FILES =.*:TEST_FILES = ${delegate_tests}:m;
   $inherited;
}