]> granicus.if.org Git - imagemagick/blobdiff - Makefile.am
Added checks for exceptions.
[imagemagick] / Makefile.am
index 288cd65bd3a2bb4337209c76dad1a98a0549354f..b0b0a6a5879cfcf38107f88e014c837631128311 100644 (file)
@@ -1,4 +1,4 @@
-#  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
+#  Copyright 1999-2014 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
@@ -31,7 +31,7 @@ SUBDIRS = .
 # 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 = \
@@ -152,19 +152,26 @@ pkgconfig_DATA = \
        $(MAGICKWAND_PKGCONFIG) \
        $(MAGICKPP_PKGCONFIG)
 
+# create a copy for pc file (ideally the non abi should be symlinked)
+%-@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 = \
@@ -216,14 +223,14 @@ ptrcheck:
        $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
 
 # Non-Automake subdirectories to distribute
-DISTDIRS = images scenes scripts www PerlMagick
+DISTDIRS = images scripts www PerlMagick
 dist-hook:
        ( \
          builddir=`pwd` ; \
          cd $(srcdir) && \
          ( \
            for dir in $(DISTDIRS) ; do \
-             find $$dir -depth -print | egrep -v '(~$$)|(/CVS)|(/\.#)|(/\.deps)|(/\.svn)' \
+             find $$dir -depth -print | egrep -v '(~$$)|(/.svn)|(/\.#)|(/\.deps)|(/\.svn)' \
                | cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \
            done \
          ) \
@@ -235,14 +242,25 @@ dist-hook:
 
 # 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/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 ; \
@@ -279,8 +297,18 @@ libtool: $(LIBTOOL_DEPS)
 
 # Format C API documentation
 html:
-       doxygen config/MagickCore.dox
-       doxygen config/MagickWand.dox
+       $(MKDIR_P) -p $(top_builddir)/www/api
+       cd config && doxygen MagickCore.dox
+       cd config && doxygen MagickWand.dox
+       cd config && doxygen Magick++.dox
+       for dir in $(DOCDIRSMANUAL) ; do \
+               $(MKDIR_P) $(top_builddir)/$$dir ;\
+               for file in $$dir/*.* ; do \
+                       if ! test -f $(top_builddir)/$$file; then \
+                               cp -f $(top_srcdir)/$$file $(top_builddir)/$$dir ; \
+                       fi; \
+               done ; \
+       done;
 
 #
 # Build Windows source Zip and 7Zip balls