1.0.29.31: new contrib: SB-QUEUE
[sbcl.git] / doc / manual / Makefile
index c0c41cd..43a6257 100644 (file)
@@ -1,7 +1,7 @@
 SBCLTEXI:=sbcl.texinfo
 ASDFTEXI:=asdf.texinfo
 DOCFILES:=*.texinfo $(ASDFTEXI)
-TMPTYPES:=aux cps fns ky log pg toc tps vrs
+TMPTYPES:=aux cp cps fn fns ky log pg toc tp tps vr vrs
 TMPFILES:=$(foreach target,asdf sbcl,$(foreach type,$(TMPTYPES),$(target).$(type)))
 PSFILES=sbcl.ps asdf.ps
 PDFFILES=sbcl.pdf asdf.pdf
@@ -11,19 +11,26 @@ HTMLDIRS=$(basename $(SBCLTEXI)) $(basename $(ASDFTEXI))
 # DOCSTRINGDIR has to end with a slash or you lose (it's passed to
 # Lisp's `pathname' function).
 DOCSTRINGDIR="docstrings/"
-I_FLAGS=-I $(DOCSTRINGDIR) -I ../../contrib/
+CONTRIBDIR="../../contrib/"
+I_FLAGS=-I $(DOCSTRINGDIR) -I $(CONTRIBDIR)
 # 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'
+MODULES=':sb-md5 :sb-queue :sb-rotate-byte :sb-grovel :sb-sprof :sb-bsd-sockets :sb-cover :sb-posix'
 # 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"
+PACKAGES=":COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD :SB-MD5 :SB-QUEUE :SB-ROTATE-BYTE :SB-SPROF :SB-BSD-SOCKETS :SB-COVER :SB-POSIX"
+
+# SBCL_SYSTEM is an optional argument to this make program. If this
+# variable is set, its contents are used as the command line for
+# invoking SBCL.
+
+# When passing a non-standard SBCL_SYSTEM, be sure to set the
+# environment variable SBCL_HOME to a useful value, as well.
 
 ifeq ($(MAKEINFO),)
   MAKEINFO:=makeinfo
 endif
 
 ifeq ($(TEXI2PDF),)
-  TEXI2PDF:=texi2pdf
+  TEXI2PDF:=texi2dvi -p
 endif
 
 ifeq ($(DVIPS),)
@@ -66,7 +73,7 @@ ps: $(PSFILES)
 pdf: $(PDFFILES)
 
 %.pdf: %.texinfo $(DOCFILES) docstrings
-       texi2pdf $(I_FLAGS) $<
+       $(TEXI2PDF) $(I_FLAGS) $<
 
 # info docfiles
 .PHONY: info
@@ -76,12 +83,16 @@ info: $(INFOFILES)
        $(MAKEINFO) $(I_FLAGS) $<
 
 # Texinfo docstring snippets
-.PHONY: docstrings
-docstrings: tempfiles-stamp
+# Note: assumes contrib module names are the same as the names of
+# directories containing the modules, and that these directories
+# are in $(CONTRIBDIR).
+CONTRIB_FASLS=$(shell find $(shell echo $(MODULES) | sed "s|:|$(CONTRIBDIR)|g") -name '*.fasl')
+docstrings: $(CONTRIB_FASLS) tempfiles-stamp
+       for module in $(shell echo $(MODULES)); do test -e $(CONTRIBDIR)/$${module#:}/test-passed || { echo "The documented contrib $$module seems to have failed its tests." && exit 1; }; done
+       DOCSTRINGDIR=$(DOCSTRINGDIR) PACKAGES=$(PACKAGES) MODULES=$(MODULES) sh make-tempfiles.sh "$(SBCL_SYSTEM)" && touch $(DOCSTRINGDIR)
 
 tempfiles-stamp:
-       DOCSTRINGDIR=$(DOCSTRINGDIR) PACKAGES=$(PACKAGES) MODULES=$(MODULES) sh make-tempfiles.sh && touch tempfiles-stamp
-
+       touch tempfiles-stamp
 
 .PHONY: clean
 clean: 
@@ -89,9 +100,10 @@ clean:
        rm -rf $(HTMLDIRS) $(DOCSTRINGDIR)
        rm -f contrib-docs.texi-temp
        rm -f package-locks.texi-temp
-       rm -f $(PSFILE) $(PDFFILE) $(DVIFILE) html-stamp tempfiles-stamp
-       rm -f $(TMPFILES)
-       rm -f sbcl.info sbcl.info-*
+       rm -f variables.texinfo
+       rm -f $(PSFILES) $(PDFFILES) html-stamp tempfiles-stamp
+       rm -f $(TMPFILES) $(INDEXFILES)
+       rm -f sbcl.info sbcl.info-* asdf.info
 
 .PHONY: distclean
 distclean: clean