-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
181 lines (161 loc) · 5.46 KB
/
Makefile
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
SHELL = /bin/sh
BATCH_IMAGE = batch.image
INTERACTIVE_IMAGE = pgg.image
COGEN_VERSION = 1.4
DISTRIBUTION = pgg-$(COGEN_VERSION).tar.gz
GENEXT_DISTRIBUTION = genext-$(COGEN_VERSION).tar.gz
prefix = /usr/local
INSTALL_ROOT = /home/proglang/packages
INSTALL_DIR = $(INSTALL_ROOT)/pgg-$(COGEN_VERSION)
LIBDIR = $(INSTALL_DIR)/lib
BINDIR = $(INSTALL_DIR)/bin
EXAMPLEDIR = $(INSTALL_DIR)/examples
EXECUTABLE = pgg.sh
SCHEME48 = scheme48
INSTALL = install -c
INTERACTIVE_HEAPSIZE = 10000000
BATCH_HEAPSIZE = 6000000
BATCH_ENTRYPOINT = cogen-main
TARGETHOST= nakalele.informatik.uni-freiburg.de
TARGETDIR= /home/proglang/www/events/kps2004
TARGET= $(TARGETHOST):$(TARGETDIR)
TARGETGROUP= proglang
TARGETPERM= 664
HTTPDIR = /home/proglang/www/software/pgg
FTPDIR = /usr/local/ftp/iif/thiemann/pgg
all: $(INTERACTIVE_IMAGE)
distribution: $(DISTRIBUTION)
genext-distribution: $(GENEXT_DISTRIBUTION)
export: $(DISTRIBUTION)
ssh $(TARGETHOST) rm -f $(HTTPDIR)/$<
scp -q $< $(TARGETHOST):$(HTTPDIR)
ssh $(TARGETHOST) chgrp $(TARGETGROUP) $(HTTPDIR)/$<
ssh $(TARGETHOST) chmod $(TARGETPERM) $(HTTPDIR)/$<
ssh $(TARGETHOST) rm -f $(FTPDIR)/$<
scp -q $< $(TARGETHOST):$(FTPDIR)
ssh $(TARGETHOST) chgrp $(TARGETGROUP) $(FTPDIR)/$<
ssh $(TARGETHOST) chmod $(TARGETPERM) $(FTPDIR)/$<
install: $(INTERACTIVE_IMAGE) $(EXECUTABLE)
mkdir -p $(LIBDIR) $(BINDIR) $(EXAMPLEDIR)
$(INSTALL) -m 644 $(INTERACTIVE_IMAGE) $(LIBDIR)
$(INSTALL) -m 755 $(EXECUTABLE) $(BINDIR)
$(INSTALL) -m 644 $(cogen_examples) $(EXAMPLEDIR)
$(EXECUTABLE): Makefile
echo "#!/bin/sh" > $(EXECUTABLE)
echo '$(SCHEME48) -h $(INTERACTIVE_HEAPSIZE) -i $(LIBDIR)/$(INTERACTIVE_IMAGE) $$@' >> $(EXECUTABLE)
cogen_packages = pgg-residual pgg
cogen_generate_packages = pgg signals
cogen_specialize_packages = auxiliary pgg-library pgg-specialize cogen-memo-standard pp
batch_packages = signals handle i/o conditions extended-ports
genext_base_files = \
auxiliary.scm \
cogen-gensym.scm \
cogen-boxops.scm \
cogen-globals.scm \
cogen-specialize.scm \
cogen-library.scm \
shift-reset.scm \
cogen-residual.scm \
cogen-completer.scm \
cogen-record.scm \
cogen-memo-standard.scm \
cogen-ctors.scm
pgg_base_files = \
cogen-abssyn.scm \
cogen-construct-genext.scm \
cogen-driver.scm \
cogen-effect.scm \
cogen-env.scm \
cogen-eq-flow.scm \
cogen-labset-bylist.scm \
cogen-macro.scm \
cogen-oca.scm \
cogen-scheme.scm \
cogen-skeleton.scm \
cogen-terminate.scm \
cogen-typesig.scm \
scheme-standard-macros.scm
cogen_base_files = $(genext_base_files) $(pgg_base_files)
cogen_cps_files = cogen-cps.scm
cogen_ds_files = cogen-direct-anf.scm
cogen_combinator_files = $(cogen_ds_files)
genext_files = $(genext_base_files) $(cogen_combinator_files)
cogen_files = $(cogen_base_files) $(cogen_combinator_files)
batch_files = tiny-format.scm fname.scm command-line.scm cogen-batch.scm
gambit_shift_reset = shift-reset-r4rs.scm
gambit_generic_syntax = cogen-ctors-defmacro.scm cogen-record-defmacro.scm
s48_shift_reset = shift-reset.scm
s48_generic_syntax = cogen-ctors.scm cogen-record.scm
genext_config_files = genext-packages.scm
pgg_config_files = pgg-packages.scm
config_files = $(genext_config_files) $(pgg_config_files)
cogen_examples = \
examples/2lazy-support.scm \
examples/2lazy.scm \
examples/app.scm \
examples/apply.scm \
examples/cyclic.scm \
examples/dotprod.scm \
examples/int.scm \
examples/list.dat \
examples/object.scm \
examples/pm-input.scm \
examples/pm.scm \
examples/power.scm \
examples/pure-arith.scm \
examples/unify-aux.scm \
examples/unify.scm \
examples/modint.scm \
examples/modint-base.scm \
examples/modint-dynamic.scm \
examples/modint-mutual.scm \
examples/modint-examples.scm \
examples/sample_modules_session.scm \
examples/optimal.scm \
examples/poly.scm \
examples/poly-rec.scm
additional_files = Makefile
cogen-load-gambit.scm : Makefile
(echo "(load \"$(gambit_shift_reset)\")" ; \
for f in $(gambit_generic_syntax) ; do \
echo "(load \"$$f\")" ; \
done ; \
for f in $(cogen_base_files) ; do \
echo "(load \"$$f\")" ; \
done ; \
for f in $(cogen_combinator_files) ; do \
echo "(load \"$$f\")" ; \
done \
) > $@
$(BATCH_IMAGE) : $(cogen_files) $(batch_files) cogen-load-s48.scm
(echo ",batch on"; \
echo ",bench on"; \
echo ";; ,flush source maps"; \
for package in $(cogen_packages) ; do \
echo ",load-package $$package"; \
done ; \
echo ",open $(cogen_generate_packages)"; \
echo ",open $(cogen_specialize_packages)"; \
echo ",open $(batch_packages)"; \
echo ",load $(batch_files)"; \
echo ";; ,flush"; \
echo ",collect"; \
echo ",dump $(BATCH_IMAGE) \"(PGG-$(COGEN_VERSION) made by $$LOGNAME on `date`)\""; \
echo ",exit" ) \
| $(SCHEME48) -h $(BATCH_HEAPSIZE)
$(INTERACTIVE_IMAGE) : $(cogen_files) $(config_files)
(echo ",bench on"; \
echo ",config,load $(config_files)"; \
for package in $(cogen_packages) ; do \
echo ",load-package $$package"; \
done ; \
echo ",open $(cogen_generate_packages)"; \
echo ",open $(cogen_specialize_packages)"; \
echo ",collect"; \
echo ",dump $(INTERACTIVE_IMAGE) \"(PGG-$(COGEN_VERSION) made by $$LOGNAME `date`)\""; \
echo ",exit" ) \
| $(SCHEME48) -h $(INTERACTIVE_HEAPSIZE)
$(DISTRIBUTION): $(cogen_files) $(config_files) $(cogen_examples) $(additional_files) LICENSE
tar cvhzf $(DISTRIBUTION) $(cogen_files) $(config_files) $(cogen_examples) $(additional_files) LICENSE
$(GENEXT_DISTRIBUTION): $(genext_files) $(genext_config_files) LICENSE
tar cvhzf $(GENEXT_DISTRIBUTION) $(genext_files) $(genext_config_files) LICENSE