no more testing for chr file
[chr.git] / Makefile.mak
blobcebf734335f745db4bebd58a2b36c8c4fd24928d
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 CHRPL= chr_swi.pl
24 EXAMPLES= chrfreeze.chr fib.chr gcd.chr primes.chr \
25 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
26 chrdif.chr
28 all: chr_translate.pl
30 chr_translate_bootstrap1.pl: chr_translate_bootstrap1.chr
31 $(PL) -q -f chr_swi_bootstrap.pl \
32 -g "chr_compile_step1('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
33 -t "halt(1)"
34 $(PL) -q -f chr_swi_bootstrap.pl \
35 -g "chr_compile_step2('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
36 -t "halt(1)"
38 chr_translate_bootstrap2.pl: chr_translate_bootstrap2.chr chr_translate_bootstrap1.pl
39 $(PL) -q -f chr_swi_bootstrap.pl \
40 -g "chr_compile_step2('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
41 -t 'halt(1)'
42 $(PL) -q -f chr_swi_bootstrap.pl \
43 -g "chr_compile_step3('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
44 -t 'halt(1)'
46 guard_entailment.pl: guard_entailment.chr chr_translate_bootstrap2.pl
47 $(PL) -q -f chr_swi_bootstrap.pl \
48 -g "chr_compile_step3('guard_entailment.chr','guard_entailment.pl'),halt" \
49 -t 'halt(1)'
51 chr_translate.pl: chr_translate.chr chr_translate_bootstrap2.pl guard_entailment.pl
52 $(PL) -q -f chr_swi_bootstrap.pl \
53 -g "chr_compile_step3('chr_translate.chr','chr_translate.pl'),halt" \
54 -t 'halt(1)'
55 $(PL) -p chr=. -q -f chr_swi_bootstrap.pl \
56 -g "chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt" \
57 -t 'halt(1)'
58 $(PL) -L10M -p chr=. -q -f chr_swi_bootstrap.pl \
59 -g "chr_compile_step4('chr_translate.chr','chr_translate.pl'),halt" \
60 -t 'halt(1)'
62 chr.pl: chr_swi.pl
63 copy chr_swi.pl chr.pl
65 check: chr.pl
66 $(PL) -q -f chr_test.pl -g test,halt -t 'halt(1)'
69 !IF "$(CFG)" == "rt"
70 install::
71 !ELSE
72 install::
73 @if not exist "$(CHR)\$(NULL)" $(MKDIR) "$(CHR)"
74 @for %f in ($(LIBPL)) do \
75 copy "%f" "$(CHR)"
76 copy $(CHRPL) "$(LIBDIR)\chr.pl"
77 copy README "$(CHR)\README.TXT"
78 $(MAKEINDEX)
79 !ENDIF
81 html-install: install-examples
82 pdf-install: install-examples
84 install-examples::
85 if not exist "$(EXDIR)/$(NULL)" $(MKDIR) "$(EXDIR)"
86 cd examples & @for %f in ($(EXAMPLES)) do @copy %f "$(EXDIR)"
88 xpce-install::
90 uninstall::
91 @for %f in ($(LIBPL)) do \
92 del "$(CHR)\%f"
93 del "$(CHR)\README.TXT"
94 del "$(LIBDIR)\chr.pl"
95 $(MAKEINDEX)
97 clean::
98 if exist *~ del *~
99 -del chr.pl chr_translate.pl
100 -del chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
101 -del guard_entailment.pl
103 distclean: clean