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