-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (73 loc) · 2.75 KB
/
Copy pathMakefile
File metadata and controls
95 lines (73 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Scheme = $(shell if [ -e /usr/local/bin/scheme ]; then echo /usr/local/bin/scheme; elif [ -e /usr/bin/scheme ]; then echo /usr/bin/scheme; elif [ -e /usr/local/bin/petite ]; then echo /usr/local/bin/petite; elif [ -e /usr/bin/petite ]; then echo /usr/bin/petite; else echo scheme; fi)
Schemebase = $(shell basename $(Scheme))
m := $(shell echo '(machine-type)' | $(Scheme) -q)
Tclsh = tclsh
include Mf-SWLVER
###############################################################################
# SWL_ROOT is the installation root for SWL
# The SWL boot file (swl.boot), heap (swl.heap), script (swl), and
# compiled applications (eg. repl.so) will be installed in the the
# directory named $(SWL_ROOT)/<arch> where <arch> is the architecture
# reported by Scheme for (machine-type).
SWL_ROOT=lib
# Specify optimization level, inspector, and profiling flags
o=2
i=f
p=f
# Should not need to modify anything below here.
all: config.make
ifeq "$(Schemebase)" "petite"
@if [ ! -e lib/$(m)/swl.boot -o ! -e lib/$(m)/swl.so ] ; then\
echo "no libraries found; cannot rebuild with Petite Chez Scheme" ;\
false ;\
else\
echo "using existing libraries; cannot rebuild with Petite Chez Scheme" ;\
fi
else
(cd src/swl; $(MAKE))
endif
install-doc: config.make
(cd src/dc/stex; $(MAKE))
(cd src/dc; $(MAKE) install)
tclversion.ss:
$(Tclsh) tclversion.tcl
config.scheme config.make: tclversion.ss configure.ss Makefile
echo "(define swl:Scheme \"$(Scheme)\")\
(define prefix \"$(SWL_ROOT)\")\
(set! swl:version \"$(SWLVER)\")\
(optimize-level $(o))\
(quote (compile-profile #$(p)))\
(generate-inspector-information #$(i))" > config.scheme
$(Scheme) configure.ss
config: cleanconfig config.make
# clean cleans out files used during build process, leaves heaps and libraries
clean: cleanintermediate cleanconfig
/bin/rm -f swl
/bin/rm -f Make.out
# reallyclean removes heaps and libraries
reallyclean: cleanlib cleanstex clean
# distclean removes online documentation produced by document compiler
distclean: cleanref cleanlib cleanstex clean
/bin/rm -f swl
cleanintermediate: config.make
(cd src/oop; $(MAKE) clean)
(cd src/swl; $(MAKE) clean)
(cd src/dc/stex ; $(MAKE) clean)
(cd src/dc ; $(MAKE) clean)
(cd apps/repl ; $(MAKE) clean)
(cd apps/edit ; $(MAKE) clean)
(cd apps/htmlview ; $(MAKE) clean)
cleanconfig:
rm -f tclversion.ss config.make config.scheme
cleanlib: config.make
$(MAKE) -f Mf-cleanlib cleanlib
cleanref:
(cd $(SWL_ROOT)/ref ; rm -f *.html ; rm -rf math)
cleanstex:
(cd src/dc/stex ; $(MAKE) reallyclean)
lecture: all
(cd apps/lecture ; $(MAKE))
install: config.make all
$(MAKE) -f Mf-install SWLVER=$(SWLVER)
tarball:
git archive HEAD | bzip2 > /tmp/swl-`date +"%Y-%m-%d-%H:%M"`.tar.bz2