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
21 DOCTOTEX
=$(PCEHOME
)/bin
/doc2tex
22 PLTOTEX
=$(PCEHOME
)/bin
/pl2tex
31 INSTALL_PROGRAM
=@INSTALL_PROGRAM@
32 INSTALL_DATA
=@INSTALL_DATA@
34 LIBPL
= chr_runtime.pl chr_op.pl chr_translate.pl chr_debug.pl \
35 chr_messages.pl hprolog.pl pairlist.pl clean_code.pl \
36 find.pl a_star.pl binomialheap.pl builtins.pl \
37 chr_hashtable_store.pl listmap.pl guard_entailment.pl \
38 chr_compiler_options.pl chr_compiler_utility.pl chr_compiler_errors.pl \
39 chr_integertable_store.pl
41 EXAMPLES
= chrfreeze.chr fib.chr gcd.chr primes.chr \
42 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
47 chr_translate_bootstrap1.pl
: chr_translate_bootstrap1.chr
48 $(PL
) -q
-f chr_swi_bootstrap.pl \
49 -g
"chr_compile_step1('$<','$@'),halt" \
51 $(PL
) -q
-f chr_swi_bootstrap.pl \
52 -g
"chr_compile_step2('$<','$@'),halt" \
55 chr_translate_bootstrap2.pl
: chr_translate_bootstrap2.chr chr_translate_bootstrap1.pl
56 $(PL
) -q
-f chr_swi_bootstrap.pl \
57 -g
"chr_compile_step2('$<','$@'),halt" \
59 $(PL
) -q
-f chr_swi_bootstrap.pl \
60 -g
"chr_compile_step3('$<','$@'),halt" \
63 guard_entailment.pl
: guard_entailment.chr chr_translate_bootstrap2.pl
64 $(PL
) -q
-f chr_swi_bootstrap.pl \
65 -g
"chr_compile_step3('$<','$@'),halt" \
68 chr_translate.pl
: chr_translate.chr chr_translate_bootstrap2.pl guard_entailment.pl
69 $(PL
) -q
-f chr_swi_bootstrap.pl \
70 -g
"chr_compile_step3('$<','$@'),halt" \
72 $(PL
) -p chr
=.
-q
-f chr_swi_bootstrap.pl \
73 -g
"chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt" \
75 $(PL
) -L50M
-G50M
-T20M
-p chr
=.
-q
-f chr_swi_bootstrap.pl \
76 -g
"chr_compile_step4('$<','$@'),halt" \
83 mkdir
-p
$(DESTDIR
)$(CHRDIR
)
84 $(INSTALL
) -m
644 $(LIBPL
) $(DESTDIR
)$(CHRDIR
)
85 $(INSTALL
) -m
644 $(CHRPL
) $(DESTDIR
)$(LIBDIR
)/chr.pl
86 $(INSTALL
) -m
644 README
$(DESTDIR
)$(CHRDIR
)
87 $(PL
) -f none
-g make
-t halt
91 pdf-install
: install-examples
93 html-install
: install-examples
96 mkdir
-p
$(DESTDIR
)$(EXDIR
)
97 (cd Examples
&& $(INSTALL_DATA
) $(EXAMPLES
) $(DESTDIR
)$(EXDIR
))
100 (cd
$(PLBASE
)/library
&& rm -f
$(LIBPL
))
101 $(PL
) -f none
-g make
-t halt
104 $(PL
) -q
-f chr_test.pl
-g
test,halt
-t
'halt(1)'
107 ################################################################
109 ################################################################
117 mv html
/index.html
$@
125 $(DOCTOTEX
) $*.doc
> $*.
tex
127 $(PLTOTEX
) $*.pl
> $*.
tex
129 ################################################################
131 ################################################################
134 rm -f
*~
*% config.log
135 rm -f chr.pl chr_translate.pl
136 rm -f chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
137 rm -f guard_entailment.pl
140 rm -f
$(TARGETS
) config.h config.cache config.status Makefile
142 runtex
--clean $(DOC
)