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
|
################################################################
# SWI-Prolog `HTTP' package
# Author: Jan Wielemaker. jan@swi.psy.uva.nl
# Copyright: GPL (see COPYING or www.gnu.org
################################################################
.SUFFIXES: .tex .dvi .doc .pl
SHELL=@SHELL@
PLBASE=@PLBASE@
PLARCH=@PLARCH@
PL=@PL@
XPCEBASE=$(PLBASE)/xpce
PKGDOC=$(PLBASE)/doc/packages
PCEHOME=../xpce
LIBDIR=$(PLBASE)/library/http
EXDIR=$(PKGDOC)/examples/http
DOCTOTEX=$(PCEHOME)/bin/doc2tex
PLTOTEX=$(PCEHOME)/bin/pl2tex
LATEX=latex
DOC=http
TEX=$(DOC).tex
DVI=$(DOC).dvi
PDF=$(DOC).pdf
HTML=$(DOC).html
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
LIBPL= html_write.pl http_client.pl http_header.pl \
http_mime_plugin.pl http_sgml_plugin.pl \
mimepack.pl mimetype.pl dcg_basics.pl \
thread_httpd.pl xpce_httpd.pl inetd_httpd.pl \
http_wrapper.pl http_open.pl
EXAMPLES= demo_body.pl demo_client.pl demo_threads.pl demo_xpce.pl
EXAMPLEEXE= demo_inetd
XPCEPL= http_image.pl
all:
@echo "Nothing to do for this package"
install: $(LIBPL)
mkdir -p $(LIBDIR)
$(INSTALL_DATA) $(LIBPL) $(LIBDIR)
$(INSTALL_DATA) README $(LIBDIR)
$(PL) -f none -g make -t halt
rpm-install: install
pdf-install: install-examples
$(INSTALL_DATA) $(DOC).pdf $(PKGDOC)
html-install: install-examples
$(INSTALL_DATA) $(DOC).html httpserver.gif $(PKGDOC)
install-examples::
mkdir -p $(EXDIR)
(cd examples && $(INSTALL_DATA) $(EXAMPLES) $(EXDIR))
(cd examples && $(INSTALL_PROGRAM) $(EXAMPLEEXE) $(EXDIR))
uninstall::
(cd $(LIBDIR) && rm -f $(LIBPL))
$(PL) -f none -g make -t halt
check::
true
################################################################
# Documentation
################################################################
doc: $(PDF) $(HTML)
pdf: $(PDF)
html: $(HTML)
$(HTML): $(TEX)
latex2html $(DOC)
mv html/index.html $@
mv html/httpserver.gif .
rmdir html
$(PDF): $(TEX)
runtex --pdf $(DOC)
$(TEX): $(DOCTOTEX)
.doc.tex:
$(DOCTOTEX) $*.doc > $*.tex
.pl.tex:
$(PLTOTEX) $*.pl > $*.tex
################################################################
# Clean
################################################################
clean:
rm -f *~ *% config.log
rm -f $(TEX)
runtex --clean $(DOC)
rm -rf html
distclean: clean
rm -f $(TARGETS) config.cache config.status Makefile
|