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