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
39 EXAMPLES
= chrfreeze.chr fib.chr gcd.chr primes.chr \
40 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
45 chr_translate_bootstrap1.pl
: chr_translate_bootstrap1.chr
46 $(PL
) -q
-f chr_swi_bootstrap.pl \
47 -g
"chr_compile_step1('$<','$@'),halt" \
49 $(PL
) -q
-f chr_swi_bootstrap.pl \
50 -g
"chr_compile_step2('$<','$@'),halt" \
53 chr_translate.pl
: chr_translate.chr chr_translate_bootstrap1.pl
54 $(PL
) -q
-f chr_swi_bootstrap.pl \
55 -g
"chr_compile_step2('$<','$@'),halt" \
57 $(PL
) -q
-f chr_swi_bootstrap.pl \
58 -g
"chr_compile_step3('$<','$@'),halt" \
65 mkdir
-p
$(DESTDIR
)/$(CHRDIR
)
66 $(INSTALL
) -m
644 $(LIBPL
) $(DESTDIR
)/$(CHRDIR
)
67 $(INSTALL
) -m
644 $(CHRPL
) $(DESTDIR
)/$(LIBDIR
)/chr.pl
68 $(INSTALL
) -m
644 README
$(DESTDIR
)/$(CHRDIR
)
69 $(PL
) -f none
-g make
-t halt
73 pdf-install
: install-examples
75 html-install
: install-examples
78 mkdir
-p
$(DESTDIR
)/$(EXDIR
)
79 (cd Examples
&& $(INSTALL_DATA
) $(EXAMPLES
) $(DESTDIR
)/$(EXDIR
))
82 (cd
$(PLBASE
)/library
&& rm -f
$(LIBPL
))
83 $(PL
) -f none
-g make
-t halt
86 $(PL
) -q
-f chr_test.pl
-g
test,halt
-t
'halt(1)'
89 ################################################################
91 ################################################################
107 $(DOCTOTEX
) $*.doc
> $*.
tex
109 $(PLTOTEX
) $*.pl
> $*.
tex
111 ################################################################
113 ################################################################
116 rm -f
*~
*% config.log
117 rm -f chr.pl chr_translate.pl chr_translate_bootstrap1.pl
120 rm -f
$(TARGETS
) config.h config.cache config.status Makefile
122 runtex
--clean $(DOC
)