0.8.13.70: MORE DOCUMENTATION
[sbcl.git] / doc / manual / Makefile
index 93f0be5..d74b422 100644 (file)
@@ -1,4 +1,3 @@
-
 DOCFILES:=$(shell echo *.texinfo)
 ROOTFILE:=sbcl.texinfo
 TMPFILES:=sbcl.aux sbcl.cp sbcl.fn sbcl.ky sbcl.log sbcl.pg sbcl.toc sbcl.tp sbcl.vr
@@ -7,14 +6,18 @@ PSFILE=sbcl.ps
 PDFFILE=sbcl.pdf
 DVIFILE=sbcl.dvi
 INFOFILE=sbcl.info
+VARSFILE=variables.template
 HTMLDIR=$(basename $(ROOTFILE))
 # Place where generated documentation ends up. The value of
 # DOCSTRINGDIR has to end with a slash or you lose (it's passed to
 # Lisp's `pathname' function).
 DOCSTRINGDIR="docstrings/"
-# List of package names that documentation will be created for.
-PACKAGES=":COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD"
-
+I_FLAGS=-I $(DOCSTRINGDIR) -I ../../contrib/
+# List of contrib modules that docstring docs will be created for.
+# FIXME: should check test-passed and not load them.
+MODULES=':sb-md5 :sb-rotate-byte :sb-grovel :sb-sprof :sb-bsd-sockets'
+# List of package names that docstring docs will be created for.
+PACKAGES=":COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD :SB-MD5 :SB-ROTATE-BYTE :SB-SPROF :SB-BSD-SOCKETS"
 
 ifeq ($(MAKEINFO),)
   MAKEINFO:=makeinfo
@@ -35,14 +38,16 @@ all: ps pdf info html
 dist: html pdf
 
 
+variables: ${VARSFILE}
+       ./extract-values.sh < ${VARSFILE} >variables.texinfo
 
 # html documentation; output in $(HTMLDIR)
 .PHONY: html
 html: html-stamp
 
-html-stamp: $(DOCFILES) docstrings
+html-stamp: variables $(DOCFILES) docstrings
        @rm -rf $(HTMLDIR)
-       $(MAKEINFO) -I $(DOCSTRINGDIR) --html $(ROOTFILE)
+       $(MAKEINFO) $(I_FLAGS) --html $(ROOTFILE)
        touch html-stamp
 
 # Postscript documentation
@@ -52,39 +57,42 @@ ps: $(PSFILE)
 $(PSFILE): $(DVIFILE)
        dvips -o $@ $<
 
-$(DVIFILE): $(DOCFILES) docstrings
-       texi2dvi -I $(DOCSTRINGDIR) $(ROOTFILE)
+$(DVIFILE): variables $(DOCFILES) docstrings
+       texi2dvi $(I_FLAGS) $(ROOTFILE)
 
 # PDF documentation
 .PHONY: pdf
 pdf: $(PDFFILE)
 
-$(PDFFILE): $(DOCFILES) docstrings
-       texi2pdf -I $(DOCSTRINGDIR) $(ROOTFILE)
+$(PDFFILE): variables $(DOCFILES) docstrings
+       texi2pdf $(I_FLAGS) $(ROOTFILE)
 
 # info docfiles
 .PHONY: info
 info: $(INFOFILE)
 
-$(INFOFILE): $(DOCFILES) docstrings
-       $(MAKEINFO) -I $(DOCSTRINGDIR) $(ROOTFILE)
+$(INFOFILE): variables $(DOCFILES) docstrings
+       $(MAKEINFO) $(I_FLAGS) $(ROOTFILE)
 
-# Texinfo docstring snippets; output hardcoded in docstrings/ for now.
-.PHONY: docstrings
-docstrings: docstrings-stamp
+# contrib-modules.texinfo includes contrib-doc-list.texi-temp
+contrib-modules.texinfo: tempfiles-stamp
 
-docstrings-stamp:
-       DOCSTRINGDIR=$(DOCSTRINGDIR) sh docstrings.sh
-       touch docstrings-stamp
+# Texinfo docstring snippets
+.PHONY: docstrings
+docstrings: tempfiles-stamp
 
+tempfiles-stamp:
+       DOCSTRINGDIR=$(DOCSTRINGDIR) PACKAGES=$(PACKAGES) MODULES=$(MODULES) sh make-tempfiles.sh && touch tempfiles-stamp
 
 
 .PHONY: clean
 clean: 
        rm -f *~ *.bak *.orig \#*\# .\#* texput.log *.fasl
        rm -rf $(HTMLDIR) $(DOCSTRINGDIR)
-       rm -f $(PSFILE) $(PDFFILE) $(DVIFILE) html-stamp docstrings-stamp
-       rm -f $(TMPFILES)
+       rm -f contrib-docs.texi-temp
+       rm -f package-locks.texi-temp
+       rm -f $(PSFILE) $(PDFFILE) $(DVIFILE) html-stamp tempfiles-stamp
+       rm -f $(TMPFILES) contrib-doc-list.texi-temp
        rm -f sbcl.info sbcl.info-*
 
 .PHONY: distclean