Imported Upstream version 2.14.2
[platform/upstream/fontconfig.git] / Makefile.am
index f4203d6..6d4cd32 100644 (file)
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-DOCSRC=@DOCSRC@
-SUBDIRS=fontconfig fc-case fc-lang fc-glyphname src \
-       fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
-       conf.d $(DOCSRC) test
+SUBDIRS=fontconfig fc-case fc-lang src \
+       fc-cache fc-cat fc-conflist fc-list fc-match \
+       fc-pattern fc-query fc-scan fc-validate conf.d \
+       its po po-conf test
+if ENABLE_DOCS
+SUBDIRS += doc
+endif
 
-AUTOMAKE_OPTIONS = dist-bzip2
 ACLOCAL_AMFLAGS = -I m4
 
-EXTRA_DIST = \
-        fontconfig.pc.in \
-        fonts.conf.in \
+MESON_FILES = \
+       conf.d/link_confs.py \
+       conf.d/write-35-lang-normalize-conf.py \
+       doc/edit-sgml.py \
+       doc/extract-man-list.py \
+       doc/run-quiet.py \
+       fc-case/fc-case.py \
+       fc-lang/fc-lang.py \
+       meson.build \
+       meson_options.txt \
+       src/cutout.py \
+       src/fcstdint.h.in \
+       src/fcwindows.h \
+       src/fontconfig.def.in \
+       src/makealias.py \
+       $(wildcard $(srcdir)/*/meson.build) \
+       $(wildcard $(srcdir)/meson-cc-tests/*) \
+       $(wildcard $(srcdir)/subprojects/*.wrap)
+
+EXTRA_DIST = config.rpath  \
+       fontconfig.pc.in \
+       fonts.conf.in \
        fonts.dtd \
-        fontconfig.spec.in \
-        fontconfig.spec \
        fontconfig-zip.in \
-       config-fixups.h
+       config-fixups.h \
+       $(MESON_FILES)
 CLEANFILES = fonts.conf
 DISTCLEANFILES = config.cache doltcompile
 MAINTAINERCLEANFILES = \
@@ -52,9 +72,9 @@ MAINTAINERCLEANFILES = \
        $(srcdir)/ltmain.sh \
        $(srcdir)/missing \
        $(srcdir)/mkinstalldirs \
+       $(srcdir)/test-driver \
        `find "$(srcdir)" -type f -name Makefile.in -print`
 
-pkgconfigdir=$(libdir)/pkgconfig
 pkgconfig_DATA = fontconfig.pc
 
 baseconfigdir = $(BASECONFIGDIR)
@@ -63,7 +83,7 @@ configdir = $(CONFIGDIR)
 xmldir = $(XMLDIR)
 xml_DATA = fonts.dtd
 
-if CROSS_COMPILING
+if !ENABLE_CACHE_BUILD
   RUN_FC_CACHE_TEST=false
 else
   RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
@@ -76,7 +96,7 @@ EXTRA_DIST += ChangeLog
 ChangeLog: $(srcdir)/ChangeLog
 $(srcdir)/ChangeLog:
        if test -d "$(srcdir)/.git"; then \
-         (GIT_DIR=$(top_srcdir)/.git ./missing --run git log --stat) | fmt --split-only > $@.tmp \
+         (GIT_DIR=$(top_srcdir)/.git $(GIT) log --stat) | fmt --split-only > $@.tmp \
          && mv -f $@.tmp $@ \
          || ($(RM) $@.tmp; \
              echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
@@ -89,12 +109,14 @@ $(srcdir)/ChangeLog:
 
 .PHONY: ChangeLog
 
+FC_CONFIGDIR = $(subst $(BASECONFIGDIR)/,,$(CONFIGDIR))
+
 fonts.conf: fonts.conf.in Makefile
        sed \
                -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
-               -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \
+               -e 's,@FC_DEFAULT_FONTS\@,      $(FC_DEFAULT_FONTS),g' \
                -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
-               -e 's,@CONFIGDIR\@,$(CONFIGDIR),g' \
+               -e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \
                -e 's,@PACKAGE\@,$(PACKAGE),g' \
                -e 's,@VERSION\@,$(VERSION),g' \
                $(srcdir)/$@.in > $@.tmp && \
@@ -148,3 +170,17 @@ debuild-dirs: distdir
        $(RM) -r $(distdir).orig
        cp -a $(distdir) $(distdir).orig
        $(RM) -r $(distdir).orig/debian
+
+DISTCHECK_CONFIGURE_FLAGS =
+
+check-versions:
+       @$(GREP) -e "^[[:space:]]*version[[:space:]]*:[[:space:]]*'$(VERSION)'," $(srcdir)/meson.build >/dev/null || { \
+         echo "======================================================================================"; \
+         echo "Meson version does not seem to match autotools version $(VERSION), update meson.build!"; \
+         echo "======================================================================================"; \
+         exit 1; \
+       }
+
+all-local: check-versions
+
+-include $(top_srcdir)/git.mk