133 lines
2.7 KiB
Makefile
133 lines
2.7 KiB
Makefile
|
################################################################
|
||
|
# SWI-Prolog `PlDoc' package
|
||
|
# Author: Jan Wielemaker. wielemak@science.uva.nl
|
||
|
# Copyright: GPL (see COPYING or www.gnu.org
|
||
|
################################################################
|
||
|
|
||
|
.SUFFIXES: .tex .dvi .doc .pl
|
||
|
|
||
|
SHELL=@SHELL@
|
||
|
|
||
|
ifeq (@PROLOG_SYSTEM@,yap)
|
||
|
|
||
|
prefix = @prefix@
|
||
|
ROOTDIR = $(prefix)
|
||
|
EROOTDIR = @exec_prefix@
|
||
|
|
||
|
srcdir=@srcdir@
|
||
|
|
||
|
BINDIR = $(EROOTDIR)/bin
|
||
|
YAPLIBDIR=$(EROOTDIR)/lib/Yap
|
||
|
# hack for SWI compatibility
|
||
|
LIBDIR=$(EROOTDIR)/share/Yap
|
||
|
|
||
|
PL=@EXTEND_DYNLOADER_PATH@ $(DESTDIR)$(BINDIR)/yap $(DESTDIR)$(YAPLIBDIR)/startup.yss
|
||
|
LN_S=@LN_S@
|
||
|
EXDIR=$(LIBDIR)/examples/plunit
|
||
|
|
||
|
else # SWI
|
||
|
|
||
|
srcdir=.
|
||
|
|
||
|
PLBASE=@PLBASE@
|
||
|
PLARCH=@PLARCH@
|
||
|
PL=@PL@
|
||
|
XPCEBASE=$(PLBASE)/xpce
|
||
|
PKGDOC=$(PLBASE)/doc/packages
|
||
|
PCEHOME=../xpce
|
||
|
LIBDIR=$(PLBASE)/library
|
||
|
EXDIR=$(PKGDOC)/examples/plunit
|
||
|
|
||
|
endif
|
||
|
|
||
|
DESTDIR=
|
||
|
|
||
|
DOCTOTEX=$(PCEHOME)/bin/doc2tex
|
||
|
PLTOTEX=$(PCEHOME)/bin/pl2tex
|
||
|
vLATEX=latex
|
||
|
DOC=plunit
|
||
|
TEX=$(DOC).tex
|
||
|
DVI=$(DOC).dvi
|
||
|
PDF=$(DOC).pdf
|
||
|
HTML=$(DOC).html
|
||
|
|
||
|
INSTALL=@INSTALL@
|
||
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||
|
INSTALL_DATA=@INSTALL_DATA@
|
||
|
|
||
|
LIBPL= $(srcdir)/plunit.pl $(srcdir)/test_wizard.pl $(srcdir)/test_cover.pl
|
||
|
LIBALL= $(LIBPL) $(SUPPORT)
|
||
|
EXAMPLES= $(srcdir)/read.pl $(srcdir)/simple.pl
|
||
|
|
||
|
all:
|
||
|
@echo "Nothing to do for this package"
|
||
|
|
||
|
install: $(LIBPL)
|
||
|
mkdir -p $(DESTDIR)$(LIBDIR)
|
||
|
$(INSTALL_DATA) $(LIBALL) $(DESTDIR)$(LIBDIR)
|
||
|
$(PL) -f none -g make -t halt
|
||
|
|
||
|
ln-install: $(LIBPL)
|
||
|
mkdir -p $(DESTDIR)$(LIBDIR)
|
||
|
for f in $(LIBALL); do \
|
||
|
rm -f $(DESTDIR)$(LIBDIR)/$$f; \
|
||
|
ln -s `pwd`/$$f $(DESTDIR)$(LIBDIR); \
|
||
|
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 examples && $(INSTALL_DATA) $(EXAMPLES) $(DESTDIR)$(EXDIR))
|
||
|
|
||
|
uninstall::
|
||
|
rm -f $(LIBDIR)/plunit.pl
|
||
|
$(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 $@
|
||
|
rmdir html
|
||
|
|
||
|
$(PDF): $(TEX)
|
||
|
../../man/runtex --pdf $(DOC)
|
||
|
|
||
|
$(TEX): $(DOCTOTEX)
|
||
|
|
||
|
.doc.tex:
|
||
|
$(DOCTOTEX) $*.doc > $*.tex
|
||
|
.pl.tex:
|
||
|
$(PLTOTEX) $*.pl > $*.tex
|
||
|
|
||
|
################################################################
|
||
|
# Clean
|
||
|
################################################################
|
||
|
|
||
|
clean:
|
||
|
rm -f *~ *% config.log
|
||
|
|
||
|
# rm -f $(TEX)
|
||
|
# ../../man/runtex --clean $(DOC)
|
||
|
# rm -rf html
|
||
|
|
||
|
distclean: clean
|
||
|
rm -f $(TARGETS) config.cache config.status Makefile
|