d6a06fe092
as possible.
129 lines
2.8 KiB
Makefile
129 lines
2.8 KiB
Makefile
################################################################
|
|
# SWI-Prolog `RDF' package
|
|
# Author: Jan Wielemaker. jan@swi.psy.uva.nl
|
|
# Copyright: LGPL (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
|
|
DESTDIR=
|
|
|
|
CGISCRIPT=rdf-parser
|
|
CGIDIR=/etc/httpd/cgi-bin
|
|
CGIURL=http://gollem.science.uva.nl/cgi-bin
|
|
WEBPAGE=/swi40/prolog/packages/rdf-online.html
|
|
CGIGRP=www
|
|
|
|
DOCTOTEX=$(PCEHOME)/bin/doc2tex
|
|
PLTOTEX=$(PCEHOME)/bin/pl2tex
|
|
RUNTEX=../../../man/runtex
|
|
LATEX=latex
|
|
DOC=rdf2pl
|
|
TEX=$(DOC).tex
|
|
DVI=$(DOC).dvi
|
|
PDF=$(DOC).pdf
|
|
HTML=$(DOC).html
|
|
|
|
INSTALL=@INSTALL@
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
INSTALL_DATA=@INSTALL_DATA@
|
|
|
|
LIBPL= rdf.pl rdf_parser.pl rdf_triple.pl rewrite.pl \
|
|
rdf_ntriples.pl rdf_write.pl
|
|
XPCEPL= rdf_diagram.pl
|
|
|
|
all:
|
|
@echo "Nothing to do for this package"
|
|
|
|
install: $(LIBPL) xpce-install
|
|
$(INSTALL_DATA) $(LIBPL) $(DESTDIR)$(PLBASE)/library
|
|
$(PL) -f none -g make -t halt
|
|
|
|
ln-install::
|
|
@$(MAKE) INSTALL_DATA=../../ln-install install
|
|
|
|
xpce-install: $(XPCEPL)
|
|
if [ -d $(DESTDIR)$(XPCEBASE) ]; then \
|
|
$(INSTALL) -m 644 $(XPCEPL) $(DESTDIR)$(XPCEBASE)/prolog/lib; \
|
|
fi
|
|
|
|
rpm-install: install
|
|
|
|
pdf-install::
|
|
$(INSTALL_DATA) $(DOC).pdf $(DESTDIR)$(PKGDOC)
|
|
|
|
html-install::
|
|
$(INSTALL_DATA) $(DOC).html $(DESTDIR)$(PKGDOC)
|
|
|
|
uninstall:
|
|
(cd $(PLBASE)/library && rm -f $(LIBPL))
|
|
$(PL) -f none -g make -t halt
|
|
|
|
check::
|
|
$(PL) -f rdf_test.pl -g test,halt -t 'halt(1)'
|
|
$(PL) -q -f write_test.pl -g run_tests,halt -t 'halt(1)'
|
|
|
|
################################################################
|
|
# CGI INSTALL
|
|
################################################################
|
|
|
|
cgi-install: $(CGIDIR)/$(CGISCRIPT) \
|
|
Online-requests \
|
|
$(WEBPAGE)
|
|
|
|
cgi-uninstall:
|
|
rm -f $(CGIDIR)/$(CGISCRIPT) $(WEBPAGE)
|
|
|
|
Online-requests:
|
|
mkdir $@
|
|
chmod 775 $@
|
|
chgrp $(CGIGRP) $@
|
|
|
|
$(WEBPAGE): online.html
|
|
sed 's%@ACTION@%$(CGIURL)/$(CGISCRIPT)%' online.html > $@
|
|
|
|
$(CGIDIR)/$(CGISCRIPT): rdf-parser Makefile
|
|
sed -e "s%@BASEDIR@%`pwd`%" -e s%@SWI@%$(PL)% rdf-parser > $@
|
|
chmod 755 $@
|
|
|
|
################################################################
|
|
# Documentation
|
|
################################################################
|
|
|
|
doc: $(PDF) $(HTML)
|
|
pdf: $(PDF)
|
|
html: $(HTML)
|
|
|
|
$(HTML): $(TEX)
|
|
latex2html $(DOC)
|
|
mv html/index.html $@
|
|
|
|
$(PDF): $(TEX)
|
|
$(RUNTEX) --pdf $(DOC)
|
|
|
|
$(TEX): $(DOCTOTEX)
|
|
|
|
.doc.tex:
|
|
$(DOCTOTEX) $*.doc > $*.tex
|
|
.pl.tex:
|
|
$(PLTOTEX) $*.pl > $*.tex
|
|
|
|
################################################################
|
|
# Clean
|
|
################################################################
|
|
|
|
clean:
|
|
rm -f *~ *% config.log
|
|
|
|
distclean: clean
|
|
rm -f $(TARGETS) config.h config.cache config.status Makefile
|
|
rm -f $(TEX)
|
|
$(RUNTEX) --clean $(DOC)
|