IncludeExampleDirsInBuild=NO
#
+# Which ways should SGML documents be built?
+# options are: dvi ps pdf html rtf
+#
+SGMLDocWays=
+
+#
# Which ways should DocBook XML documents be built?
# options are: dvi ps pdf html
#
mandir = $(prefix)/man
endif
+#-----------------------------------------------------------------------------
+# install configuration
-################################################################################
#
-# Utilities programs: flags
+# Set this to have files installed with a specific owner
#
-################################################################################
+INSTALL_OWNER =
+
+#
+# Set this to have files installed with a specific group
+#
+INSTALL_GROUP =
+
+#
+# Invocations of `install' for the four different classes
+# of targets:
+#
+INSTALL_PROGRAM = $(INSTALL) -m 755
+INSTALL_SCRIPT = $(INSTALL) -m 755
+INSTALL_SHLIB = $(INSTALL) -m 755
+INSTALL_DATA = $(INSTALL) -m 644
+INSTALL_DIR = $(MKDIRHIER)
+
+# -----------------------------------------------------------------------------
+# Utilities programs: flags
# If you want to give any standard flags to pretty much any utility
# (see utils.mk for a complete list), by adding a line here
UNAME = uname
#-----------------------------------------------------------------------------
+# SGML stuff
+
+JADE = @JadeCmd@
+
+SGML2DVI = $(DOCBOOK_PREFIX)db2dvi
+SGML2HTML = $(DOCBOOK_PREFIX)db2html
+SGML2PS = $(DOCBOOK_PREFIX)db2ps
+SGML2PDF = $(DOCBOOK_PREFIX)db2pdf
+SGML2RTF = $(DOCBOOK_PREFIX)db2rtf
+
+SGMLSTYLESHEET = $(FPTOOLS_TOP_ABS)/docs/fptools-both.dsl
+
+SRC_SGML2DVI_OPTS = -d $(SGMLSTYLESHEET)
+SRC_SGML2HTML_OPTS = -d $(SGMLSTYLESHEET)
+SRC_SGML2PS_OPTS = -d $(SGMLSTYLESHEET)
+SRC_SGML2RTF_OPTS = -d $(SGMLSTYLESHEET)
+SRC_SGML2PDF_OPTS = -d $(SGMLSTYLESHEET)
+
+DOCBOOK_CATALOG = @Catalog@
+
+#-----------------------------------------------------------------------------
# DocBook XML stuff
XSLTPROC = @XsltprocCmd@
-#################################################################################
+################################################################################
#
# paths.mk
#
# This file defines Make variables for standard directories
# and file lists
#
-#################################################################################
+################################################################################
-
-#-----------------------------------------------------------------
-#
-# Installation setup
-#
-
-#-----------------------------------------------------------------------------
-# install configuration
-#
-# The install standard target is guided by the following four variables
-#
-# INSTALL_PROGS (installed in $(bindir))
-# INSTALL_LIBS (installed in $(libdir))
-# INSTALL_LIBEXECS (installed in $(libexecdir))
-# INSTALL_DATAS (installed in $(datadir))
-# INSTALL_IFACES (installed in $(ifacedir))
-#
-# see target.mk for more information.
-#
-
-#
-# Setting user/group ownership for the installed entities
-#
-# this stuff about "who" does the installing doesn't have make vars
-# as it is not intended to be run-time changeable.
-#
-ifneq "$(OWNER)" ""
-INSTALL_OWNER = -o $(OWNER)
-else
-INSTALL_OWNER =
-endif
-
-ifneq "$(GROUP)" ""
-INSTALL_GROUP = -g $(GROUP)
-else
-INSTALL_GROUP =
-endif
-
-SRC_INSTALL_OPTS += $(INSTALL_OWNER) $(INSTALL_GROUP)
-
-#
-# Invocations of `install' for the four different classes
-# of targets:
-#
-
-INSTALL_PROGRAM = $(INSTALL) -m 755
-INSTALL_SCRIPT = $(INSTALL) -m 755
-INSTALL_SHLIB = $(INSTALL) -m 755
-INSTALL_DATA = $(INSTALL) -m 644
-INSTALL_DIR = $(FPTOOLS_TOP)/glafp-utils/mkdirhier/mkdirhier
-
-#
-# The install variables does not have any defaults,
-# what files to install have to be specified in the Makefiles.
-#
-
-#################################################################################
+################################################################################
#
# Standard variable names
#
-#################################################################################
+################################################################################
# The fptools mk setup defines a set of standard names which are used
# by the standard targets provided by mk. One example of this is the
# use of standard names for specifying what files to compile, their
# within the various install targets instead.
#install:: install-dirs
+#
+# Setting user/group ownership for the installed entities
+#
+ifneq "$(INSTALL_OWNER)" ""
+SRC_INSTALL_OPTS += -o $(INSTALL_OWNER)
+endif
+ifneq "$(INSTALL_GROUP)" ""
+SRC_INSTALL_OPTS += -g $(INSTALL_GROUP)
+endif
+
+
ifneq "$(INSTALL_PROGS)" ""
#
endif
ifneq "$(INSTALL_DOCS)" ""
+ifneq "$(SGMLDocWays)" ""
+install-docs:: $(INSTALL_DOCS)
+ @$(INSTALL_DIR) $(datadir)
+ for i in $(INSTALL_DOCS); do \
+ $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(datadir); \
+ done
+endif
ifneq "$(XMLDocWays)" ""
install-docs:: $(INSTALL_DOCS)
@$(INSTALL_DIR) $(datadir)
endif
endif
+ifneq "$(INSTALL_SGML_DOC)" ""
+ifneq "$(SGMLDocWays)" ""
+install-docs:: $(foreach i,$(SGMLDocWays),$(INSTALL_SGML_DOC).$i)
+ @$(INSTALL_DIR) $(datadir)
+ @for i in $(SGMLDocWays); do \
+ if [ $$i = "html" ]; then \
+ $(INSTALL_DIR) $(datadir)/html; \
+ echo $(CP) -r $(INSTALL_SGML_DOC) $(datadir)/html; \
+ $(CP) -r $(INSTALL_SGML_DOC) $(datadir)/html; \
+ else \
+ echo $(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_SGML_DOC).$$i $(datadir); \
+ $(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_SGML_DOC).$$i $(datadir); \
+ fi \
+ done
+endif
+endif
+
#
# Use with care..
#
################################################################################
#
+# SGML Documentation
+#
+################################################################################
+
+.PHONY: dvi ps html pdf rtf
+
+ifneq "$(SGML_DOC)" ""
+
+all :: $(SGMLDocWays)
+
+# multi-file SGML document: main document name is specified in $(SGML_DOC),
+# sub-documents (.sgml files) listed in $(SGML_SRCS).
+
+ifeq "$(SGML_SRCS)" ""
+SGML_SRCS = $(wildcard *.sgml)
+endif
+
+SGML_TEX = $(addsuffix .tex,$(SGML_DOC))
+SGML_DVI = $(addsuffix .dvi,$(SGML_DOC))
+SGML_PS = $(addsuffix .ps,$(SGML_DOC))
+SGML_PDF = $(addsuffix .pdf,$(SGML_DOC))
+SGML_RTF = $(addsuffix .rtf,$(SGML_DOC))
+SGML_HTML = $(addsuffix .html,$(SGML_DOC))
+# HTML output goes in a subdirectory on its own.
+SGML_TEXT = $(addsuffix .txt,$(SGML_DOC))
+
+$(SGML_DVI) $(SGML_PS) $(SGML_HTML) $(SGML_TEXT) $(SGML_PDF) :: $(SGML_SRCS)
+
+dvi :: $(SGML_DVI)
+ps :: $(SGML_PS)
+pdf :: $(SGML_PDF)
+rtf :: $(SGML_RTF)
+html :: $(SGML_HTML)
+txt :: $(SGML_TEXT)
+
+CLEAN_FILES += $(SGML_TEXT) $(SGML_TEX) $(SGML_PS) $(SGML_DVI) $(SGML_PDF) $(SGML_RTF) $(SGML_HTML) $(SGML_DOC)-*.html
+# can't use $(SGML_SRCS) here, it was maybe used elsewhere
+
+extraclean ::
+ $(RM) -rf DBTOHTML_OUTPUT_*
+ $(RM) -rf *.junk/
+ $(RM) -rf $(SGML_DOC)
+endif
+
+################################################################################
+#
# DocBook XML Documentation
#
################################################################################