#
-# $Id$
+# fontconfig/fc-match/Makefile.am
#
-# Copyright © 2003 Keith Packard
+# Copyright © 2003 Keith Packard
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
bin_PROGRAMS=fc-match
-man_MANS=fc-match.1
+DOC2MAN = docbook2man
-INCLUDES=$(FREETYPE_CFLAGS)
+FC_MATCH_SRC=${top_srcdir}/fc-match
-EXTRA_DIST=$(man_MANS)
+SGML = ${FC_MATCH_SRC}/fc-match.sgml
-fc_match_LDADD = ../src/libfontconfig.la
+INCLUDES=-I${top_srcdir} $(WARN_CFLAGS)
+
+BUILT_MANS=fc-match.1
+
+if ENABLE_DOCS
+man_MANS=${BUILT_MANS}
+endif
+
+EXTRA_DIST=fc-match.sgml $(BUILT_MANS)
+
+fc_match_LDADD = ${top_builddir}/src/libfontconfig.la
+
+if USEDOCBOOK
+
+${man_MANS}: ${SGML}
+ $(RM) $@
+ $(DOC2MAN) ${SGML}
+ $(RM) manpage.*
+
+all-local: $(man_MANS)
+
+clean-local:
+ $(RM) $(man_MANS)
+
+else
+all-local:
+clean-local:
+endif