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
) -L50M
-G50M
-T20M
-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_DATA
) $(LIBPL
) $(DESTDIR
)$(CHRDIR
)
85 $(INSTALL_DATA
) $(CHRPL
) $(DESTDIR
)$(LIBDIR
)/chr.pl
86 $(INSTALL_DATA
) README
$(DESTDIR
)$(CHRDIR
)
87 $(PL
) -f none
-g make
-t halt
90 @
$(MAKE
) INSTALL_DATA
='../ln-install' install
94 pdf-install
: install-examples
96 html-install
: install-examples
99 mkdir
-p
$(DESTDIR
)$(EXDIR
)
100 (cd Examples
&& $(INSTALL_DATA
) $(EXAMPLES
) $(DESTDIR
)$(EXDIR
))
103 (cd
$(PLBASE
)/library
&& rm -f
$(LIBPL
))
104 $(PL
) -f none
-g make
-t halt
107 $(PL
) -q
-f chr_test.pl
-g
test,halt
-t
'halt(1)'
110 ################################################################
112 ################################################################
114 # NOTE: Manual is integrated in system manual
123 mv html
/index.html
$@
126 ..
/..
/man
/runtex
--pdf
$(DOC
)
131 $(DOCTOTEX
) $*.doc
> $*.
tex
133 $(PLTOTEX
) $*.pl
> $*.
tex
135 ################################################################
137 ################################################################
140 rm -f
*~
*% config.log
141 rm -f chr.pl chr_translate.pl
142 rm -f chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
143 rm -f guard_entailment.pl
146 rm -f
$(TARGETS
) config.h config.cache config.status Makefile
148 ..
/..
/man
/runtex
--clean $(DOC
)