static type checking
[chr.git] / Makefile.mak
blob97c7c02c963c819aa39ba2a9f05d5fdc8515a3fd
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 chr_compiler_errors.pl \
23 chr_integertable_store.pl
24 CHRPL= chr_swi.pl
25 EXAMPLES= chrfreeze.chr fib.chr gcd.chr primes.chr \
26 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
27 chrdif.chr
29 all: chr_translate.pl
31 chr_translate_bootstrap1.pl: chr_translate_bootstrap1.chr
32 $(PL) -q -f chr_swi_bootstrap.pl \
33 -g "chr_compile_step1('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
34 -t "halt(1)"
35 $(PL) -q -f chr_swi_bootstrap.pl \
36 -g "chr_compile_step2('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
37 -t "halt(1)"
39 chr_translate_bootstrap2.pl: chr_translate_bootstrap2.chr chr_translate_bootstrap1.pl
40 $(PL) -q -f chr_swi_bootstrap.pl \
41 -g "chr_compile_step2('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
42 -t 'halt(1)'
43 $(PL) -q -f chr_swi_bootstrap.pl \
44 -g "chr_compile_step3('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
45 -t 'halt(1)'
47 guard_entailment.pl: guard_entailment.chr chr_translate_bootstrap2.pl
48 $(PL) -q -f chr_swi_bootstrap.pl \
49 -g "chr_compile_step3('guard_entailment.chr','guard_entailment.pl'),halt" \
50 -t 'halt(1)'
52 chr_translate.pl: chr_translate.chr chr_translate_bootstrap2.pl guard_entailment.pl
53 $(PL) -q -f chr_swi_bootstrap.pl \
54 -g "chr_compile_step3('chr_translate.chr','chr_translate.pl'),halt" \
55 -t 'halt(1)'
56 $(PL) -p chr=. -q -f chr_swi_bootstrap.pl \
57 -g "chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt" \
58 -t 'halt(1)'
59 $(PL) -L10M -p chr=. -q -f chr_swi_bootstrap.pl \
60 -g "chr_compile_step4('chr_translate.chr','chr_translate.pl'),halt" \
61 -t 'halt(1)'
63 chr.pl: chr_swi.pl
64 copy chr_swi.pl chr.pl
66 check: chr.pl
67 $(PL) -q -f chr_test.pl -g test,halt -t 'halt(1)'
70 !IF "$(CFG)" == "rt"
71 install::
72 !ELSE
73 install::
74 @if not exist "$(CHR)\$(NULL)" $(MKDIR) "$(CHR)"
75 @for %f in ($(LIBPL)) do \
76 copy "%f" "$(CHR)"
77 copy $(CHRPL) "$(LIBDIR)\chr.pl"
78 copy README "$(CHR)\README.TXT"
79 $(MAKEINDEX)
80 !ENDIF
82 html-install: install-examples
83 pdf-install: install-examples
85 install-examples::
86 if not exist "$(EXDIR)/$(NULL)" $(MKDIR) "$(EXDIR)"
87 cd examples & @for %f in ($(EXAMPLES)) do @copy %f "$(EXDIR)"
89 xpce-install::
91 uninstall::
92 @for %f in ($(LIBPL)) do \
93 del "$(CHR)\%f"
94 del "$(CHR)\README.TXT"
95 del "$(LIBDIR)\chr.pl"
96 $(MAKEINDEX)
98 clean::
99 if exist *~ del *~
100 -del chr.pl chr_translate.pl
101 -del chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
102 -del guard_entailment.pl
104 distclean: clean