-# $Id: Makefile.in,v 1.8 2004/10/14 04:05:39 cph Exp $
+# $Id: Makefile.in,v 1.9 2004/10/15 05:52:25 cph Exp $
#
# Copyright 2000,2001,2002,2003,2004 Massachusetts Institute of Technology
#
vectors.texi \
win32-packaging.texi
-INFO_TARGET = mit-scheme-ref.info
+TARGET_ROOT = mit-scheme-ref
+INFO_TARGET = $(TARGET_ROOT).info
+HTML_TARGET = $(TARGET_ROOT)
+DVI_TARGET = $(TARGET_ROOT).dvi
+PDF_TARGET = $(TARGET_ROOT).pdf
+PS_TARGET = $(TARGET_ROOT).ps
-all: $(INFO_TARGET) scheme.html scheme.pdf scheme.ps
+TEXI2DVI_OPTIONS = --quiet
+
+all: $(INFO_TARGET) $(HTML_TARGET)/index.html $(PDF_TARGET) $(PS_TARGET)
$(INFO_TARGET): $(SOURCES)
rm -f $(INFO_TARGET)*
makeinfo --output=$(INFO_TARGET) scheme.texinfo
-scheme.html: $(SOURCES)
- rm -f scheme*.html
- texi2html -split_chapter scheme.texinfo
-
-scheme.pdf: $(SOURCES)
- texi2pdf scheme.texinfo
-
-scheme.ps: scheme.dvi
- dvips -o $@ $^
+$(HTML_TARGET)/index.html: $(SOURCES)
+ rm -rf $(HTML_TARGET)
+ makeinfo --html scheme.texinfo
-scheme.dvi: $(SOURCES)
- texi2dvi scheme.texinfo
+$(PDF_TARGET): $(SOURCES)
+ texi2pdf $(TEXI2DVI_OPTIONS) --output=$@ scheme.texinfo
-AUX_SUFFIXES = aux log toc
-INDEX_SUFFIXES = cp fn ky pg tp vr
+$(PS_TARGET): $(SOURCES)
+ -rm -f $(DVI_TARGET)
+ texi2dvi $(TEXI2DVI_OPTIONS) --output=$(DVI_TARGET) scheme.texinfo
+ dvips -q -o $@ $(DVI_TARGET)
+ rm -f $(DVI_TARGET)
mostlyclean:
- @for S in $(AUX_SUFFIXES); do \
- echo "rm -f scheme.$${S}";\
- rm -f scheme.$${S};\
- done
- @for S in $(INDEX_SUFFIXES); do \
- echo "rm -f scheme.$${S}";\
- rm -f scheme.$${S};\
- echo "rm -f scheme.$${S}s";\
- rm -f scheme.$${S}s;\
- done
- rm -f scheme.dvi
clean: mostlyclean
- rm -f $(INFO_TARGET)* scheme*.html scheme.pdf scheme.ps
+ rm -f $(INFO_TARGET)* $(PDF_TARGET) $(PS_TARGET)
+ rm -rf $(HTML_TARGET)
distclean: clean
install-info-gz: install-info
gzip -v $(DESTDIR)$(infodir)/$(INFO_TARGET)*
-install-html: scheme.html
- $(INSTALL_DATA) scheme*.html $(DESTDIR)$(htmldir)/.
+install-html: $(HTML_TARGET)/index.html
+ -rm -rf $(DESTDIR)$(htmldir)/$(HTML_TARGET)
+ $(mkinstalldirs) $(DESTDIR)$(htmldir)/$(HTML_TARGET)
+ $(INSTALL_DATA) $(HTML_TARGET)/* $(DESTDIR)$(htmldir)/$(HTML_TARGET)/.
-install-pdf: scheme.pdf
- $(INSTALL_DATA) scheme.pdf $(DESTDIR)$(pdfdir)/.
+install-pdf: $(PDF_TARGET)
+ $(INSTALL_DATA) $(PDF_TARGET) $(DESTDIR)$(pdfdir)/.
-install-ps: scheme.ps
- $(INSTALL_DATA) scheme.ps $(DESTDIR)$(psdir)/.
+install-ps: $(PS_TARGET)
+ $(INSTALL_DATA) $(PS_TARGET) $(DESTDIR)$(psdir)/.
.PHONY: all mostlyclean clean distclean maintainer-clean
.PHONY: install-info install-html install-pdf install-ps