blob: 1376c0a02ebd77228811189dab96218ffac0abd5 [file] [log] [blame]
cristy45ef08f2012-12-07 13:13:34 +00001# Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00002# dedicated to making software imaging solutions freely available.
3#
4# You may not use this file except in compliance with the License. You may
5# obtain a copy of the License at
6#
7# http://www.imagemagick.org/script/license.php
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15# Copyright (C) 2003 - 2008 GraphicsMagick Group
16#
17# Top-Level Makefile for building ImageMagick.
18#
19
cristy3ed852e2009-09-05 21:47:34 +000020AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
21
22ACLOCAL_AMFLAGS = -I m4
23
cristyf5ee5be2009-11-06 02:22:56 +000024MODULECOMMONFLAGS = -no-undefined -export-symbols-regex ".*" -shared -module -avoid-version
cristy3ed852e2009-09-05 21:47:34 +000025
cristy9b86f202012-11-28 21:55:35 +000026SUBDIRS = .
27
cristy3ed852e2009-09-05 21:47:34 +000028# Options to pass when running configure in the distcheck target.
29#
30# We want to preserve user-provided option variables so the same
31# compiler, headers, and libraries are used as for a normal build.
32DISTCHECK_CONFIGURE_FLAGS=$(DISTCHECK_CONFIG_FLAGS)
33
cristy4c08aed2011-07-01 19:47:50 +000034DISTCLEANFILES = _configs.sed MagickCore/magick-config.h
cristy50620792010-02-09 00:42:32 +000035
cristy3ed852e2009-09-05 21:47:34 +000036## Make sure these will be cleaned even when they're not built by default.
37CLEANFILES = \
cristy4c08aed2011-07-01 19:47:50 +000038 $(MAGICKWAND_CLEANFILES) \
cristy3ed852e2009-09-05 21:47:34 +000039 $(MAGICKPP_CLEANFILES) \
40 $(UTILITIES_CLEANFILES) \
cristy52cf7f12010-02-07 18:07:56 +000041 $(TESTS_CLEANFILES)
cristy3ed852e2009-09-05 21:47:34 +000042
cristydb548ce2013-04-11 01:03:37 +000043utilities_bin_PROGRAMS = \
cristy3ed852e2009-09-05 21:47:34 +000044 $(UTILITIES_PGMS)
cristydb548ce2013-04-11 01:03:37 +000045utilities_bindir = $(LIB_BIN_DIR_PATH)
46
cristy3ed852e2009-09-05 21:47:34 +000047
48# Binary scripts
49bin_SCRIPTS = \
cristy4c08aed2011-07-01 19:47:50 +000050 $(MAGICKCORE_BIN_SCRPTS) \
51 $(MAGICKWAND_BIN_SCRPTS) \
cristy3ed852e2009-09-05 21:47:34 +000052 $(MAGICKPP_SCRPTS)
53
cristy5eef09f2012-10-16 12:08:28 +000054include_HEADERS =
cristy3ed852e2009-09-05 21:47:34 +000055
56# Headers which are not installed but which are distributed
57noinst_HEADERS = \
cristy4c08aed2011-07-01 19:47:50 +000058 $(MAGICKCORE_NOINST_HDRS)
cristy3ed852e2009-09-05 21:47:34 +000059
60if WIN32_NATIVE_BUILD
61SRCDIR='$(shell @WinPathScript@ $(srcdir)/)'
62else
63SRCDIR="$(srcdir)/"
64endif
65
cristybc556452012-08-17 19:44:03 +000066# Tests with .tap extensions use the TAP protocol and TAP driver
cristy9e524dc2012-08-21 00:07:27 +000067LOG_COMPILER = $(SHELL)
68
69SH_LOG_COMPILER = $(LOG_COMPILER)
70TAP_LOG_COMPILER = $(LOG_COMPILER)
71
72# Test extensions
73TEST_EXTENSIONS = .sh .tap
74
cristybc556452012-08-17 19:44:03 +000075TAP_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
76 $(top_srcdir)/config/tap-driver.sh
77
cristy3ed852e2009-09-05 21:47:34 +000078# Environment parameters to be used during tests
79TESTS_ENVIRONMENT = \
cristy3ed852e2009-09-05 21:47:34 +000080 MAKE="$(MAKE)" \
81 MAKEFLAGS="$(MAKEFLAGS)" \
cristy0cf6da52012-08-25 00:35:24 +000082 MEMCHECK="$(MEMCHECK)"
cristy3ed852e2009-09-05 21:47:34 +000083
cristy3ed852e2009-09-05 21:47:34 +000084# Tests to run
85TESTS = \
cristy3ed852e2009-09-05 21:47:34 +000086 $(TESTS_TESTS) \
87 $(MAGICKPP_TESTS) \
cristy4c08aed2011-07-01 19:47:50 +000088 $(MAGICKWAND_TESTS) \
cristy3ed852e2009-09-05 21:47:34 +000089 $(UTILITIES_TESTS)
90
91# Tests which are expected to fail
92XFAIL_TESTS = \
93 $(TESTS_XFAIL_TESTS) \
94 $(UTILITIES_XFAIL_TESTS)
95
96TOP_EXTRA_DIST = \
97 AUTHORS.txt \
98 ChangeLog \
99 LICENSE \
100 QuickStart.txt \
101 NOTICE \
102 Install-mac.txt \
103 Install-unix.txt \
104 Install-vms.txt \
105 Install-windows.txt \
106 magick.sh.in \
107 Magickshr.opt \
cristy3ed852e2009-09-05 21:47:34 +0000108 NEWS.txt \
109 Platforms.txt \
110 README.txt \
111 index.html \
112 version.sh \
113 winpath.sh
114
115# Additional files to distribute
116EXTRA_DIST = \
117 $(TOP_EXTRA_DIST) \
118 $(CONFIG_EXTRA_DIST) \
cristy4c08aed2011-07-01 19:47:50 +0000119 $(MAGICKCORE_EXTRA_DIST) \
120 $(MAGICKWAND_EXTRA_DIST) \
cristy3ed852e2009-09-05 21:47:34 +0000121 $(MAGICKPP_EXTRA_DIST) \
122 $(UTILITIES_EXTRA_DIST) \
123 $(TESTS_EXTRA_DIST)
124
125lib_LTLIBRARIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(MAGICKPP_LIBS)
126AM_LDFLAGS =
127noinst_LTLIBRARIES =
128EXTRA_LTLIBRARIES =
129BUILT_SOURCES =
130MOSTLYCLEANFILES =
131
132check_PROGRAMS = \
133 $(TESTS_CHECK_PGRMS) \
134 $(MAGICKPP_CHECK_PGRMS) \
cristy4c08aed2011-07-01 19:47:50 +0000135 $(MAGICKWAND_CHECK_PGRMS)
cristy3ed852e2009-09-05 21:47:34 +0000136
137include m4/Makefile.am
138include config/Makefile.am
cristy3ed852e2009-09-05 21:47:34 +0000139include coders/Makefile.am
cristy4c08aed2011-07-01 19:47:50 +0000140include MagickCore/Makefile.am
141include MagickWand/Makefile.am
cristy3ed852e2009-09-05 21:47:34 +0000142include Magick++/Makefile.am
cristy4c08aed2011-07-01 19:47:50 +0000143include filters/Makefile.am
cristy3ed852e2009-09-05 21:47:34 +0000144include utilities/Makefile.am
145include tests/Makefile.am
146include PerlMagick/Makefile.am
147
148# Pkgconfig directory
149pkgconfigdir = $(libdir)/pkgconfig
150
151# Files to install in Pkgconfig directory
152pkgconfig_DATA = \
cristy4c08aed2011-07-01 19:47:50 +0000153 $(MAGICKCORE_PKGCONFIG) \
154 $(MAGICKWAND_PKGCONFIG) \
cristy3ed852e2009-09-05 21:47:34 +0000155 $(MAGICKPP_PKGCONFIG)
156
cristycc22d1d2012-12-10 13:03:25 +0000157# create a copy for pc file (ideally the non abi should be symlinked)
cristy696c4f12013-02-14 00:50:18 +0000158%-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.pc: %.pc
cristycc22d1d2012-12-10 13:03:25 +0000159 cp -f $^ $@
160
cristy3ed852e2009-09-05 21:47:34 +0000161# Manual pages to install
162man_MANS = \
cristy4c08aed2011-07-01 19:47:50 +0000163 $(MAGICKCORE_MANS) \
164 $(MAGICKWAND_MANS) \
cristy3ed852e2009-09-05 21:47:34 +0000165 $(MAGICKPP_MANS) \
166 $(UTILITIES_MANS)
167
168# Architecture independent data files installed in the package's data directory
cristy986d3c22011-03-30 14:11:37 +0000169docdir = $(DOCUMENTATION_PATH)
cristy3ed852e2009-09-05 21:47:34 +0000170doc_DATA = \
171 LICENSE \
172 ChangeLog \
173 NEWS.txt
174
175if MAINTAINER_MODE
cristye6922d42010-03-04 01:56:45 +0000176MAINTAINER_TARGETS = \
cristy999b6472010-04-15 01:18:53 +0000177 magick-version \
178 ImageMagick.spec \
179 $(PERLMAGICK_MAINTAINER_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000180endif
181
182all-local: $(MAGICKPP_LOCAL_TARGETS) $(PERLMAGICK_ALL_LOCAL_TARGETS) $(MAINTAINER_TARGETS)
183
cristy9ebfdfb2012-03-26 12:55:00 +0000184install-exec-local: $(PERLMAGICK_INSTALL_EXEC_LOCAL_TARGETS) \
185 $(UTILITIES_INSTALL_EXEC_LOCAL_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000186
cristy9ebfdfb2012-03-26 12:55:00 +0000187install-data-local: $(MAGICK_INSTALL_DATA_LOCAL_TARGETS) \
188 $(PERLMAGICK_INSTALL_DATA_LOCAL_TARGETS) \
189 $(HTML_INSTALL_DATA_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000190
cristy9ebfdfb2012-03-26 12:55:00 +0000191uninstall-local: $(MAGICK_UNINSTALL_LOCAL_TARGETS) \
192 $(PERLMAGICK_UNINSTALL_LOCAL_TARGETS) \
193 $(HTML_UNINSTALL_DATA_TARGETS) \
194 $(UTILITIES_UNINSTALL_LOCAL_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000195
cristy8d0ff762013-03-10 20:33:28 +0000196install-exec-hook:
cristydb548ce2013-04-11 01:03:37 +0000197 @list='$(utilities_bin_PROGRAMS)'; test -n "$(utilities_bindir)" || list=; \
198 if test -n "$$list"; then \
199 echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
200 $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
201 fi; \
202 for p in $$list; do echo "$$p $$p"; done | \
203 sed 's/^utilities\///g' | sed 's/$(EXEEXT)$$//' | \
204 while read p p1; do if test -f $$p || test -f $$p1; \
205 then echo "$$p"; echo "$$p"; else :; fi; \
206 done | \
207 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
208 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
209 sed 'N;N;N;s,\n, ,g' | \
210 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
211 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
212 if ($$2 == $$4) files[d] = files[d] " " $$1; \
213 else { print "f", $$3 "/" $$4, $$1; } } \
214 END { for (d in files) print "f", d, files[d] }' | \
215 while read type dir files; do \
216 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
217 test -z "$$files" || { \
218 echo "$(LN_S) $(DESTDIR)$(utilities_bindir)/$$dir ./$$dir"; \
219 (cd $(DESTDIR)/$(bindir) && \
cristy7473adf2013-04-12 18:01:23 +0000220 rm -f ./$$dir && \
cristydb548ce2013-04-11 01:03:37 +0000221 $(LN_S) $(DESTDIR)/$(utilities_bindir)/$$dir ./$$dir) || exit $$?; \
222 } \
223 ; done;
224
cristy8d0ff762013-03-10 20:33:28 +0000225uninstall-hook:
cristydb548ce2013-04-11 01:03:37 +0000226 @list='$(utilities_bin_PROGRAMS)'; test -n "$(utilities_bindir)" || list=; \
227 for p in $$list; do echo "$$p $$p"; done | \
228 sed 's/^utilities\///g' | sed 's/$(EXEEXT)$$//' | \
229 while read p p1; do if test -f $$p || test -f $$p1; \
230 then echo "$$p"; echo "$$p"; else :; fi; \
231 done | \
232 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
233 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
234 sed 'N;N;N;s,\n, ,g' | \
235 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
236 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
237 if ($$2 == $$4) files[d] = files[d] " " $$1; \
238 else { print "f", $$3 "/" $$4, $$1; } } \
239 END { for (d in files) print "f", d, files[d] }' | \
240 while read type dir files; do \
241 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
242 test -z "$$files" || { \
243 echo " link program $$files to '$(DESTDIR)$(bindir)$$dir'"; \
244 for file in $$files ; do \
245 (cd $(DESTDIR)/$(bindir) && \
246 rm -f ./$$dir) || exit $$?; \
247 done; \
248 } \
249 ; done;
cristy8d0ff762013-03-10 20:33:28 +0000250 rm -r -f $(LIB_BIN_DIR_PATH)
251
cristy3ed852e2009-09-05 21:47:34 +0000252clean-local: $(PERLMAGICK_CLEAN_LOCAL_TARGETS)
253
254distclean-local: $(PERLMAGICK_DISTCLEAN_LOCAL_TARGETS)
255
256maintainer-clean-local: $(PERLMAGICK_MAINTAINER_CLEAN_LOCAL_TARGETS)
257
258check-local: $(PERLMAGICK_CHECK_LOCAL_TARGETS)
259
cristy2d9c0312010-04-17 23:58:07 +0000260# drd: valgrind's newer thread error detector
cristy3ed852e2009-09-05 21:47:34 +0000261drd:
cristy9c7e2af2010-05-23 23:13:27 +0000262 $(MAKE) MEMCHECK='valgrind --tool=drd --check-stack-var=yes --var-info=yes \
263 --quiet $(VALGRIND_EXTRA_OPTS)' check
264
cristy2d9c0312010-04-17 23:58:07 +0000265# helgrind: valgrind's older thread error detector
cristy3ed852e2009-09-05 21:47:34 +0000266helgrind:
cristy9c7e2af2010-05-23 23:13:27 +0000267 $(MAKE) MEMCHECK='valgrind --tool=helgrind --error-exitcode=2 --quiet \
268 $(VALGRIND_EXTRA_OPTS)' check
cristy3ed852e2009-09-05 21:47:34 +0000269
cristy2d9c0312010-04-17 23:58:07 +0000270# memcheck: valgrind's memory access checker
cristy3ed852e2009-09-05 21:47:34 +0000271memcheck:
cristy9c7e2af2010-05-23 23:13:27 +0000272 $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \
273 --error-exitcode=2 --track-origins=yes --num-callers=12 \
274 --quiet $(VALGRIND_EXTRA_OPTS)' check
cristy3ed852e2009-09-05 21:47:34 +0000275
cristy2d9c0312010-04-17 23:58:07 +0000276# ptrcheck: valgrind's experimental pointer checking tool.
cristy3ed852e2009-09-05 21:47:34 +0000277ptrcheck:
cristy9c7e2af2010-05-23 23:13:27 +0000278 $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
cristy3ed852e2009-09-05 21:47:34 +0000279
280# Non-Automake subdirectories to distribute
cristy922bc2e2013-01-01 17:43:33 +0000281DISTDIRS = images scripts www PerlMagick
cristy3ed852e2009-09-05 21:47:34 +0000282dist-hook:
283 ( \
284 builddir=`pwd` ; \
285 cd $(srcdir) && \
286 ( \
287 for dir in $(DISTDIRS) ; do \
cristy922bc2e2013-01-01 17:43:33 +0000288 find $$dir -depth -print | egrep -v '(~$$)|(/.svn)|(/\.#)|(/\.deps)|(/\.svn)' \
cristy3ed852e2009-09-05 21:47:34 +0000289 | cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \
290 done \
291 ) \
292 )
293
294#
295# Additional install rules
296#
297
298# Install HTML files
299pkgdocdir = $(DOCUMENTATION_PATH)
cristy0e496242011-03-19 13:00:57 +0000300DOCDIRS = images images/patterns www www/api www/source www/api/MagickCore www/api/MagickWand www/Magick++
cristy3ed852e2009-09-05 21:47:34 +0000301HTML_INSTALL_DATA_TARGETS = install-data-html
302install-data-html:
303 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
304 $(INSTALL_DATA) $(srcdir)/index.html $(DESTDIR)$(pkgdocdir)
305 @for dir in $(DOCDIRS) ; do \
306 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
307 for file in $(srcdir)/$$dir/*.* ; do \
308 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$$dir" ; \
309 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$$dir ; \
310 done ; \
311 done
312
313# Uninstall HTML files
314HTML_UNINSTALL_DATA_TARGETS = uninstall-data-html
315uninstall-data-html:
316 rm -f $(DESTDIR)$(pkgdocdir)/index.html
317 for dir in $(DOCDIRS) ; do \
318 rm -f -r $(DESTDIR)$(pkgdocdir)/$$dir ; \
319 done
320
cristy4c08aed2011-07-01 19:47:50 +0000321# Ensure that version.h at $(srcdir)/MagickCore/version.h is kept up to date.
322magick-version: MagickCore/version.h
cristy3ed852e2009-09-05 21:47:34 +0000323 @if test -f "$(srcdir)/VisualMagick/installer/inc/version.isx.in" ; then \
324 ./config.status --file="$(srcdir)/../VisualMagick/installer/inc/version.isx" 2> /dev/null ; \
325 fi
326 @if test -n "$(VPATH)" ; then \
cristy4c08aed2011-07-01 19:47:50 +0000327 cmp MagickCore/version.h $(srcdir)/MagickCore/version.h > /dev/null ; \
cristy3ed852e2009-09-05 21:47:34 +0000328 if test $$? -eq 1 ; then \
cristy4c08aed2011-07-01 19:47:50 +0000329 echo "Updating $(srcdir)/MagickCore/version.h ..."; \
330 cp MagickCore/version.h $(srcdir)/MagickCore/version.h ; \
cristy3ed852e2009-09-05 21:47:34 +0000331 fi ; \
332 fi ; \
333 touch magick-version
334
335${srcdir}/configure: ${srcdir}/version.sh
336
337# Automagically reconfigure libtool
338LIBTOOL_DEPS = @LIBTOOL_DEPS@
339libtool: $(LIBTOOL_DEPS)
340 $(SHELL) ./config.status --recheck
341
342# Format C API documentation
343html:
344 doxygen config/MagickCore.dox
345 doxygen config/MagickWand.dox
cristy3e049f82013-02-13 13:26:53 +0000346 doxygen config/Magick++.dox
cristy3ed852e2009-09-05 21:47:34 +0000347
348#
349# Build Windows source Zip and 7Zip balls
350#
351if ZIP_DELEGATE
cristy15a88782010-01-31 23:24:49 +0000352DIST_WINDOWS_SRC_ZIP=$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-windows.zip
cristy3ed852e2009-09-05 21:47:34 +0000353else
354DIST_WINDOWS_SRC_ZIP=
355endif
356if P7ZIP_DELEGATE
cristy15a88782010-01-31 23:24:49 +0000357DIST_WINDOWS_SRC_7ZIP=$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-windows.7z
cristy3ed852e2009-09-05 21:47:34 +0000358else
359DIST_WINDOWS_SRC_7ZIP=
360endif
361$(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) windows-dist:
cristy15a88782010-01-31 23:24:49 +0000362 if test -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; then \
363 chmod -R u+w $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \
364 rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \
cristy3ed852e2009-09-05 21:47:34 +0000365 fi
cristy15a88782010-01-31 23:24:49 +0000366 svn export https://subversion.imagemagick.org/subversion/ImageMagick-Windows/trunk $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000367if ZIP_DELEGATE
368 rm -f $(DIST_WINDOWS_SRC_ZIP)
cristy15a88782010-01-31 23:24:49 +0000369 $(ZIP) -r -9 -q $(DIST_WINDOWS_SRC_ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000370endif # ZIP_DELEGATE
371if P7ZIP_DELEGATE
372 rm -f $(DIST_WINDOWS_SRC_7ZIP)
cristy15a88782010-01-31 23:24:49 +0000373 $(P7ZIP) a -t7z -mx=9 $(DIST_WINDOWS_SRC_7ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000374 chmod 644 $(DIST_WINDOWS_SRC_7ZIP)
375endif # P7ZIP_DELEGATE
cristy15a88782010-01-31 23:24:49 +0000376 rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000377
378#
379# RPM build support
380#
381if RPM_DELEGATE
382
cristy2d9c0312010-04-17 23:58:07 +0000383DIST_ARCHIVE_SRPM=$(distdir)-1.src.rpm
cristy3ed852e2009-09-05 21:47:34 +0000384.PHONY: srpm
anthony1e3d36d2012-02-23 12:29:17 +0000385$(DIST_ARCHIVE_SRPM) srpm: dist-bzip2
cristy3ed852e2009-09-05 21:47:34 +0000386 rm -f $(DIST_ARCHIVE_SRPM)
387 $(RPM) --define="_sourcedir `pwd`" --define="_srcrpmdir `pwd`" --nodeps --bs ImageMagick.spec
388 @echo ==============================================================
389 @echo $(DIST_ARCHIVE_SRPM) is ready for distribution.
390 @echo ==============================================================
391
cristy3225a072010-04-17 01:47:28 +0000392RPMDIR=rpmbuild
393RPMARCH=$(MAGICK_TARGET_CPU)
cristy3ed852e2009-09-05 21:47:34 +0000394
395DIST_ARCHIVE_RPM= \
cristy15a88782010-01-31 23:24:49 +0000396 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
397 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
398 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
399 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
400 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-perl-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm
cristy3ed852e2009-09-05 21:47:34 +0000401
402.PHONY: rpm
cristy2d9c0312010-04-17 23:58:07 +0000403rpm: dist
cristy3ed852e2009-09-05 21:47:34 +0000404 rm -rf $(RPMDIR)
cristy78cd7652010-04-17 22:50:03 +0000405 $(MKDIR_P) $(RPMDIR)
406 $(MKDIR_P) $(RPMDIR)/BUILD
407 $(MKDIR_P) $(RPMDIR)/RPMS
cristy3ed852e2009-09-05 21:47:34 +0000408 $(RPM) --define="_sourcedir `pwd`" --define="_rpmdir `pwd`/$(RPMDIR)/RPMS" --define="_builddir `pwd`/$(RPMDIR)/BUILD" --nodeps -bb ImageMagick.spec
cristy3ed852e2009-09-05 21:47:34 +0000409 @echo ==============================================================
410 @echo $(DIST_ARCHIVE_RPM) is ready for distribution.
411 @echo ==============================================================
412
413else
414DIST_ARCHIVE_RPM=
415endif # RPM_DELEGATE
416
417#
418# Build a validated snapshot release and move to the snapshots directory.
419#
420snapshot: distcheck
421 $(MAKE) $(DIST_ARCHIVE_SRPM)
422 $(MAKE) $(DIST_WINDOWS_SRC_ZIP)
423 $(MAKE) $(DIST_WINDOWS_SRC_7ZIP)
cristy72ab5002011-07-07 18:33:45 +0000424 mv $(DIST_ARCHIVES) $(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) $(DIST_ARCHIVE_SRPM) /var/ftp/pub/ImageMagick/alpha/