blob: 33406e25a7a5688e1bf152153ba6c5c08d12829d [file] [log] [blame]
Cristy7ce65e72015-12-12 18:03:16 -05001# Copyright 1999-2016 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
cristy7e01b022014-05-20 23:38:18 +000020topincludedir = @includedir@/MagickCore
21
cristy3ed852e2009-09-05 21:47:34 +000022AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
23
24ACLOCAL_AMFLAGS = -I m4
25
cristyf5ee5be2009-11-06 02:22:56 +000026MODULECOMMONFLAGS = -no-undefined -export-symbols-regex ".*" -shared -module -avoid-version
cristy30841e62014-05-19 00:45:15 +000027MODULECOMMONCPPFLAGS = $(AM_CPPFLAGS)
cristy3ed852e2009-09-05 21:47:34 +000028
29# Options to pass when running configure in the distcheck target.
30#
31# We want to preserve user-provided option variables so the same
32# compiler, headers, and libraries are used as for a normal build.
33DISTCHECK_CONFIGURE_FLAGS=$(DISTCHECK_CONFIG_FLAGS)
34
cristy87c34892013-05-06 16:07:28 +000035DISTCLEANFILES = _configs.sed MagickCore/magick-baseconfig.h
cristy50620792010-02-09 00:42:32 +000036
cristy3ed852e2009-09-05 21:47:34 +000037## Make sure these will be cleaned even when they're not built by default.
38CLEANFILES = \
cristy4c08aed2011-07-01 19:47:50 +000039 $(MAGICKWAND_CLEANFILES) \
cristy3ed852e2009-09-05 21:47:34 +000040 $(MAGICKPP_CLEANFILES) \
41 $(UTILITIES_CLEANFILES) \
cristy52cf7f12010-02-07 18:07:56 +000042 $(TESTS_CLEANFILES)
cristy3ed852e2009-09-05 21:47:34 +000043
cristy9e27ba82013-04-12 19:21:07 +000044bin_PROGRAMS = \
cristy3ed852e2009-09-05 21:47:34 +000045 $(UTILITIES_PGMS)
46
47# Binary scripts
48bin_SCRIPTS = \
cristy4c08aed2011-07-01 19:47:50 +000049 $(MAGICKCORE_BIN_SCRPTS) \
50 $(MAGICKWAND_BIN_SCRPTS) \
cristy3ed852e2009-09-05 21:47:34 +000051 $(MAGICKPP_SCRPTS)
52
cristy5eef09f2012-10-16 12:08:28 +000053include_HEADERS =
cristy3ed852e2009-09-05 21:47:34 +000054
55# Headers which are not installed but which are distributed
56noinst_HEADERS = \
cristy4c08aed2011-07-01 19:47:50 +000057 $(MAGICKCORE_NOINST_HDRS)
cristy3ed852e2009-09-05 21:47:34 +000058
59if WIN32_NATIVE_BUILD
60SRCDIR='$(shell @WinPathScript@ $(srcdir)/)'
61else
62SRCDIR="$(srcdir)/"
63endif
64
cristybc556452012-08-17 19:44:03 +000065# Tests with .tap extensions use the TAP protocol and TAP driver
cristy9e524dc2012-08-21 00:07:27 +000066LOG_COMPILER = $(SHELL)
67
68SH_LOG_COMPILER = $(LOG_COMPILER)
69TAP_LOG_COMPILER = $(LOG_COMPILER)
70
71# Test extensions
72TEST_EXTENSIONS = .sh .tap
73
cristybc556452012-08-17 19:44:03 +000074TAP_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
75 $(top_srcdir)/config/tap-driver.sh
76
cristy3ed852e2009-09-05 21:47:34 +000077# Environment parameters to be used during tests
78TESTS_ENVIRONMENT = \
cristy3ed852e2009-09-05 21:47:34 +000079 MAKE="$(MAKE)" \
80 MAKEFLAGS="$(MAKEFLAGS)" \
cristy0cf6da52012-08-25 00:35:24 +000081 MEMCHECK="$(MEMCHECK)"
cristy3ed852e2009-09-05 21:47:34 +000082
cristy3ed852e2009-09-05 21:47:34 +000083# Tests to run
84TESTS = \
cristy3ed852e2009-09-05 21:47:34 +000085 $(TESTS_TESTS) \
86 $(MAGICKPP_TESTS) \
cristy4c08aed2011-07-01 19:47:50 +000087 $(MAGICKWAND_TESTS) \
cristy3ed852e2009-09-05 21:47:34 +000088 $(UTILITIES_TESTS)
89
90# Tests which are expected to fail
91XFAIL_TESTS = \
92 $(TESTS_XFAIL_TESTS) \
93 $(UTILITIES_XFAIL_TESTS)
94
95TOP_EXTRA_DIST = \
96 AUTHORS.txt \
97 ChangeLog \
98 LICENSE \
99 QuickStart.txt \
100 NOTICE \
101 Install-mac.txt \
102 Install-unix.txt \
103 Install-vms.txt \
104 Install-windows.txt \
105 magick.sh.in \
106 Magickshr.opt \
cristy3ed852e2009-09-05 21:47:34 +0000107 NEWS.txt \
108 Platforms.txt \
109 README.txt \
110 index.html \
111 version.sh \
112 winpath.sh
113
114# Additional files to distribute
115EXTRA_DIST = \
116 $(TOP_EXTRA_DIST) \
117 $(CONFIG_EXTRA_DIST) \
cristy4c08aed2011-07-01 19:47:50 +0000118 $(MAGICKCORE_EXTRA_DIST) \
119 $(MAGICKWAND_EXTRA_DIST) \
cristy3ed852e2009-09-05 21:47:34 +0000120 $(MAGICKPP_EXTRA_DIST) \
121 $(UTILITIES_EXTRA_DIST) \
122 $(TESTS_EXTRA_DIST)
123
124lib_LTLIBRARIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(MAGICKPP_LIBS)
125AM_LDFLAGS =
126noinst_LTLIBRARIES =
127EXTRA_LTLIBRARIES =
128BUILT_SOURCES =
129MOSTLYCLEANFILES =
130
131check_PROGRAMS = \
132 $(TESTS_CHECK_PGRMS) \
133 $(MAGICKPP_CHECK_PGRMS) \
cristy4c08aed2011-07-01 19:47:50 +0000134 $(MAGICKWAND_CHECK_PGRMS)
cristy3ed852e2009-09-05 21:47:34 +0000135
136include m4/Makefile.am
137include config/Makefile.am
cristy3ed852e2009-09-05 21:47:34 +0000138include coders/Makefile.am
cristy4c08aed2011-07-01 19:47:50 +0000139include MagickCore/Makefile.am
140include MagickWand/Makefile.am
cristy3ed852e2009-09-05 21:47:34 +0000141include Magick++/Makefile.am
cristy4c08aed2011-07-01 19:47:50 +0000142include filters/Makefile.am
cristy3ed852e2009-09-05 21:47:34 +0000143include utilities/Makefile.am
144include tests/Makefile.am
145include PerlMagick/Makefile.am
146
147# Pkgconfig directory
148pkgconfigdir = $(libdir)/pkgconfig
149
150# Files to install in Pkgconfig directory
151pkgconfig_DATA = \
cristy4c08aed2011-07-01 19:47:50 +0000152 $(MAGICKCORE_PKGCONFIG) \
153 $(MAGICKWAND_PKGCONFIG) \
cristy3ed852e2009-09-05 21:47:34 +0000154 $(MAGICKPP_PKGCONFIG)
155
cristycc22d1d2012-12-10 13:03:25 +0000156# create a copy for pc file (ideally the non abi should be symlinked)
cristy696c4f12013-02-14 00:50:18 +0000157%-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.pc: %.pc
cristycc22d1d2012-12-10 13:03:25 +0000158 cp -f $^ $@
159
cristydd17feb2014-03-05 02:06:32 +0000160# Architecture independent data files installed in the package's data directory
161docdir = $(DOCUMENTATION_PATH)
162
cristy3ed852e2009-09-05 21:47:34 +0000163# Manual pages to install
cristydd17feb2014-03-05 02:06:32 +0000164if INSTALL_DOC#
cristy3ed852e2009-09-05 21:47:34 +0000165man_MANS = \
cristy4c08aed2011-07-01 19:47:50 +0000166 $(MAGICKCORE_MANS) \
167 $(MAGICKWAND_MANS) \
cristy3ed852e2009-09-05 21:47:34 +0000168 $(MAGICKPP_MANS) \
169 $(UTILITIES_MANS)
170
cristy3ed852e2009-09-05 21:47:34 +0000171doc_DATA = \
172 LICENSE \
173 ChangeLog \
174 NEWS.txt
cristydd17feb2014-03-05 02:06:32 +0000175endif
cristy3ed852e2009-09-05 21:47:34 +0000176
177if MAINTAINER_MODE
cristye6922d42010-03-04 01:56:45 +0000178MAINTAINER_TARGETS = \
cristy999b6472010-04-15 01:18:53 +0000179 magick-version \
180 ImageMagick.spec \
181 $(PERLMAGICK_MAINTAINER_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000182endif
183
184all-local: $(MAGICKPP_LOCAL_TARGETS) $(PERLMAGICK_ALL_LOCAL_TARGETS) $(MAINTAINER_TARGETS)
185
cristy9ebfdfb2012-03-26 12:55:00 +0000186install-exec-local: $(PERLMAGICK_INSTALL_EXEC_LOCAL_TARGETS) \
187 $(UTILITIES_INSTALL_EXEC_LOCAL_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000188
cristydd4b2b22014-05-27 22:11:42 +0000189install-data-local: $(PERLMAGICK_INSTALL_DATA_LOCAL_TARGETS) $(HTML_INSTALL_DATA_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000190
cristydd4b2b22014-05-27 22:11:42 +0000191uninstall-local: $(PERLMAGICK_UNINSTALL_LOCAL_TARGETS) $(HTML_UNINSTALL_DATA_TARGETS) $(UTILITIES_UNINSTALL_LOCAL_TARGETS)
cristy3ed852e2009-09-05 21:47:34 +0000192
193clean-local: $(PERLMAGICK_CLEAN_LOCAL_TARGETS)
194
195distclean-local: $(PERLMAGICK_DISTCLEAN_LOCAL_TARGETS)
196
197maintainer-clean-local: $(PERLMAGICK_MAINTAINER_CLEAN_LOCAL_TARGETS)
198
199check-local: $(PERLMAGICK_CHECK_LOCAL_TARGETS)
200
cristy2d9c0312010-04-17 23:58:07 +0000201# drd: valgrind's newer thread error detector
cristy3ed852e2009-09-05 21:47:34 +0000202drd:
cristy9c7e2af2010-05-23 23:13:27 +0000203 $(MAKE) MEMCHECK='valgrind --tool=drd --check-stack-var=yes --var-info=yes \
204 --quiet $(VALGRIND_EXTRA_OPTS)' check
205
cristy2d9c0312010-04-17 23:58:07 +0000206# helgrind: valgrind's older thread error detector
cristy3ed852e2009-09-05 21:47:34 +0000207helgrind:
cristy9c7e2af2010-05-23 23:13:27 +0000208 $(MAKE) MEMCHECK='valgrind --tool=helgrind --error-exitcode=2 --quiet \
209 $(VALGRIND_EXTRA_OPTS)' check
cristy3ed852e2009-09-05 21:47:34 +0000210
cristy2d9c0312010-04-17 23:58:07 +0000211# memcheck: valgrind's memory access checker
cristy3ed852e2009-09-05 21:47:34 +0000212memcheck:
cristy9c7e2af2010-05-23 23:13:27 +0000213 $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \
214 --error-exitcode=2 --track-origins=yes --num-callers=12 \
215 --quiet $(VALGRIND_EXTRA_OPTS)' check
cristy3ed852e2009-09-05 21:47:34 +0000216
cristy2d9c0312010-04-17 23:58:07 +0000217# ptrcheck: valgrind's experimental pointer checking tool.
cristy3ed852e2009-09-05 21:47:34 +0000218ptrcheck:
cristy9c7e2af2010-05-23 23:13:27 +0000219 $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
cristy3ed852e2009-09-05 21:47:34 +0000220
221# Non-Automake subdirectories to distribute
cristy922bc2e2013-01-01 17:43:33 +0000222DISTDIRS = images scripts www PerlMagick
cristy3ed852e2009-09-05 21:47:34 +0000223dist-hook:
224 ( \
225 builddir=`pwd` ; \
226 cd $(srcdir) && \
227 ( \
228 for dir in $(DISTDIRS) ; do \
Cristy6901d652015-08-15 05:36:48 -0400229 find $$dir -depth -print | egrep -v '(~$$)|(/.git)|(/\.#)|(/\.deps)|(/\.git)' \
cristy3ed852e2009-09-05 21:47:34 +0000230 | cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \
231 done \
232 ) \
233 )
234
235#
236# Additional install rules
237#
238
239# Install HTML files
240pkgdocdir = $(DOCUMENTATION_PATH)
cristy7c9c2bd2013-05-27 15:45:16 +0000241DOCDIRSDOXYGEN = www/api/MagickCore www/api/MagickWand
cristy67405bf2015-05-05 11:35:49 +0000242DOCDIRSMANUAL = images images/patterns www www/css www/js www/api www/source www/Magick++
cristy7c9c2bd2013-05-27 15:45:16 +0000243DOCDIRS= $(DOCDIRSMANUAL) $(DOCDIRSDOXYGEN)
cristydd17feb2014-03-05 02:06:32 +0000244
245if INSTALL_DOC
cristy3ed852e2009-09-05 21:47:34 +0000246HTML_INSTALL_DATA_TARGETS = install-data-html
cristy02272312014-03-07 00:55:25 +0000247endif
cristydd17feb2014-03-05 02:06:32 +0000248
cristy3ed852e2009-09-05 21:47:34 +0000249install-data-html:
250 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
251 $(INSTALL_DATA) $(srcdir)/index.html $(DESTDIR)$(pkgdocdir)
252 @for dir in $(DOCDIRS) ; do \
253 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
cristy7c9c2bd2013-05-27 15:45:16 +0000254 if test -d $(builddir)/$$dir ; then \
255 docsrcdir=$(builddir)/$$dir; \
256 else \
257 docsrcdir=$(srcdir)/$$dir; \
258 fi; \
259 for file in $$docsrcdir/*.* ; do \
cristy3ed852e2009-09-05 21:47:34 +0000260 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$$dir" ; \
261 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$$dir ; \
262 done ; \
263 done
264
265# Uninstall HTML files
266HTML_UNINSTALL_DATA_TARGETS = uninstall-data-html
267uninstall-data-html:
268 rm -f $(DESTDIR)$(pkgdocdir)/index.html
269 for dir in $(DOCDIRS) ; do \
270 rm -f -r $(DESTDIR)$(pkgdocdir)/$$dir ; \
271 done
272
cristy4c08aed2011-07-01 19:47:50 +0000273# Ensure that version.h at $(srcdir)/MagickCore/version.h is kept up to date.
274magick-version: MagickCore/version.h
cristy3ed852e2009-09-05 21:47:34 +0000275 @if test -f "$(srcdir)/VisualMagick/installer/inc/version.isx.in" ; then \
276 ./config.status --file="$(srcdir)/../VisualMagick/installer/inc/version.isx" 2> /dev/null ; \
277 fi
278 @if test -n "$(VPATH)" ; then \
cristy4c08aed2011-07-01 19:47:50 +0000279 cmp MagickCore/version.h $(srcdir)/MagickCore/version.h > /dev/null ; \
cristy3ed852e2009-09-05 21:47:34 +0000280 if test $$? -eq 1 ; then \
cristy4c08aed2011-07-01 19:47:50 +0000281 echo "Updating $(srcdir)/MagickCore/version.h ..."; \
282 cp MagickCore/version.h $(srcdir)/MagickCore/version.h ; \
cristy3ed852e2009-09-05 21:47:34 +0000283 fi ; \
284 fi ; \
285 touch magick-version
286
287${srcdir}/configure: ${srcdir}/version.sh
288
289# Automagically reconfigure libtool
290LIBTOOL_DEPS = @LIBTOOL_DEPS@
291libtool: $(LIBTOOL_DEPS)
292 $(SHELL) ./config.status --recheck
293
294# Format C API documentation
Cristy6720ed72016-02-09 09:27:35 -0500295html-local:
Cristy4de4f202015-09-16 16:50:53 -0400296# copy static file
cristy7c9c2bd2013-05-27 15:45:16 +0000297 for dir in $(DOCDIRSMANUAL) ; do \
298 $(MKDIR_P) $(top_builddir)/$$dir ;\
299 for file in $$dir/*.* ; do \
300 if ! test -f $(top_builddir)/$$file; then \
Cristy4de4f202015-09-16 16:50:53 -0400301 cp -p -f $(top_srcdir)/$$file $(top_builddir)/$$dir ; \
cristy7c9c2bd2013-05-27 15:45:16 +0000302 fi; \
303 done ; \
304 done;
Cristy4de4f202015-09-16 16:50:53 -0400305# remove old doxygen files
306 for dir in $(DOCDIRDOXYGEN) ; do \
307 rm -rf $$dir || true; \
308 done;
309# make doxygen doc
310 $(MKDIR_P) $(top_builddir)/www/api
311 cd config && doxygen MagickCore.dox
312 cd config && doxygen MagickWand.dox
313 cd config && doxygen Magick++.dox
cristy3ed852e2009-09-05 21:47:34 +0000314
315#
316# Build Windows source Zip and 7Zip balls
317#
318if ZIP_DELEGATE
cristy15a88782010-01-31 23:24:49 +0000319DIST_WINDOWS_SRC_ZIP=$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-windows.zip
cristy3ed852e2009-09-05 21:47:34 +0000320else
321DIST_WINDOWS_SRC_ZIP=
322endif
323if P7ZIP_DELEGATE
cristy15a88782010-01-31 23:24:49 +0000324DIST_WINDOWS_SRC_7ZIP=$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-windows.7z
cristy3ed852e2009-09-05 21:47:34 +0000325else
326DIST_WINDOWS_SRC_7ZIP=
327endif
328$(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) windows-dist:
cristy15a88782010-01-31 23:24:49 +0000329 if test -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; then \
330 chmod -R u+w $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \
331 rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \
cristy3ed852e2009-09-05 21:47:34 +0000332 fi
Cristy6901d652015-08-15 05:36:48 -0400333 git clone git@git.imagemagick.org:repos/ImageMagick.git $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000334if ZIP_DELEGATE
335 rm -f $(DIST_WINDOWS_SRC_ZIP)
cristy15a88782010-01-31 23:24:49 +0000336 $(ZIP) -r -9 -q $(DIST_WINDOWS_SRC_ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000337endif # ZIP_DELEGATE
338if P7ZIP_DELEGATE
339 rm -f $(DIST_WINDOWS_SRC_7ZIP)
cristy15a88782010-01-31 23:24:49 +0000340 $(P7ZIP) a -t7z -mx=9 $(DIST_WINDOWS_SRC_7ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000341 chmod 644 $(DIST_WINDOWS_SRC_7ZIP)
342endif # P7ZIP_DELEGATE
cristy15a88782010-01-31 23:24:49 +0000343 rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
cristy3ed852e2009-09-05 21:47:34 +0000344
345#
346# RPM build support
347#
348if RPM_DELEGATE
349
cristy2d9c0312010-04-17 23:58:07 +0000350DIST_ARCHIVE_SRPM=$(distdir)-1.src.rpm
cristy3ed852e2009-09-05 21:47:34 +0000351.PHONY: srpm
anthony1e3d36d2012-02-23 12:29:17 +0000352$(DIST_ARCHIVE_SRPM) srpm: dist-bzip2
cristy3ed852e2009-09-05 21:47:34 +0000353 rm -f $(DIST_ARCHIVE_SRPM)
354 $(RPM) --define="_sourcedir `pwd`" --define="_srcrpmdir `pwd`" --nodeps --bs ImageMagick.spec
355 @echo ==============================================================
356 @echo $(DIST_ARCHIVE_SRPM) is ready for distribution.
357 @echo ==============================================================
358
cristy3225a072010-04-17 01:47:28 +0000359RPMDIR=rpmbuild
360RPMARCH=$(MAGICK_TARGET_CPU)
cristy3ed852e2009-09-05 21:47:34 +0000361
362DIST_ARCHIVE_RPM= \
cristy15a88782010-01-31 23:24:49 +0000363 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
364 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
365 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
366 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \
367 $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-perl-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm
cristy3ed852e2009-09-05 21:47:34 +0000368
369.PHONY: rpm
cristy2d9c0312010-04-17 23:58:07 +0000370rpm: dist
cristy3ed852e2009-09-05 21:47:34 +0000371 rm -rf $(RPMDIR)
cristy78cd7652010-04-17 22:50:03 +0000372 $(MKDIR_P) $(RPMDIR)
373 $(MKDIR_P) $(RPMDIR)/BUILD
374 $(MKDIR_P) $(RPMDIR)/RPMS
cristy3ed852e2009-09-05 21:47:34 +0000375 $(RPM) --define="_sourcedir `pwd`" --define="_rpmdir `pwd`/$(RPMDIR)/RPMS" --define="_builddir `pwd`/$(RPMDIR)/BUILD" --nodeps -bb ImageMagick.spec
cristy3ed852e2009-09-05 21:47:34 +0000376 @echo ==============================================================
377 @echo $(DIST_ARCHIVE_RPM) is ready for distribution.
378 @echo ==============================================================
379
380else
381DIST_ARCHIVE_RPM=
382endif # RPM_DELEGATE
383
384#
385# Build a validated snapshot release and move to the snapshots directory.
386#
387snapshot: distcheck
388 $(MAKE) $(DIST_ARCHIVE_SRPM)
389 $(MAKE) $(DIST_WINDOWS_SRC_ZIP)
390 $(MAKE) $(DIST_WINDOWS_SRC_7ZIP)
cristy72ab5002011-07-07 18:33:45 +0000391 mv $(DIST_ARCHIVES) $(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) $(DIST_ARCHIVE_SRPM) /var/ftp/pub/ImageMagick/alpha/