cristy | 45ef08f | 2012-12-07 13:13:34 +0000 | [diff] [blame] | 1 | # Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2 | # 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 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 20 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) |
| 21 | |
| 22 | ACLOCAL_AMFLAGS = -I m4 |
| 23 | |
cristy | f5ee5be | 2009-11-06 02:22:56 +0000 | [diff] [blame] | 24 | MODULECOMMONFLAGS = -no-undefined -export-symbols-regex ".*" -shared -module -avoid-version |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 25 | |
cristy | 9b86f20 | 2012-11-28 21:55:35 +0000 | [diff] [blame] | 26 | SUBDIRS = . |
| 27 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 28 | # 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. |
| 32 | DISTCHECK_CONFIGURE_FLAGS=$(DISTCHECK_CONFIG_FLAGS) |
| 33 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 34 | DISTCLEANFILES = _configs.sed MagickCore/magick-config.h |
cristy | 5062079 | 2010-02-09 00:42:32 +0000 | [diff] [blame] | 35 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 36 | ## Make sure these will be cleaned even when they're not built by default. |
| 37 | CLEANFILES = \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 38 | $(MAGICKWAND_CLEANFILES) \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 39 | $(MAGICKPP_CLEANFILES) \ |
| 40 | $(UTILITIES_CLEANFILES) \ |
cristy | 52cf7f1 | 2010-02-07 18:07:56 +0000 | [diff] [blame] | 41 | $(TESTS_CLEANFILES) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 42 | |
| 43 | bin_PROGRAMS = \ |
| 44 | $(UTILITIES_PGMS) |
| 45 | |
| 46 | # Binary scripts |
| 47 | bin_SCRIPTS = \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 48 | $(MAGICKCORE_BIN_SCRPTS) \ |
| 49 | $(MAGICKWAND_BIN_SCRPTS) \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 50 | $(MAGICKPP_SCRPTS) |
| 51 | |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 52 | include_HEADERS = |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 53 | |
| 54 | # Headers which are not installed but which are distributed |
| 55 | noinst_HEADERS = \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 56 | $(MAGICKCORE_NOINST_HDRS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 57 | |
| 58 | if WIN32_NATIVE_BUILD |
| 59 | SRCDIR='$(shell @WinPathScript@ $(srcdir)/)' |
| 60 | else |
| 61 | SRCDIR="$(srcdir)/" |
| 62 | endif |
| 63 | |
cristy | bc55645 | 2012-08-17 19:44:03 +0000 | [diff] [blame] | 64 | # Tests with .tap extensions use the TAP protocol and TAP driver |
cristy | 9e524dc | 2012-08-21 00:07:27 +0000 | [diff] [blame] | 65 | LOG_COMPILER = $(SHELL) |
| 66 | |
| 67 | SH_LOG_COMPILER = $(LOG_COMPILER) |
| 68 | TAP_LOG_COMPILER = $(LOG_COMPILER) |
| 69 | |
| 70 | # Test extensions |
| 71 | TEST_EXTENSIONS = .sh .tap |
| 72 | |
cristy | bc55645 | 2012-08-17 19:44:03 +0000 | [diff] [blame] | 73 | TAP_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ |
| 74 | $(top_srcdir)/config/tap-driver.sh |
| 75 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 76 | # Environment parameters to be used during tests |
| 77 | TESTS_ENVIRONMENT = \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 78 | MAKE="$(MAKE)" \ |
| 79 | MAKEFLAGS="$(MAKEFLAGS)" \ |
cristy | 0cf6da5 | 2012-08-25 00:35:24 +0000 | [diff] [blame] | 80 | MEMCHECK="$(MEMCHECK)" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 81 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 82 | # Tests to run |
| 83 | TESTS = \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 84 | $(TESTS_TESTS) \ |
| 85 | $(MAGICKPP_TESTS) \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 86 | $(MAGICKWAND_TESTS) \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 87 | $(UTILITIES_TESTS) |
| 88 | |
| 89 | # Tests which are expected to fail |
| 90 | XFAIL_TESTS = \ |
| 91 | $(TESTS_XFAIL_TESTS) \ |
| 92 | $(UTILITIES_XFAIL_TESTS) |
| 93 | |
| 94 | TOP_EXTRA_DIST = \ |
| 95 | AUTHORS.txt \ |
| 96 | ChangeLog \ |
| 97 | LICENSE \ |
| 98 | QuickStart.txt \ |
| 99 | NOTICE \ |
| 100 | Install-mac.txt \ |
| 101 | Install-unix.txt \ |
| 102 | Install-vms.txt \ |
| 103 | Install-windows.txt \ |
| 104 | magick.sh.in \ |
| 105 | Magickshr.opt \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 106 | NEWS.txt \ |
| 107 | Platforms.txt \ |
| 108 | README.txt \ |
| 109 | index.html \ |
| 110 | version.sh \ |
| 111 | winpath.sh |
| 112 | |
| 113 | # Additional files to distribute |
| 114 | EXTRA_DIST = \ |
| 115 | $(TOP_EXTRA_DIST) \ |
| 116 | $(CONFIG_EXTRA_DIST) \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 117 | $(MAGICKCORE_EXTRA_DIST) \ |
| 118 | $(MAGICKWAND_EXTRA_DIST) \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 119 | $(MAGICKPP_EXTRA_DIST) \ |
| 120 | $(UTILITIES_EXTRA_DIST) \ |
| 121 | $(TESTS_EXTRA_DIST) |
| 122 | |
| 123 | lib_LTLIBRARIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(MAGICKPP_LIBS) |
| 124 | AM_LDFLAGS = |
| 125 | noinst_LTLIBRARIES = |
| 126 | EXTRA_LTLIBRARIES = |
| 127 | BUILT_SOURCES = |
| 128 | MOSTLYCLEANFILES = |
| 129 | |
| 130 | check_PROGRAMS = \ |
| 131 | $(TESTS_CHECK_PGRMS) \ |
| 132 | $(MAGICKPP_CHECK_PGRMS) \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 133 | $(MAGICKWAND_CHECK_PGRMS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 134 | |
| 135 | include m4/Makefile.am |
| 136 | include config/Makefile.am |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 137 | include coders/Makefile.am |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 138 | include MagickCore/Makefile.am |
| 139 | include MagickWand/Makefile.am |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 140 | include Magick++/Makefile.am |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 141 | include filters/Makefile.am |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 142 | include utilities/Makefile.am |
| 143 | include tests/Makefile.am |
| 144 | include PerlMagick/Makefile.am |
| 145 | |
| 146 | # Pkgconfig directory |
| 147 | pkgconfigdir = $(libdir)/pkgconfig |
| 148 | |
| 149 | # Files to install in Pkgconfig directory |
| 150 | pkgconfig_DATA = \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 151 | $(MAGICKCORE_PKGCONFIG) \ |
| 152 | $(MAGICKWAND_PKGCONFIG) \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 153 | $(MAGICKPP_PKGCONFIG) |
| 154 | |
cristy | cc22d1d | 2012-12-10 13:03:25 +0000 | [diff] [blame] | 155 | # create a copy for pc file (ideally the non abi should be symlinked) |
| 156 | %-@MAGICK_ABI_SUFFIX@.pc: %.pc |
| 157 | cp -f $^ $@ |
| 158 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 159 | # Manual pages to install |
| 160 | man_MANS = \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 161 | $(MAGICKCORE_MANS) \ |
| 162 | $(MAGICKWAND_MANS) \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 163 | $(MAGICKPP_MANS) \ |
| 164 | $(UTILITIES_MANS) |
| 165 | |
| 166 | # Architecture independent data files installed in the package's data directory |
cristy | 986d3c2 | 2011-03-30 14:11:37 +0000 | [diff] [blame] | 167 | docdir = $(DOCUMENTATION_PATH) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 168 | doc_DATA = \ |
| 169 | LICENSE \ |
| 170 | ChangeLog \ |
| 171 | NEWS.txt |
| 172 | |
| 173 | if MAINTAINER_MODE |
cristy | e6922d4 | 2010-03-04 01:56:45 +0000 | [diff] [blame] | 174 | MAINTAINER_TARGETS = \ |
cristy | 999b647 | 2010-04-15 01:18:53 +0000 | [diff] [blame] | 175 | magick-version \ |
| 176 | ImageMagick.spec \ |
| 177 | $(PERLMAGICK_MAINTAINER_TARGETS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 178 | endif |
| 179 | |
| 180 | all-local: $(MAGICKPP_LOCAL_TARGETS) $(PERLMAGICK_ALL_LOCAL_TARGETS) $(MAINTAINER_TARGETS) |
| 181 | |
cristy | 9ebfdfb | 2012-03-26 12:55:00 +0000 | [diff] [blame] | 182 | install-exec-local: $(PERLMAGICK_INSTALL_EXEC_LOCAL_TARGETS) \ |
| 183 | $(UTILITIES_INSTALL_EXEC_LOCAL_TARGETS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 184 | |
cristy | 9ebfdfb | 2012-03-26 12:55:00 +0000 | [diff] [blame] | 185 | install-data-local: $(MAGICK_INSTALL_DATA_LOCAL_TARGETS) \ |
| 186 | $(PERLMAGICK_INSTALL_DATA_LOCAL_TARGETS) \ |
| 187 | $(HTML_INSTALL_DATA_TARGETS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 188 | |
cristy | 9ebfdfb | 2012-03-26 12:55:00 +0000 | [diff] [blame] | 189 | uninstall-local: $(MAGICK_UNINSTALL_LOCAL_TARGETS) \ |
| 190 | $(PERLMAGICK_UNINSTALL_LOCAL_TARGETS) \ |
| 191 | $(HTML_UNINSTALL_DATA_TARGETS) \ |
| 192 | $(UTILITIES_UNINSTALL_LOCAL_TARGETS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 193 | |
| 194 | clean-local: $(PERLMAGICK_CLEAN_LOCAL_TARGETS) |
| 195 | |
| 196 | distclean-local: $(PERLMAGICK_DISTCLEAN_LOCAL_TARGETS) |
| 197 | |
| 198 | maintainer-clean-local: $(PERLMAGICK_MAINTAINER_CLEAN_LOCAL_TARGETS) |
| 199 | |
| 200 | check-local: $(PERLMAGICK_CHECK_LOCAL_TARGETS) |
| 201 | |
cristy | 2d9c031 | 2010-04-17 23:58:07 +0000 | [diff] [blame] | 202 | # drd: valgrind's newer thread error detector |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 203 | drd: |
cristy | 9c7e2af | 2010-05-23 23:13:27 +0000 | [diff] [blame] | 204 | $(MAKE) MEMCHECK='valgrind --tool=drd --check-stack-var=yes --var-info=yes \ |
| 205 | --quiet $(VALGRIND_EXTRA_OPTS)' check |
| 206 | |
cristy | 2d9c031 | 2010-04-17 23:58:07 +0000 | [diff] [blame] | 207 | # helgrind: valgrind's older thread error detector |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 208 | helgrind: |
cristy | 9c7e2af | 2010-05-23 23:13:27 +0000 | [diff] [blame] | 209 | $(MAKE) MEMCHECK='valgrind --tool=helgrind --error-exitcode=2 --quiet \ |
| 210 | $(VALGRIND_EXTRA_OPTS)' check |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 211 | |
cristy | 2d9c031 | 2010-04-17 23:58:07 +0000 | [diff] [blame] | 212 | # memcheck: valgrind's memory access checker |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 213 | memcheck: |
cristy | 9c7e2af | 2010-05-23 23:13:27 +0000 | [diff] [blame] | 214 | $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \ |
| 215 | --error-exitcode=2 --track-origins=yes --num-callers=12 \ |
| 216 | --quiet $(VALGRIND_EXTRA_OPTS)' check |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 217 | |
cristy | 2d9c031 | 2010-04-17 23:58:07 +0000 | [diff] [blame] | 218 | # ptrcheck: valgrind's experimental pointer checking tool. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 219 | ptrcheck: |
cristy | 9c7e2af | 2010-05-23 23:13:27 +0000 | [diff] [blame] | 220 | $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 221 | |
| 222 | # Non-Automake subdirectories to distribute |
cristy | 922bc2e | 2013-01-01 17:43:33 +0000 | [diff] [blame^] | 223 | DISTDIRS = images scripts www PerlMagick |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 224 | dist-hook: |
| 225 | ( \ |
| 226 | builddir=`pwd` ; \ |
| 227 | cd $(srcdir) && \ |
| 228 | ( \ |
| 229 | for dir in $(DISTDIRS) ; do \ |
cristy | 922bc2e | 2013-01-01 17:43:33 +0000 | [diff] [blame^] | 230 | find $$dir -depth -print | egrep -v '(~$$)|(/.svn)|(/\.#)|(/\.deps)|(/\.svn)' \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 231 | | cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \ |
| 232 | done \ |
| 233 | ) \ |
| 234 | ) |
| 235 | |
| 236 | # |
| 237 | # Additional install rules |
| 238 | # |
| 239 | |
| 240 | # Install HTML files |
| 241 | pkgdocdir = $(DOCUMENTATION_PATH) |
cristy | 0e49624 | 2011-03-19 13:00:57 +0000 | [diff] [blame] | 242 | DOCDIRS = images images/patterns www www/api www/source www/api/MagickCore www/api/MagickWand www/Magick++ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 243 | HTML_INSTALL_DATA_TARGETS = install-data-html |
| 244 | install-data-html: |
| 245 | $(mkinstalldirs) $(DESTDIR)$(pkgdocdir) |
| 246 | $(INSTALL_DATA) $(srcdir)/index.html $(DESTDIR)$(pkgdocdir) |
| 247 | @for dir in $(DOCDIRS) ; do \ |
| 248 | $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \ |
| 249 | for file in $(srcdir)/$$dir/*.* ; do \ |
| 250 | echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$$dir" ; \ |
| 251 | $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$$dir ; \ |
| 252 | done ; \ |
| 253 | done |
| 254 | |
| 255 | # Uninstall HTML files |
| 256 | HTML_UNINSTALL_DATA_TARGETS = uninstall-data-html |
| 257 | uninstall-data-html: |
| 258 | rm -f $(DESTDIR)$(pkgdocdir)/index.html |
| 259 | for dir in $(DOCDIRS) ; do \ |
| 260 | rm -f -r $(DESTDIR)$(pkgdocdir)/$$dir ; \ |
| 261 | done |
| 262 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 263 | # Ensure that version.h at $(srcdir)/MagickCore/version.h is kept up to date. |
| 264 | magick-version: MagickCore/version.h |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 265 | @if test -f "$(srcdir)/VisualMagick/installer/inc/version.isx.in" ; then \ |
| 266 | ./config.status --file="$(srcdir)/../VisualMagick/installer/inc/version.isx" 2> /dev/null ; \ |
| 267 | fi |
| 268 | @if test -n "$(VPATH)" ; then \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 269 | cmp MagickCore/version.h $(srcdir)/MagickCore/version.h > /dev/null ; \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 270 | if test $$? -eq 1 ; then \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 271 | echo "Updating $(srcdir)/MagickCore/version.h ..."; \ |
| 272 | cp MagickCore/version.h $(srcdir)/MagickCore/version.h ; \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 273 | fi ; \ |
| 274 | fi ; \ |
| 275 | touch magick-version |
| 276 | |
| 277 | ${srcdir}/configure: ${srcdir}/version.sh |
| 278 | |
| 279 | # Automagically reconfigure libtool |
| 280 | LIBTOOL_DEPS = @LIBTOOL_DEPS@ |
| 281 | libtool: $(LIBTOOL_DEPS) |
| 282 | $(SHELL) ./config.status --recheck |
| 283 | |
| 284 | # Format C API documentation |
| 285 | html: |
| 286 | doxygen config/MagickCore.dox |
| 287 | doxygen config/MagickWand.dox |
| 288 | |
| 289 | # |
| 290 | # Build Windows source Zip and 7Zip balls |
| 291 | # |
| 292 | if ZIP_DELEGATE |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 293 | DIST_WINDOWS_SRC_ZIP=$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-windows.zip |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 294 | else |
| 295 | DIST_WINDOWS_SRC_ZIP= |
| 296 | endif |
| 297 | if P7ZIP_DELEGATE |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 298 | DIST_WINDOWS_SRC_7ZIP=$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-windows.7z |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 299 | else |
| 300 | DIST_WINDOWS_SRC_7ZIP= |
| 301 | endif |
| 302 | $(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) windows-dist: |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 303 | if test -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; then \ |
| 304 | chmod -R u+w $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \ |
| 305 | rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 306 | fi |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 307 | svn export https://subversion.imagemagick.org/subversion/ImageMagick-Windows/trunk $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 308 | if ZIP_DELEGATE |
| 309 | rm -f $(DIST_WINDOWS_SRC_ZIP) |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 310 | $(ZIP) -r -9 -q $(DIST_WINDOWS_SRC_ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 311 | endif # ZIP_DELEGATE |
| 312 | if P7ZIP_DELEGATE |
| 313 | rm -f $(DIST_WINDOWS_SRC_7ZIP) |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 314 | $(P7ZIP) a -t7z -mx=9 $(DIST_WINDOWS_SRC_7ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 315 | chmod 644 $(DIST_WINDOWS_SRC_7ZIP) |
| 316 | endif # P7ZIP_DELEGATE |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 317 | rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 318 | |
| 319 | # |
| 320 | # RPM build support |
| 321 | # |
| 322 | if RPM_DELEGATE |
| 323 | |
cristy | 2d9c031 | 2010-04-17 23:58:07 +0000 | [diff] [blame] | 324 | DIST_ARCHIVE_SRPM=$(distdir)-1.src.rpm |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 325 | .PHONY: srpm |
anthony | 1e3d36d | 2012-02-23 12:29:17 +0000 | [diff] [blame] | 326 | $(DIST_ARCHIVE_SRPM) srpm: dist-bzip2 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 327 | rm -f $(DIST_ARCHIVE_SRPM) |
| 328 | $(RPM) --define="_sourcedir `pwd`" --define="_srcrpmdir `pwd`" --nodeps --bs ImageMagick.spec |
| 329 | @echo ============================================================== |
| 330 | @echo $(DIST_ARCHIVE_SRPM) is ready for distribution. |
| 331 | @echo ============================================================== |
| 332 | |
cristy | 3225a07 | 2010-04-17 01:47:28 +0000 | [diff] [blame] | 333 | RPMDIR=rpmbuild |
| 334 | RPMARCH=$(MAGICK_TARGET_CPU) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 335 | |
| 336 | DIST_ARCHIVE_RPM= \ |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 337 | $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \ |
| 338 | $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \ |
| 339 | $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-c++-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \ |
| 340 | $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm \ |
| 341 | $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-perl-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-$(PACKAGE_RELEASE).$(RPMARCH).rpm |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 342 | |
| 343 | .PHONY: rpm |
cristy | 2d9c031 | 2010-04-17 23:58:07 +0000 | [diff] [blame] | 344 | rpm: dist |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 345 | rm -rf $(RPMDIR) |
cristy | 78cd765 | 2010-04-17 22:50:03 +0000 | [diff] [blame] | 346 | $(MKDIR_P) $(RPMDIR) |
| 347 | $(MKDIR_P) $(RPMDIR)/BUILD |
| 348 | $(MKDIR_P) $(RPMDIR)/RPMS |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 349 | $(RPM) --define="_sourcedir `pwd`" --define="_rpmdir `pwd`/$(RPMDIR)/RPMS" --define="_builddir `pwd`/$(RPMDIR)/BUILD" --nodeps -bb ImageMagick.spec |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 350 | @echo ============================================================== |
| 351 | @echo $(DIST_ARCHIVE_RPM) is ready for distribution. |
| 352 | @echo ============================================================== |
| 353 | |
| 354 | else |
| 355 | DIST_ARCHIVE_RPM= |
| 356 | endif # RPM_DELEGATE |
| 357 | |
| 358 | # |
| 359 | # Build a validated snapshot release and move to the snapshots directory. |
| 360 | # |
| 361 | snapshot: distcheck |
| 362 | $(MAKE) $(DIST_ARCHIVE_SRPM) |
| 363 | $(MAKE) $(DIST_WINDOWS_SRC_ZIP) |
| 364 | $(MAKE) $(DIST_WINDOWS_SRC_7ZIP) |
cristy | 72ab500 | 2011-07-07 18:33:45 +0000 | [diff] [blame] | 365 | mv $(DIST_ARCHIVES) $(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) $(DIST_ARCHIVE_SRPM) /var/ftp/pub/ImageMagick/alpha/ |