6cc9e24976
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1957 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
151 lines
4.3 KiB
Makefile
151 lines
4.3 KiB
Makefile
#
|
|
# default base directory for YAP installation
|
|
# (EROOT for architecture-dependent files)
|
|
#
|
|
prefix = @prefix@
|
|
ROOTDIR = $(prefix)
|
|
EROOTDIR = @exec_prefix@
|
|
|
|
srcdir=@srcdir@
|
|
|
|
SHELL=@SHELL@
|
|
PLBASE=@PLBASE@
|
|
PLARCH=@PLARCH@
|
|
PL=../../yap ../../startup
|
|
XPCEBASE=$(PLBASE)/xpce
|
|
PKGDOC=$(PLBASE)/doc/packages
|
|
PCEHOME=../../xpce
|
|
LIBDIR=$(PLBASE)/library
|
|
SHAREDIR=$(ROOTDIR)/share/Yap
|
|
CHRDIR=$(SHAREDIR)/chr
|
|
EXDIR=$(CHRDIR)/examples/chr
|
|
DESTDIR=
|
|
LN_S=@LN_S@
|
|
|
|
DOCTOTEX=$(PCEHOME)/bin/doc2tex
|
|
PLTOTEX=$(PCEHOME)/bin/pl2tex
|
|
LATEX=latex
|
|
DOC=chr
|
|
TEX=$(DOC).tex
|
|
DVI=$(DOC).dvi
|
|
PDF=$(DOC).pdf
|
|
HTML=$(DOC).html
|
|
|
|
INSTALL=@INSTALL@
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
INSTALL_DATA=@INSTALL_DATA@
|
|
|
|
|
|
LIBPL= $(srcdir)/chr_runtime.pl $(srcdir)/chr_op.pl chr_translate.pl $(srcdir)/chr_debug.pl \
|
|
$(srcdir)/chr_messages.pl $(srcdir)/hprolog.pl $(srcdir)/pairlist.pl $(srcdir)/clean_code.pl \
|
|
$(srcdir)/find.pl $(srcdir)/a_star.pl $(srcdir)/binomialheap.pl $(srcdir)/builtins.pl \
|
|
$(srcdir)/chr_hashtable_store.pl $(srcdir)/listmap.pl guard_entailment.pl \
|
|
$(srcdir)/chr_compiler_errors.pl \
|
|
$(srcdir)/chr_compiler_options.pl $(srcdir)/chr_compiler_utility.pl \
|
|
$(srcdir)/chr_integertable_store.pl
|
|
CHRPL= $(srcdir)/chr_swi.pl
|
|
CHRYAP= $(srcdir)/chr.yap
|
|
EXAMPLES= $(srcdir)/Benchmarks/chrfreeze.chr $(srcdir)/Benchmarks/fib.chr $(srcdir)/Benchmarks/gcd.chr $(srcdir)/Benchmarks/primes.chr \
|
|
$(srcdir)/Benchmarks/bool.chr $(srcdir)/Benchmarks/family.chr $(srcdir)/Benchmarks/fibonacci.chr $(srcdir)/Benchmarks/leq.chr $(srcdir)/Benchmarks/listdom.chr \
|
|
$(srcdir)/Benchmarks/chrdif.chr
|
|
|
|
all: chr_translate.pl
|
|
|
|
chr_translate_bootstrap1.pl: $(srcdir)/chr_translate_bootstrap1.chr
|
|
$(PL) -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step1('$<','$@'),halt." \
|
|
-z 'halt(1).'
|
|
$(PL) -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step2('$<','$@'),halt." \
|
|
-z 'halt(1).'
|
|
|
|
chr_translate_bootstrap2.pl: $(srcdir)/chr_translate_bootstrap2.chr chr_translate_bootstrap1.pl
|
|
$(PL) -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step2('$<','$@'),halt." \
|
|
-z 'halt(1).'
|
|
$(PL) -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step3('$<','$@'),halt." \
|
|
-z 'halt(1).'
|
|
|
|
guard_entailment.pl: $(srcdir)/guard_entailment.chr chr_translate_bootstrap2.pl
|
|
$(PL) -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step3('$<','$@'),halt." \
|
|
-z 'halt(1).'
|
|
|
|
chr_translate.pl: $(srcdir)/chr_translate.chr chr_translate_bootstrap2.pl guard_entailment.pl
|
|
$(PL) -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step3('$<','$@'),halt." \
|
|
-z 'halt(1).'
|
|
$(PL) -p chr=. -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt." \
|
|
-z 'halt(1).'
|
|
$(PL) -p chr=. -l chr_swi_bootstrap.yap \
|
|
-g "chr_compile_step4('$<','$@'),halt." \
|
|
-z 'halt(1).'
|
|
|
|
chr.pl: chr_swi.pl
|
|
cp $< $@
|
|
|
|
install: chr_translate.pl guard_entailment.pl
|
|
mkdir -p $(DESTDIR)$(CHRDIR)
|
|
$(INSTALL) -m 644 $(LIBPL) $(DESTDIR)$(CHRDIR)
|
|
$(INSTALL) -m 644 $(CHRPL) $(DESTDIR)$(SHAREDIR)/chr.pl
|
|
$(INSTALL) -m 644 $(CHRYAP) $(DESTDIR)$(SHAREDIR)
|
|
$(INSTALL) -m 644 $(srcdir)/README $(DESTDIR)$(CHRDIR)
|
|
# $(PL) -g make -z halt
|
|
|
|
rpm-install: install
|
|
|
|
pdf-install: install-examples
|
|
|
|
html-install: install-examples
|
|
|
|
install-examples::
|
|
mkdir -p $(DESTDIR)$(EXDIR)
|
|
(cd Examples && $(INSTALL_DATA) $(EXAMPLES) $(DESTDIR)$(EXDIR))
|
|
|
|
uninstall:
|
|
(cd $(PLBASE)/library && rm -f $(LIBPL))
|
|
$(PL) -f none -g make -t halt
|
|
|
|
check: chr.pl
|
|
$(PL) -f chr_test.pl -g test,halt -t 'halt(1)'
|
|
|
|
|
|
################################################################
|
|
# 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
|
|
rm -f chr.pl chr_translate.pl
|
|
rm -f chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
|
|
rm -f guard_entailment.pl
|
|
|
|
distclean: clean
|
|
rm -f $(TARGETS) config.h config.cache config.status Makefile
|
|
rm -f $(TEX)
|
|
runtex --clean $(DOC)
|