X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Fmanual%2FMakefile;h=760f4b5c96dae8aaa5b119090f01fb7688a62a54;hb=28c2529caecc45984cbbef0e3277cde740bbf326;hp=93f0be5cb5a13876df6faac5c4ee832a5b482444;hpb=b194e5262c0ca11756bc01ea4427aad465dbcaa0;p=sbcl.git diff --git a/doc/manual/Makefile b/doc/manual/Makefile index 93f0be5..760f4b5 100644 --- a/doc/manual/Makefile +++ b/doc/manual/Makefile @@ -1,20 +1,29 @@ - -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 - -PSFILE=sbcl.ps -PDFFILE=sbcl.pdf -DVIFILE=sbcl.dvi -INFOFILE=sbcl.info -HTMLDIR=$(basename $(ROOTFILE)) +SBCLTEXI:=sbcl.texinfo +ASDFTEXI:=asdf.texinfo +DOCFILES:=*.texinfo $(ASDFTEXI) +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 +INFOFILES=sbcl.info asdf.info +HTMLDIRS=$(basename $(SBCLTEXI)) $(basename $(ASDFTEXI)) # 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" +CONTRIBDIR="../../contrib/" +I_FLAGS=-I $(DOCSTRINGDIR) -I $(CONTRIBDIR) +# List of contrib modules that docstring docs will be created for. +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" + +# 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 @@ -29,63 +38,72 @@ ifeq ($(DVIPS),) endif .PHONY: all -all: ps pdf info html +all: asdf.texinfo ps pdf info html .PHONY: dist dist: html pdf +asdf.texinfo: + rm -f asdf.texinfo + ln -s ../../contrib/asdf/asdf.texinfo - -# html documentation; output in $(HTMLDIR) +# html documentation; output in $(HTMLDIRS) .PHONY: html html: html-stamp html-stamp: $(DOCFILES) docstrings - @rm -rf $(HTMLDIR) - $(MAKEINFO) -I $(DOCSTRINGDIR) --html $(ROOTFILE) + @rm -rf $(HTMLDIRS) + $(MAKEINFO) $(I_FLAGS) --html $(SBCLTEXI) + $(MAKEINFO) --html $(ASDFTEXI) touch html-stamp # Postscript documentation .PHONY: ps -ps: $(PSFILE) +ps: $(PSFILES) -$(PSFILE): $(DVIFILE) +%.ps: %.dvi dvips -o $@ $< -$(DVIFILE): $(DOCFILES) docstrings - texi2dvi -I $(DOCSTRINGDIR) $(ROOTFILE) +# DVI generation +%.dvi: %.texinfo $(DOCFILES) docstrings + texi2dvi $(I_FLAGS) $< # PDF documentation .PHONY: pdf -pdf: $(PDFFILE) +pdf: $(PDFFILES) -$(PDFFILE): $(DOCFILES) docstrings - texi2pdf -I $(DOCSTRINGDIR) $(ROOTFILE) +%.pdf: %.texinfo $(DOCFILES) docstrings + texi2pdf $(I_FLAGS) $< # info docfiles .PHONY: info -info: $(INFOFILE) - -$(INFOFILE): $(DOCFILES) docstrings - $(MAKEINFO) -I $(DOCSTRINGDIR) $(ROOTFILE) - -# Texinfo docstring snippets; output hardcoded in docstrings/ for now. -.PHONY: docstrings -docstrings: docstrings-stamp +info: $(INFOFILES) -docstrings-stamp: - DOCSTRINGDIR=$(DOCSTRINGDIR) sh docstrings.sh - touch docstrings-stamp +%.info: %.texinfo $(DOCFILES) docstrings + $(MAKEINFO) $(I_FLAGS) $< +# Texinfo docstring snippets +# 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: + 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 sbcl.info sbcl.info-* + rm -rf $(HTMLDIRS) $(DOCSTRINGDIR) + rm -f contrib-docs.texi-temp + rm -f package-locks.texi-temp + 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