-# Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization
+# Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
# dedicated to making software imaging solutions freely available.
#
# You may not use this file except in compliance with the License. You may
# obtain a copy of the License at
#
-# http://www.imagemagick.org/script/license.php
+# https://www.imagemagick.org/script/license.php
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# Top-Level Makefile for building ImageMagick.
#
+topincludedir = @includedir@/MagickCore
+
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
ACLOCAL_AMFLAGS = -I m4
MODULECOMMONFLAGS = -no-undefined -export-symbols-regex ".*" -shared -module -avoid-version
-
-SUBDIRS = .
+MODULECOMMONCPPFLAGS = $(AM_CPPFLAGS)
# Options to pass when running configure in the distcheck target.
#
# compiler, headers, and libraries are used as for a normal build.
DISTCHECK_CONFIGURE_FLAGS=$(DISTCHECK_CONFIG_FLAGS)
-DISTCLEANFILES = _configs.sed MagickCore/magick-config.h
+DISTCLEANFILES = _configs.sed MagickCore/magick-baseconfig.h
## Make sure these will be cleaned even when they're not built by default.
CLEANFILES = \
$(UTILITIES_CLEANFILES) \
$(TESTS_CLEANFILES)
-utilities_bin_PROGRAMS = \
+bin_PROGRAMS = \
$(UTILITIES_PGMS)
-utilities_bindir = $(LIB_BIN_DIR_PATH)
-
# Binary scripts
bin_SCRIPTS = \
Platforms.txt \
README.txt \
index.html \
+ gitversion.sh \
version.sh \
winpath.sh
%-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.pc: %.pc
cp -f $^ $@
+# Architecture independent data files installed in the package's data directory
+docdir = $(DOCUMENTATION_PATH)
+
# Manual pages to install
+if INSTALL_DOC#
man_MANS = \
$(MAGICKCORE_MANS) \
$(MAGICKWAND_MANS) \
$(MAGICKPP_MANS) \
$(UTILITIES_MANS)
-# Architecture independent data files installed in the package's data directory
-docdir = $(DOCUMENTATION_PATH)
doc_DATA = \
LICENSE \
ChangeLog \
NEWS.txt
+endif
if MAINTAINER_MODE
MAINTAINER_TARGETS = \
install-exec-local: $(PERLMAGICK_INSTALL_EXEC_LOCAL_TARGETS) \
$(UTILITIES_INSTALL_EXEC_LOCAL_TARGETS)
-install-data-local: $(MAGICK_INSTALL_DATA_LOCAL_TARGETS) \
- $(PERLMAGICK_INSTALL_DATA_LOCAL_TARGETS) \
- $(HTML_INSTALL_DATA_TARGETS)
-
-uninstall-local: $(MAGICK_UNINSTALL_LOCAL_TARGETS) \
- $(PERLMAGICK_UNINSTALL_LOCAL_TARGETS) \
- $(HTML_UNINSTALL_DATA_TARGETS) \
- $(UTILITIES_UNINSTALL_LOCAL_TARGETS)
-
-install-exec-hook:
- @list='$(utilities_bin_PROGRAMS)'; test -n "$(utilities_bindir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
- fi; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/^utilities\///g' | sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo "$(LN_S) $(DESTDIR)$(utilities_bindir)/$$dir ./$$dir"; \
- (cd $(DESTDIR)/$(bindir) && \
- $(LN_S) $(DESTDIR)/$(utilities_bindir)/$$dir ./$$dir) || exit $$?; \
- } \
- ; done;
-
-uninstall-hook:
- @list='$(utilities_bin_PROGRAMS)'; test -n "$(utilities_bindir)" || list=; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/^utilities\///g' | sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " link program $$files to '$(DESTDIR)$(bindir)$$dir'"; \
- for file in $$files ; do \
- (cd $(DESTDIR)/$(bindir) && \
- rm -f ./$$dir) || exit $$?; \
- done; \
- } \
- ; done;
- rm -r -f $(LIB_BIN_DIR_PATH)
+install-data-local: $(PERLMAGICK_INSTALL_DATA_LOCAL_TARGETS) $(HTML_INSTALL_DATA_TARGETS)
+
+uninstall-local: $(PERLMAGICK_UNINSTALL_LOCAL_TARGETS) $(HTML_UNINSTALL_DATA_TARGETS) $(UTILITIES_UNINSTALL_LOCAL_TARGETS)
clean-local: $(PERLMAGICK_CLEAN_LOCAL_TARGETS)
cd $(srcdir) && \
( \
for dir in $(DISTDIRS) ; do \
- find $$dir -depth -print | egrep -v '(~$$)|(/.svn)|(/\.#)|(/\.deps)|(/\.svn)' \
+ find $$dir -depth -print | egrep -v '(~$$)|(/.git)|(/\.#)|(/\.deps)|(/\.git)' \
| cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \
done \
) \
# Install HTML files
pkgdocdir = $(DOCUMENTATION_PATH)
-DOCDIRS = images images/patterns www www/api www/source www/api/MagickCore www/api/MagickWand www/Magick++
+DOCDIRSDOXYGEN = www/api/MagickCore www/api/MagickWand
+DOCDIRSMANUAL = images images/patterns www www/assets www/api www/source www/Magick++
+DOCDIRS= $(DOCDIRSMANUAL) $(DOCDIRSDOXYGEN)
+
+if INSTALL_DOC
HTML_INSTALL_DATA_TARGETS = install-data-html
+endif
+
install-data-html:
$(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
$(INSTALL_DATA) $(srcdir)/index.html $(DESTDIR)$(pkgdocdir)
@for dir in $(DOCDIRS) ; do \
$(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
- for file in $(srcdir)/$$dir/*.* ; do \
+ if test -d $(builddir)/$$dir ; then \
+ docsrcdir=$(builddir)/$$dir; \
+ else \
+ docsrcdir=$(srcdir)/$$dir; \
+ fi; \
+ for file in $$docsrcdir/*.* ; do \
echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$$dir" ; \
$(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$$dir ; \
done ; \
fi ; \
touch magick-version
-${srcdir}/configure: ${srcdir}/version.sh
+${srcdir}/configure: ${srcdir}/version.sh ${srcdir}/gitversion.sh
# Automagically reconfigure libtool
LIBTOOL_DEPS = @LIBTOOL_DEPS@
$(SHELL) ./config.status --recheck
# Format C API documentation
-html:
- doxygen config/MagickCore.dox
- doxygen config/MagickWand.dox
- doxygen config/Magick++.dox
+html-local:
+# copy static file
+ for dir in $(DOCDIRSMANUAL) ; do \
+ $(MKDIR_P) $(top_builddir)/$$dir ;\
+ for file in $$dir/*.* ; do \
+ if ! test -f $(top_builddir)/$$file; then \
+ cp -p -f $(top_srcdir)/$$file $(top_builddir)/$$dir ; \
+ fi; \
+ done ; \
+ done;
+# remove old doxygen files
+ for dir in $(DOCDIRDOXYGEN) ; do \
+ rm -rf $$dir || true; \
+ done;
+# make doxygen doc
+ $(MKDIR_P) $(top_builddir)/www/api
+ cd config && doxygen MagickCore.dox
+ cd config && doxygen MagickWand.dox
+ cd config && doxygen Magick++.dox
#
# Build Windows source Zip and 7Zip balls
chmod -R u+w $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \
rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) ; \
fi
- svn export https://subversion.imagemagick.org/subversion/ImageMagick-Windows/trunk $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
+ git clone git@git.imagemagick.org:repos/ImageMagick.git $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
if ZIP_DELEGATE
rm -f $(DIST_WINDOWS_SRC_ZIP)
$(ZIP) -r -9 -q $(DIST_WINDOWS_SRC_ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)
#
if RPM_DELEGATE
-DIST_ARCHIVE_SRPM=$(distdir)-1.src.rpm
+DIST_ARCHIVE_SRPM=$(distdir).src.rpm
.PHONY: srpm
$(DIST_ARCHIVE_SRPM) srpm: dist-bzip2
rm -f $(DIST_ARCHIVE_SRPM)
$(MAKE) $(DIST_ARCHIVE_SRPM)
$(MAKE) $(DIST_WINDOWS_SRC_ZIP)
$(MAKE) $(DIST_WINDOWS_SRC_7ZIP)
- mv $(DIST_ARCHIVES) $(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) $(DIST_ARCHIVE_SRPM) /var/ftp/pub/ImageMagick/alpha/
+ mv $(DIST_ARCHIVES) $(DIST_WINDOWS_SRC_ZIP) $(DIST_WINDOWS_SRC_7ZIP) $(DIST_ARCHIVE_SRPM) /var/ftp/pub/ImageMagick/beta/