1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
################################################################
# SWI-Prolog `PlDoc' package
# Author: Jan Wielemaker. wielemak@science.uva.nl
# Copyright: GPL (see COPYING or www.gnu.org
################################################################
.SUFFIXES: .txt .tex .dvi .doc .pl
SHELL=@SHELL@
PLBASE=@PLBASE@
PLARCH=@PLARCH@
PL=@PL@
XPCEBASE=$(PLBASE)/xpce
PKGDOC=$(PLBASE)/doc/packages
PCEHOME=../xpce
LIBDIR=$(PLBASE)/library/pldoc
EXDIR=$(PKGDOC)/examples/pldoc
DOCTOTEX=$(PCEHOME)/bin/doc2tex
PLTOTEX=$(PCEHOME)/bin/pl2tex
LATEX=latex
DOC=pldoc
TEX=$(DOC).tex latex.tex
DVI=$(DOC).dvi
PDF=$(DOC).pdf
HTML=$(DOC).html
PUBLICPL=swipl
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
LIBPL= doc_html.pl doc_wiki.pl doc_modes.pl doc_register.pl \
doc_process.pl doc_index.pl doc_search.pl doc_man.pl \
doc_library.pl hooks.pl doc_htmlsrc.pl doc_colour.pl \
doc_util.pl doc_access.pl
SUPPORT= pldoc.css pldoc.js pllisting.css pldoc.sty \
edit.gif zoomin.gif zoomout.gif reload.gif favicon.ico \
up.gif source.gif
DOCALL= $(LIBPL) $(SUPPORT)
PUBPL= pldoc.pl doc_http.pl doc_latex.pl
EXAMPLES= README
EXAMPLEEXE= man_server.pl
all: pldoc.sty
pldoc.sty: ../../man/pl.sty
cp $< $@
install: $(LIBPL)
mkdir -p $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) $(DOCALL) $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) $(PUBPL) $(DESTDIR)$(PLBASE)/library
$(PL) -f none -g make -t halt
ln-install: $(LIBPL)
mkdir -p $(DESTDIR)$(LIBDIR)
for f in $(DOCALL) README; do \
rm -f $(DESTDIR)$(LIBDIR)/$$f; \
ln -s `pwd`/$$f $(DESTDIR)$(LIBDIR); \
done
for f in $(PUBPL); do \
rm -f $(DESTDIR)/$(PLBASE)/library/$$f; \
ln -s `pwd`/$$f $(DESTDIR)$(PLBASE)/library/$$f; \
done
$(PL) -f none -g make -t halt
rpm-install: install
pdf-install: install-examples
$(INSTALL_DATA) $(DOC).pdf $(DESTDIR)$(PKGDOC)
html-install: install-examples
$(INSTALL_DATA) $(DOC).html $(DESTDIR)$(PKGDOC)
install-examples::
mkdir -p $(DESTDIR)$(EXDIR)
(cd server && $(INSTALL_DATA) $(EXAMPLES) $(DESTDIR)$(EXDIR))
(cd server && $(INSTALL_PROGRAM) $(EXAMPLEEXE) $(DESTDIR)$(EXDIR))
uninstall::
(cd $(LIBDIR) && rm -f $(LIBPL))
(cd $(PLBASE)/library && rm -f $(PUBPL))
$(PL) -f none -g make -t halt
check::
true
################################################################
# Documentation
################################################################
doc: $(PDF) $(HTML)
pdf: $(PDF)
html:: $(TEX)
latex2html $(DOC)
mv html/index.html $(DOC).html
rmdir html
$(PDF): $(TEX)
../../man/runtex --pdf $(DOC)
$(TEX): $(DOCTOTEX)
.doc.tex:
$(DOCTOTEX) $*.doc > $*.tex
.pl.tex:
$(PLTOTEX) $*.pl > $*.tex
.txt.tex:
$(PUBLICPL) -f none -g "doc_latex('$*.txt','$*.tex',[stand_alone(false)]),halt" -t "halt(1)"
################################################################
# Clean
################################################################
clean:
rm -f *~ *% config.log
rm -f $(TEX)
../../man/runtex --clean $(DOC)
rm -rf html
distclean: clean
rm -f pldoc.sty server/man_server.pl
rm -f $(TARGETS) config.cache config.status Makefile
|