File: Makefile.am

package info (click to toggle)
imagemagick 6:6.0.6.2-2.9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 33,284 kB
  • ctags: 14,844
  • sloc: ansic: 190,790; cpp: 17,203; sh: 8,740; perl: 4,190; makefile: 1,740; tcl: 459
file content (327 lines) | stat: -rw-r--r-- 11,586 bytes parent folder | download
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
#  Makefile to build the ImageMagick distribution.
#
#  Copyright 1999-2004 ImageMagick Studio LLC, a non-profit organization    
#  dedicated to making software imaging solutions freely available.
#
#  You may not use this file except in compliance with the License.  You may
#  obtain a copy of the License at
#
#    http://www.imagemagick.org/www/Copyright.html
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#

# Don't require all the GNU mandated files
AUTOMAKE_OPTIONS = 1.8.2 dist-zip dist-bzip2 foreign

PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@

# Subdirectories to build
if WITH_MAGICK_PLUS_PLUS
MAGICK_PLUS_PLUS=Magick++
endif # WITH_MAGICK_PLUS_PLUS

# Directories to include in distribution
DIST_SUBDIRS=ltdl config coders filters magick utilities tests wand Magick++

if WITH_LTDL
LTDL=ltdl
else
LTDL=
endif

if WITH_MODULES
SUBDIRS = $(LTDL) config magick wand coders filters $(MAGICK_PLUS_PLUS) utilities tests
else
SUBDIRS = $(LTDL) config coders filters magick wand $(MAGICK_PLUS_PLUS) utilities tests
endif # WITH_MODULES

# Architecture independent data files installed in the package's data directory
pkgdatadir = @MagickSharePath@
pkgdata_DATA = Magick.pdf LICENSE NOTICE QuickStart.txt

# Additional files to distribute
EXTRA_DIST = ChangeLog LICENSE NOTICE Install-mac.txt Install-unix.txt \
	Install-vms.txt Install-windows.txt index.html Magick.pdf \
	Magickshr.opt Make.com Platforms.txt QuickStart.txt \
	AUTHORS README.txt lndir.sh version.sh winpath.sh

# Non-Automake subdirectories to distribute
DISTDIRS = guide images scenes scripts www PerlMagick
dist-hook:
	( \
	  builddir=`pwd` ; \
	  cd $(srcdir) && \
	  ( \
	    for dir in $(DISTDIRS) ; do \
	      find $$dir -depth -print | egrep -v '(~$$)|(/CVS)|(/\.#)|(/\.deps)' \
	        | cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \
	    done \
	  ) \
	)

#
# Additional install rules
#

# Install HTML files
pkgdocdir = @MagickSharePath@
DOCDIRS = images images/patterns www www/api www/Magick++
install-data-html:
	$(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
	$(INSTALL_DATA) $(srcdir)/index.html $(DESTDIR)$(pkgdocdir)
	@for dir in $(DOCDIRS) ; do \
	  $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
	  for file in $(srcdir)/$$dir/*.* ; do \
	    echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$$dir" ; \
	    $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$$dir ; \
	  done ; \
	done

# Uninstall HTML files
uninstall-data-html:
	rm -f $(DESTDIR)$(pkgdocdir)/index.html
	for dir in $(DOCDIRS) ; do \
	  rm -f -r $(DESTDIR)$(pkgdocdir)/$$dir ; \
	done

# Ensure that version.h at $(srcdir)/magick/version.h is kept up to date.
magick-version: magick/version.h
	@if test -f "$(srcdir)/VisualMagick/installer/inc/version.isx.in" ; then \
	  ./config.status --file="$(srcdir)/VisualMagick/installer/inc/version.isx" 2> /dev/null ; \
	fi
	@if test -n "$(VPATH)" ; then \
	  cmp magick/version.h $(srcdir)/magick/version.h > /dev/null ; \
          if test $$? -eq 1 ; then \
	    echo "Updating $(srcdir)/magick/version.h ..."; \
	    cp magick/version.h $(srcdir)/magick/version.h ; \
	  fi ; \
	fi ; \
	touch magick-version

# If source files missing, see if they can be obtained via VPATH
perl-sources:
	@if test -n "$(VPATH)" ; then \
	  echo "Linking PerlMagick Sources ..." ; \
	  imagemagick=`(cd $(VPATH) ; pwd)` && \
	  ( cd $(PERLMAGICK) && \
	    sh $$imagemagick/lndir.sh $$imagemagick/$(PERLMAGICK) ) \
	fi ; \
	touch perl-sources

if WITH_PERL

PERLMAGICK=PerlMagick
PERLMAKEMAKER=$(PERLMAGICK)/Makefile.PL
PERLMAKEFILE=$(PERLMAGICK)/Makefile

if WITH_PERL_DYNAMIC

$(PERLMAKEFILE): perl-sources $(PERLMAKEMAKER)
	cd $(PERLMAGICK) && @PERL@ Makefile.PL $(PERL_MAKE_OPTIONS)

install-exec-perl: $(PERLMAKEFILE)
	( cd $(PERLMAGICK) && $(MAKE) CC='@CC@' && \
	$(MAKE) CC='@CC@' install && \
	$(MAKE) clean && rm -f  Makefile.old )

all-perl:

uninstall-exec-perl: $(PERLMAKEFILE)
	echo "Uninstall not supported for PerlMagick"

check-perl: $(PERLMAKEFILE)
	cd $(PERLMAGICK) && $(MAKE) CC='@CC@' test

else
if WITH_PERL_STATIC

PERLSTATICNAME=PerlMagick

$(PERLMAKEFILE): perl-sources $(PERLMAKEMAKER)
	cd $(PERLMAGICK) && @PERL@ Makefile.PL MAP_TARGET=$(PERLSTATICNAME) $(PERL_MAKE_OPTIONS)

$(PERLMAGICK)/$(PERLSTATICNAME): $(PERLMAKEFILE) magick/libMagick.la
	( rm -f $(PERLMAGICK)/$(PERLSTATICNAME) ; cd $(PERLMAGICK) && $(MAKE) CC='@CC@' $(PERLSTATICNAME) )

all-perl: $(PERLMAGICK)/$(PERLSTATICNAME)

install-exec-perl: $(PERLMAGICK)/$(PERLSTATICNAME)
	rm -f "$(DESTDIR)$(BIN_DIR)/$(PERLSTATICNAME)"
	if test "x$(DESTDIR)" = "x" ; then \
	  ( cd $(PERLMAGICK) && \
	    $(MAKE) -f Makefile.aperl CC='@CC@' inst_perl MAP_TARGET=$(PERLSTATICNAME) \
	    INSTALLBIN="$(DESTDIR)$(BIN_DIR)" \
	  ) ; \
	else \
	  ( cd $(PERLMAGICK) && \
	    $(MAKE) -f Makefile.aperl CC='@CC@' inst_perl MAP_TARGET=$(PERLSTATICNAME) \
	    INSTALLBIN="$(DESTDIR)$(BIN_DIR)" PREFIX="$(DESTDIR)$(prefix)" \
	  ) ; \
	fi

uninstall-exec-perl:
	rm -f '$(DESTDIR)$(BIN_DIR)/$(PERLSTATICNAME)'

check-perl: $(PERLMAGICK)/$(PERLSTATICNAME)
	cd $(PERLMAGICK) && $(MAKE) -f Makefile.aperl CC='@CC@' test

endif # WITH_PERL_STATIC
endif # WTIH_PERL_DYNAMIC

clean-perl: $(PERLMAKEFILE)
	(cd $(PERLMAGICK) && \
	$(MAKE) CC='@CC@' clean && \
	rm -f Makefile.old PerlMagick && \
	rm -f t/output* t/jng/*_tmp.jng t/*/output* )
	rm -f perl-sources

distclean-perl: clean-perl

else
# Satisfy makefile requirements if not building PERL
all-perl:
install-exec-perl:
uninstall-exec-perl:
check-perl:
clean-perl:
distclean-perl:
endif # WITH_PERL

if WITH_PERL
# txt2html requires perl.
TXT2HTMLTARGETS= \
	$(top_srcdir)/www/Authors.html \
	$(top_srcdir)/www/Changelog.html \
	$(top_srcdir)/www/Install-mac.html \
	$(top_srcdir)/www/Install-unix.html \
	$(top_srcdir)/www/Install-vms.html \
	$(top_srcdir)/www/Install-windows.html \
	$(top_srcdir)/www/News.html \
	$(top_srcdir)/www/QuickStart.html \
	$(top_srcdir)/www/install.html
endif # WITH_PERL

all-local: all-perl @MAINTAINER_MODE_TRUE@ magick-version $(TXT2HTMLTARGETS)

# Install PerlMagick
install-exec-local: install-exec-perl

# Install arch-independent package data
install-data-local: install-data-html

# Uninstall arch-independent package data
uninstall-local: uninstall-data-html uninstall-exec-perl

# Do a make clean in PerlMagick directory 
clean-local: clean-perl

# Do a make distclean in PerlMagick directory 
distclean-local: distclean-perl

# Maintainer clean is just like 'distclean' for PerlMagick
maintainer-clean-local: distclean-local

# Run tests on PerlMagick
check-local: check-perl

# Automatically reconfigure libtool
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status --recheck

# Build HTML version of ChangeLog
$(top_srcdir)/www/Changelog.html: $(top_srcdir)/ChangeLog
	@PERL@ $(top_srcdir)/scripts/txt2html -p 4 -pb 1 -t $(PACKAGE_NAME)' '$(PACKAGE_VERSION)': ChangeLog' < $(top_srcdir)/ChangeLog | tidy -asxhtml > $(top_srcdir)/www/Changelog.html

# Build HTML version of Copyright
$(top_srcdir)/www/Copyright.html: $(top_srcdir)/LICENSE
	@PERL@ $(top_srcdir)/scripts/txt2html -p 4 -pb 1 -t $(PACKAGE_NAME)' '$(PACKAGE_VERSION)': License' < $(top_srcdir)/LICENSE | tidy -asxhtml > $(top_srcdir)/www/Copyright.html

# Build HTML version of AUTHORS
$(top_srcdir)/www/Authors.html: $(top_srcdir)/AUTHORS
	@PERL@ $(top_srcdir)/scripts/txt2html -p 4 -pb 1 -t $(PACKAGE_NAME)' '$(PACKAGE_VERSION)': Authors' < $(top_srcdir)/AUTHORS | tidy -asxhtml > $(top_srcdir)/www/Authors.html

# Build HTML version of News
$(top_srcdir)/www/News.html: $(top_srcdir)/NEWS
	@PERL@ $(top_srcdir)/scripts/txt2html -p 4 -pb 1 -t $(PACKAGE_NAME)' '$(PACKAGE_VERSION)': News' < $(top_srcdir)/NEWS | tidy -asxhtml > $(top_srcdir)/www/News.html

# Build HTML version of QuickStart
$(top_srcdir)/www/QuickStart.html: $(top_srcdir)/QuickStart.txt
	@PERL@ $(top_srcdir)/scripts/txt2html -p 4 -pb 1 -t $(PACKAGE_NAME)' '$(PACKAGE_VERSION)': Installing ImageMagick Binaries' < $(top_srcdir)/QuickStart.txt | tidy -asxhtml > $(top_srcdir)/www/QuickStart.html

# Build HTML version of README
$(top_srcdir)/www/install.html: $(top_srcdir)/README.txt
	@PERL@ $(top_srcdir)/scripts/txt2html -p 4 -pb 1 -t $(PACKAGE_NAME)' Install' < $(top_srcdir)/README.txt | tidy -asxhtml > $(top_srcdir)/www/install.html

# Build HTML version of Install-mac.txt
$(top_srcdir)/www/Install-mac.html: $(top_srcdir)/Install-unix.txt
	@PERL@ $(top_srcdir)/scripts/txt2html -s 55 -p 4 -pb 1 -t $(PACKAGE_NAME)' MacOS 9 Installation' < $(top_srcdir)/Install-mac.txt | tidy -asxhtml > $(top_srcdir)/www/Install-mac.html

# Build HTML version of Install-unix.txt
$(top_srcdir)/www/Install-unix.html: $(top_srcdir)/Install-unix.txt
	@PERL@ $(top_srcdir)/scripts/txt2html -s 55 -p 4 -pb 1 -t $(PACKAGE_NAME)' Unix Installation' < $(top_srcdir)/Install-unix.txt | tidy -asxhtml > $(top_srcdir)/www/Install-unix.html

# Build HTML version of Install-vms.txt
$(top_srcdir)/www/Install-vms.html: $(top_srcdir)/Install-vms.txt
	@PERL@ $(top_srcdir)/scripts/txt2html -s 55 -p 4 -pb 1 -t $(PACKAGE_NAME)' VMS Installation' < $(top_srcdir)/Install-vms.txt | tidy -asxhtml > $(top_srcdir)/www/Install-vms.html

# Build HTML version of Install-windows.txt
$(top_srcdir)/www/Install-windows.html: $(top_srcdir)/Install-windows.txt
	@PERL@ $(top_srcdir)/scripts/txt2html -s 55 -p 4 -pb 1 -t $(PACKAGE_NAME)' Windows Installation' < $(top_srcdir)/Install-windows.txt | tidy -asxhtml > $(top_srcdir)/www/Install-windows.html

format_c_api_docs:
	@PERL@ $(top_srcdir)/scripts/format_c_api_docs -format html --srcdir $(top_srcdir)/magick --outdir $(top_srcdir)/www/api

#
# Build a Windows source Zip-ball
#
DIST_WINDOWS_SRC_ZIP=$(PACKAGE_NAME)-$(PACKAGE_VERSION)-windows.zip
$(DIST_WINDOWS_SRC_ZIP) windows-src:
	rm -f $(DIST_WINDOWS_SRC_ZIP)
	cd $(top_srcdir); cd .. && zip -r -9 -q $(DIST_WINDOWS_SRC_ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION) -x '*.zip' -x "*.bz2" -x "*.gz" -x '*~' -x '*.o' -x autom4te.cache -x CVS -x '*.so' -x '.libs' -x '.deps' -x '.#*' -x core -x '*.core'

#
# RPM build support
#
if HAS_RPM

DIST_ARCHIVE_SRPM=$(distdir)-1.src.rpm
PHONY: srpm
$(DIST_ARCHIVE_SRPM) srpm: rpm $(distdir).tar.bz2
	$(RPM) --define="_sourcedir `pwd`" --define="_srcrpmdir `pwd`" --nodeps -bs scripts/ImageMagick.spec

RPMDIR=redhat
RPMARCH=i386

DIST_ARCHIVE_RPM= \
	$(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-1.$(RPMARCH).rpm \
	$(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-1.$(RPMARCH).rpm \
	$(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-1.$(RPMARCH).rpm \
	$(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-1.$(RPMARCH).rpm \
	$(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-perl-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-1.$(RPMARCH).rpm

PHONY: rpm
rpm:
	rm -rf $(RPMDIR)
	mkdir $(RPMDIR)
	mkdir $(RPMDIR)/BUILD
	mkdir $(RPMDIR)/RPMS
	$(RPM) --define="_sourcedir `pwd`" --define="_rpmdir `pwd`/$(RPMDIR)/RPMS" --define="_builddir `pwd`/$(RPMDIR)/BUILD" --nodeps -bb scripts/ImageMagick.spec
	rm -rf rpmbuild

else
DIST_ARCHIVE_RPM=
endif # HAS_RPM

#
# Build a validated snapshot release and move to the snapshots directory.
#
snapshot: dist
	$(MAKE) $(DIST_WINDOWS_SRC_ZIP)
	$(MAKE) $(DIST_ARCHIVE_SRPM)