* Added missing CHR files
[chr.git] / Makefile.mak
blobca26a235100200a474691273cdc44205e9036493
1 ################################################################
2 # Install CHR stuff for the MS-Windows built
3 # Author: Jan Wielemaker
4 #
5 # Use:
6 # nmake /f Makefile.mak
7 # nmake /f Makefile.mak install
8 ################################################################
10 PLHOME=..\..
11 !include $(PLHOME)\src\rules.mk
12 LIBDIR=$(PLBASE)\library
13 EXDIR=$(PKGDOC)\examples\chr
14 CHR=$(LIBDIR)\chr
15 PL="$(PLHOME)\bin\plcon.exe"
17 LIBPL= chr_runtime.pl chr_op.pl chr_translate.pl chr_debug.pl \
18 chr_messages.pl hprolog.pl pairlist.pl clean_code.pl \
19 find.pl a_star.pl binomialheap.pl builtins.pl \
20 chr_hashtable_store.pl listmap.pl guard_entailment.pl \
21 chr_compiler_options.pl chr_compiler_utility.pl
22 CHRPL= chr_swi.pl
23 EXAMPLES= chrfreeze.chr fib.chr gcd.chr primes.chr \
24 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
25 chrdif.chr
27 all: chr_translate.pl
29 chr_translate_bootstrap1.pl: chr_translate_bootstrap1.chr
30 $(PL) -q -f chr_swi_bootstrap.pl \
31 -g "chr_compile_step1('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
32 -t "halt(1)"
33 $(PL) -q -f chr_swi_bootstrap.pl \
34 -g "chr_compile_step2('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
35 -t "halt(1)"
37 chr_translate_bootstrap2.pl: chr_translate_bootstrap2.chr chr_translate_bootstrap1.pl
38 $(PL) -q -f chr_swi_bootstrap.pl \
39 -g "chr_compile_step2('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
40 -t 'halt(1)'
41 $(PL) -q -f chr_swi_bootstrap.pl \
42 -g "chr_compile_step3('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
43 -t 'halt(1)'
45 guard_entailment.pl: guard_entailment.chr chr_translate_bootstrap2.pl
46 $(PL) -q -f chr_swi_bootstrap.pl \
47 -g "chr_compile_step3('guard_entailment.chr','guard_entailment.pl'),halt" \
48 -t 'halt(1)'
50 chr_translate.pl: chr_translate.chr chr_translate_bootstrap2.pl guard_entailment.pl
51 $(PL) -q -f chr_swi_bootstrap.pl \
52 -g "chr_compile_step3('chr_translate.chr','chr_translate.pl'),halt" \
53 -t 'halt(1)'
54 $(PL) -p chr=. -q -f chr_swi_bootstrap.pl \
55 -g "chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt" \
56 -t 'halt(1)'
57 $(PL) -L10M -p chr=. -q -f chr_swi_bootstrap.pl \
58 -g "chr_compile_step4('chr_translate.chr','chr_translate.pl'),halt" \
59 -t 'halt(1)'
61 chr.pl: chr_swi.pl
62 copy chr_swi.pl chr.pl
64 check: chr.pl
65 $(PL) -q -f chr_test.pl -g test,halt -t 'halt(1)'
68 !IF "$(CFG)" == "rt"
69 install::
70 !ELSE
71 install::
72 @if not exist "$(CHR)\$(NULL)" $(MKDIR) "$(CHR)"
73 @for %f in ($(LIBPL)) do \
74 copy "%f" "$(CHR)"
75 copy $(CHRPL) "$(LIBDIR)\chr.pl"
76 copy README "$(CHR)\README.TXT"
77 $(MAKEINDEX)
78 !ENDIF
80 html-install: install-examples
81 pdf-install: install-examples
83 install-examples::
84 if not exist "$(EXDIR)/$(NULL)" $(MKDIR) "$(EXDIR)"
85 cd examples & @for %f in ($(EXAMPLES)) do @copy %f "$(EXDIR)"
87 xpce-install::
89 uninstall::
90 @for %f in ($(LIBPL)) do \
91 del "$(CHR)\%f"
92 del "$(CHR)\README.TXT"
93 del "$(LIBDIR)\chr.pl"
94 $(MAKEINDEX)
96 clean::
97 if exist *~ del *~
98 -del chr.pl chr_translate.pl
99 -del chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
100 -del guard_entailment.pl
102 distclean: clean