1 ################################################################
2 # SWI-Prolog CHR package
3 # Author: Jan Wielemaker. jan@swi.psy.uva.nl
4 # Copyright: LGPL (see COPYING or www.gnu.org
5 ################################################################
7 .SUFFIXES
: .
tex .
dvi .doc .pl
13 XPCEBASE
=$(PLBASE
)/xpce
14 PKGDOC
=$(PLBASE
)/doc
/packages
16 LIBDIR
=$(PLBASE
)/library
18 EXDIR
=$(PKGDOC
)/examples
/chr
20 DOCTOTEX
=$(PCEHOME
)/bin
/doc2tex
21 PLTOTEX
=$(PCEHOME
)/bin
/pl2tex
30 INSTALL_PROGRAM
=@INSTALL_PROGRAM@
31 INSTALL_DATA
=@INSTALL_DATA@
33 LIBPL
= chr_runtime.pl chr_op.pl chr_translate.pl chr_debug.pl \
34 chr_messages.pl hprolog.pl pairlist.pl clean_code.pl \
35 find.pl a_star.pl binomialheap.pl builtins.pl \
36 chr_hashtable_store.pl
38 EXAMPLES
= chrfreeze.chr fib.chr gcd.chr primes.chr \
39 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
44 chr_translate_bootstrap1.pl
: chr_translate_bootstrap1.chr
45 $(PL
) -q
-f chr_swi_bootstrap.pl \
46 -g
"chr_compile_step1('$<','$@'),halt" \
48 $(PL
) -q
-f chr_swi_bootstrap.pl \
49 -g
"chr_compile_step2('$<','$@'),halt" \
52 chr_translate.pl
: chr_translate.chr chr_translate_bootstrap1.pl
53 $(PL
) -q
-f chr_swi_bootstrap.pl \
54 -g
"chr_compile_step2('$<','$@'),halt" \
56 $(PL
) -q
-f chr_swi_bootstrap.pl \
57 -g
"chr_compile_step3('$<','$@'),halt" \
63 install: $(CHRDIR
) $(LIBPL
)
64 $(INSTALL
) -m
644 $(LIBPL
) $(CHRDIR
)
65 $(INSTALL
) -m
644 $(CHRPL
) $(LIBDIR
)/chr.pl
66 $(INSTALL
) -m
644 README
$(CHRDIR
)
67 $(PL
) -f none
-g make
-t halt
74 pdf-install
: install-examples
76 html-install
: install-examples
80 (cd Examples
&& $(INSTALL_DATA
) $(EXAMPLES
) $(EXDIR
))
83 (cd
$(PLBASE
)/library
&& rm -f
$(LIBPL
))
84 $(PL
) -f none
-g make
-t halt
87 $(PL
) -q
-f chr_test.pl
-g
test,halt
-t
'halt(1)'
90 ################################################################
92 ################################################################
100 mv html
/index.html
$@
108 $(DOCTOTEX
) $*.doc
> $*.
tex
110 $(PLTOTEX
) $*.pl
> $*.
tex
112 ################################################################
114 ################################################################
117 rm -f
*~
*% config.log
118 rm -f chr.pl chr_translate.pl chr_translate_bootstrap1.pl
121 rm -f
$(TARGETS
) config.h config.cache config.status Makefile
123 runtex
--clean $(DOC
)