1 # "Makefile" for scm Scheme Interpreter
2 # Copyright (C) 1990-2008, 2010 Free Software Foundation, Inc.
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Lesser General Public License as
6 # published by the Free Software Foundation, either version 3 of the
7 # License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this program. If not, see
16 # <http://www.gnu.org/licenses/>.
18 # Author: Aubrey Jaffer
22 INSTALL_PROGRAM
= ${INSTALL}
23 INSTALL_DATA
= ${INSTALL} -m
644
24 INSTALL_INFO
= ginstall-info
28 BUILD
= .
/build
-hsystem
30 TEXI2HTML
= /usr
/bin
/texi2html
-split
-verbose
33 MAKEDEV
= $(MAKE
) -f
$(HOME
)/makefile.dev
34 CHPAT
= $(HOME
)/bin
/chpat
44 # VERSION is defined in "patchlvl.h"
50 @echo
"This is the scm $(VERSION) distribution. Read \"scm.info\""
51 @echo
"to learn how to build and install SCM. Or browse"
52 @echo
" http://people.csail.mit.edu/jaffer/SCM"
55 # ./configure --distdir=${HOME}/dist/ --snapdir=${HOME}/pub/ --htmldir=${HOME}/public_html/ --pdfdir=${HOME}/public_html/
59 Makefile
: config.status
62 libscmdir
= $(libdir)scm
/
63 windistdir
= /c
/Voluntocracy
/dist/
64 rpm_prefix
= $(HOME
)/rpmbuild
/
65 prevdocsdir
= prevdocs
/
67 # This should be moved to "config.status"
68 x11incdir
=/usr
/include/
70 # directory where COPYING and InitXXX.scm reside.
74 IMPLINIT
= $(IMPLPATH
)Init
$(VERSION
).scm
76 # If pathname where InitXXX.scm resides is not known in advance then
77 # SCM_INIT_PATH is the environment variable whose value is the
78 # pathname where InitXXX.scm resides.
80 hfiles
= scm.h scmfig.h setjump.h patchlvl.h continue.h
81 cfiles
= scmmain.c scm.c time.c repl.c ioext.c scl.c sys.c eval.c \
82 subr.c sc2.c unif.c rgx.c crs.c dynl.c record.c posix.c socket.c\
83 unix.c rope.c ramap.c gsubr.c edline.c continue.c \
84 findexec.c script.c debug.c byte.c bytenumb.c differ.c
85 ufiles
= pre-crt0.c ecrt0.c gmalloc.c unexec.c unexelf.c unexhp9k800.c \
86 unexsunos4.c unexalpha.c unexsgi.c
87 # cxux-crt0.s ecrt0.c gmalloc.c pre-crt0.c unexaix.c unexalpha.c \
88 # unexapollo.c unexconvex.c unexec.c unexelf.c unexelf1.c \
89 # unexencap.c unexenix.c unexfx2800.c unexhp9k800.c unexmips.c \
90 # unexnext.c unexnt.c unexsgi.c unexsni.c unexsunos4.c
91 ofiles
= scm.o time.o repl.o scl.o sys.o eval.o subr.o unif.o rope.o \
92 continue.o findexec.o script.o debug.o
94 ifiles
= Init
$(VERSION
).scm Transcen.scm Link.scm Macro.scm Macexp.scm \
95 Tscript.scm compile.scm Iedline.scm Idiffer.scm
96 hobfiles
= hobbit.scm scmhob.scm scmhob.h
97 turfiles
= turtlegr.c turtle grtest.scm
98 xafiles
= xatoms.scm x11.scm xevent.scm keysymdef.scm
99 xfiles
= x.c x.h xgen.scm xevent.h inc2scm
$(xafiles
)
101 tfiles
= r4rstest.scm example.scm pi.scm pi.c split.scm bench.scm \
102 syntest2.scm syntest1.scm
103 texifiles
= scm.texi fdl.texi indexes.texi platform.txi features.txi
104 dfiles
= ANNOUNCE README COPYING COPYING.LESSER scm
.1 scm.doc QUICKREF \
105 $(texifiles
) scm.
info Xlibscm.
info Xlibscm.texi \
106 hobbit.
info hobbit.texi
107 mfiles
= configure Makefile build.scm build build.bat requires.scm \
108 .gdbinit mkimpcat.scm disarm.scm scm.spec scm.nsi
109 sfiles
= setjump.mar setjump.s ugsetjump.s continue-ia64.S \
110 get-contoffset-ia64.c
111 wbfiles
= wbtab.scm rwb-isam.scm
112 afiles
= $(dfiles
) ChangeLog
$(cfiles
) $(hfiles
) $(ifiles
) $(tfiles
) \
113 $(mfiles
) $(hobfiles
) $(sfiles
) $(ufiles
) $(xfiles
) \
114 $(turfiles
) version.txi
# $(wbfiles)
116 lsdfiles
= $(ifiles
) $(hobfiles
) COPYING COPYING.LESSER r4rstest.scm \
117 build build.scm mkimpcat.scm patchlvl.h
$(xafiles
) *.so
120 ctagfiles
= $(hfiles
) $(cfiles
) $(xfiles
)
121 tagfiles
= $(ctagfiles
) $(ifiles
) $(sfiles
) $(mfiles
) \
122 Xlibscm.texi hobbit.texi build hobbit.scm
123 # # $(ufiles) ChangeLog $(dfiles)
126 mkdir
-p
$(DESTDIR
)$(includedir)
127 mkdir
-p
$(DESTDIR
)$(bindir)
128 mkdir
-p
$(DESTDIR
)$(libdir)
129 mkdir
-p
$(DESTDIR
)$(libscmdir
)
130 mkdir
-p
$(DESTDIR
)$(mandir)man1
/
131 mkdir
-p
$(DESTDIR
)$(infodir)
132 mkdir
-p
$(DESTDIR
)$(pdfdir
)
133 mkdir
-p
$(DESTDIR
)$(dvidir
)
135 platform.txi
: build.scm
137 $(SCMLIT
) -r database-browse
-l build.scm \
138 -e
"(browse build 'platform)" > platform.txi
139 features.txi
: build build.scm
141 $(SCMLIT
) -l build
-e
"(make-features-txi)"
143 scm.
dvi: $(texifiles
) Makefile
145 Xlibscm.
dvi: Xlibscm.texi version.txi
147 hobbit.
dvi: hobbit.texi version.txi
149 dvi: scm.
dvi Xlibscm.
dvi hobbit.
dvi
156 install-dvi
: scm.
dvi Xlibscm.
dvi hobbit.
dvi
157 $(INSTALL_DATA
) $< Xlibscm.
dvi hobbit.
dvi $(DESTDIR
)$(dvidir
)
159 scm.pdf
: $(texifiles
)
161 Xlibscm.pdf
: Xlibscm.texi version.txi
163 hobbit.pdf
: hobbit.texi version.txi
165 pdf
: scm.pdf Xlibscm.pdf hobbit.pdf
172 install-pdf
: scm.pdf Xlibscm.pdf hobbit.pdf
173 $(INSTALL_DATA
) $< Xlibscm.pdf hobbit.pdf
$(DESTDIR
)$(pdfdir
)
175 scm_toc.html
: $(texifiles
)
177 $(DESTDIR
)$(htmldir
)scm_toc.html
: scm_toc.html
installdirs
179 if
[ -f
$(prevdocsdir
)scm_toc.html
]; \
180 then hitch
$(prevdocsdir
)scm_\
*.html scm_\
*.html \
181 $(DESTDIR
)$(htmldir
); \
182 else $(INSTALL_DATA
) scm_
*.html
$(DESTDIR
)$(htmldir
); fi
184 Xlibscm_toc.html
: Xlibscm.texi version.txi
186 $(DESTDIR
)$(htmldir
)Xlibscm_toc.html
: Xlibscm_toc.html
installdirs
187 -rm -f Xlibscm_stoc.html
188 chpat
'</HEAD>' '<LINK REL="icon" HREF="Logo/SCM.ico">\
189 <LINK REL="shortcut icon" HREF="Logo/SCM.ico">\
190 </HEAD>' Xlibscm_
*.html
191 $(INSTALL_DATA
) Xlibscm_
*.html
$(DESTDIR
)$(htmldir
)
193 hobbit_toc.html
: hobbit.texi version.txi
195 $(DESTDIR
)$(htmldir
)hobbit_toc.html
: hobbit_toc.html
installdirs
196 -rm -f hobbit_stoc.html
197 chpat
'</HEAD>' '<LINK REL="icon" HREF="Logo/SCM.ico">\
198 <LINK REL="shortcut icon" HREF="Logo/SCM.ico">\
199 </HEAD>' hobbit_
*.html
200 $(INSTALL_DATA
) hobbit_
*.html
$(DESTDIR
)$(htmldir
)
202 html
: scm_toc.html Xlibscm_toc.html hobbit_toc.html
204 install-html
: $(DESTDIR
)$(htmldir
)scm_toc.html \
205 $(DESTDIR
)$(htmldir
)Xlibscm_toc.html \
206 $(DESTDIR
)$(htmldir
)hobbit_toc.html
208 scm-
$(VERSION
).
info: $(texifiles
)
209 $(MAKEINFO
) $< --no-split
-o
$@
210 scm.
info: scm-
$(VERSION
).
info
211 if
[ -f
$(prevdocsdir
)scm.
info ]; \
212 then infobar
$(prevdocsdir
)scm.
info $< $@
; \
214 $(DESTDIR
)$(infodir)scm.
info: scm.
info installdirs
215 $(INSTALL_DATA
) -p
$< $@
216 -rm $(DESTDIR
)$(infodir)scm.
info.gz
217 $(POST_INSTALL
) # Post-install commands follow.
218 -$(INSTALL_INFO
) $@
$(DESTDIR
)$(infodir)dir
220 Xlibscm.
info: Xlibscm.texi version.txi
221 $(MAKEINFO
) $< --no-split
-o
$@
222 $(DESTDIR
)$(infodir)Xlibscm.
info: Xlibscm.
info installdirs
223 $(INSTALL_DATA
) $< $@
224 -rm $(DESTDIR
)$(infodir)Xlibscm.
info*.gz
225 $(POST_INSTALL
) # Post-install commands follow.
226 -$(INSTALL_INFO
) $@
$(DESTDIR
)$(infodir)dir
228 hobbit.
info: hobbit.texi version.txi
229 $(MAKEINFO
) $< --no-split
-o hobbit.
info
230 $(DESTDIR
)$(infodir)hobbit.
info: hobbit.
info installdirs
231 $(INSTALL_DATA
) $< $@
232 -rm $(DESTDIR
)$(infodir)hobbit.
info*.gz
233 $(POST_INSTALL
) # Post-install commands follow.
234 -$(INSTALL_INFO
) $@
$(DESTDIR
)$(infodir)dir
236 install-info
: $(DESTDIR
)$(infodir)scm.
info \
237 $(DESTDIR
)$(infodir)Xlibscm.
info \
238 $(DESTDIR
)$(infodir)hobbit.
info
241 $(DESTDIR
)$(infodir)scm.
info.gz
: $(DESTDIR
)$(infodir)scm.
info
243 $(DESTDIR
)$(infodir)Xlibscm.
info.gz
: $(DESTDIR
)$(infodir)Xlibscm.
info
245 $(DESTDIR
)$(infodir)hobbit.
info.gz
: $(DESTDIR
)$(infodir)hobbit.
info
247 install-infoz
: $(DESTDIR
)$(infodir)scm.
info.gz \
248 $(DESTDIR
)$(infodir)Xlibscm.
info.gz \
249 $(DESTDIR
)$(infodir)hobbit.
info.gz
253 nroff
-man
$< | ul
-tunknown
>$@
255 README
: build build.scm scm.
info
256 $(SCMEXE
) -l build
-e
"(make-readme)"
258 docs
: README scm.doc install-html install-pdf install-dvi install-infoz
260 prevdocs
: $(prevdocsdir
)scm_toc.html
$(prevdocsdir
)scm.
info
261 $(prevdocsdir
)scm_toc.html
:
262 $(prevdocsdir
)scm.
info:
263 cd
$(prevdocsdir
); unzip
-a
$(distdir
)scm
*.zip
264 rm $(prevdocsdir
)scm
/scm.
info
265 cd
$(prevdocsdir
)scm
; $(MAKE
) scm.
info; $(MAKE
) scm_toc.html
266 cd
$(prevdocsdir
); mv
-f scm
/scm.
info scm
/*.html .
/
267 rm -rf
$(prevdocsdir
)scm
268 -rm -f scm-
$(VERSION
).
info
275 if
[ -d
/usr
/X11R6
/lib
]; then
$(MAKE
) x.so
; fi
277 cp
-p requires.scm require.scm
279 # SCMLIT -- try making this first!
280 scmlit
: $(ofiles
) scmmain.o require.scm Makefile
281 $(LD
) -o scmlit
$(ofiles
) scmmain.o
$(LIBS
)
285 echo
"#ifndef IMPLINIT" > newflags.h
286 echo
"#define IMPLINIT \"$(IMPLINIT)\"" >> newflags.h
287 echo
"#endif" >> newflags.h
288 echo
"#define CHEAP_CONTINUATIONS" >> newflags.h
289 echo
"#define CAUTIOUS" >> newflags.h
290 -if
(cmp
-s newflags.h scmflags.h
) then
rm newflags.h
; \
291 else mv newflags.h scmflags.h
; fi
293 $(CC
) -c
$(CFLAGS
) $< -o
$@
294 scm.o
: scm.c scm.h scmfig.h scmflags.h patchlvl.h
295 scmmain.o
: scmmain.c scm.h scmfig.h scmflags.h patchlvl.h
296 scl.o
: scl.c scm.h scmfig.h scmflags.h
297 eval.o
: eval.c scm.h scmfig.h scmflags.h setjump.h
298 debug.o
: debug.c scm.h scmfig.h scmflags.h setjump.h
299 unif.o
: unif.c scm.h scmfig.h scmflags.h
300 #ramap.o: ramap.c scm.h scmfig.h scmflags.h
301 repl.o
: repl.c scm.h scmfig.h scmflags.h setjump.h
302 sys.o
: sys.c scm.h scmfig.h scmflags.h setjump.h
303 time.o
: time.c scm.h scmfig.h scmflags.h
304 subr.o
: subr.c scm.h scmfig.h scmflags.h
305 rope.o
: rope.c scm.h scmfig.h scmflags.h
306 continue.o
: continue.c continue.h setjump.h scm.h scmfig.h scmflags.h
307 continue-ia64.o
: continue-ia64.S get-contoffset-ia64.c
308 gcc
-o get-contoffset-ia64 get-contoffset-ia64.c
309 .
/get-contoffset-ia64 contoffset-ia64.S
310 gcc
-c
-o continue-ia64.o continue-ia64.S
312 # Simple build with bignums for running JACAL
314 $(BUILD
) -s
$(IMPLPATH
) -F cautious bignums arrays
# i/o-extensions
317 # R4RS interpreter (not dumpable)
319 echo
"-F cautious bignums arrays inexact" >> scm4.opt
320 echo
"-F engineering-notation dynamic-linking" >> scm4.opt
321 # if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> scm4.opt; fi
322 scm4
: $(cfiles
) $(hfiles
) build.scm build scm4.opt
323 $(BUILD
) -f scm4.opt
-o scm
-s
$(IMPLPATH
)
324 -rm $(ofiles
) scmmain.o
327 # R5RS interpreter (not dumpable)
329 echo
"-F cautious bignums arrays inexact" >> scm5.opt
330 echo
"-F engineering-notation dynamic-linking" >> scm5.opt
331 echo
"-F macro" >> scm5.opt
332 # if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> scm5.opt; fi
333 scm5
: $(cfiles
) $(hfiles
) build.scm build scm5.opt
334 $(BUILD
) -f scm5.opt
-o scm
-s
$(IMPLPATH
)
335 -rm $(ofiles
) scmmain.o
339 # http://www.opensubscriber.com/message/emacs-devel@gnu.org/1007118.html
340 # Kernels later than 2.6.11 must do (as root) before dumping:
341 #echo 0 > /proc/sys/kernel/randomize_va_space
343 # dumpable R4RS interpreter
345 echo
"-F cautious bignums arrays inexact" >> udscm4.opt
346 echo
"-F engineering-notation dump dynamic-linking" >> udscm4.opt
347 # if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> udscm4.opt; fi
348 udscm4
: $(cfiles
) $(hfiles
) build.scm build udscm4.opt
349 $(BUILD
) -f udscm4.opt
-o udscm4
-s
$(IMPLPATH
)
350 -rm $(ofiles
) scmmain.o
351 dscm4
: udscm4
$(ifiles
) require.scm
352 if
[ -f
/proc
/sys
/kernel
/randomize_va_space
-a\
353 "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then
{\
354 cat
/proc
/sys
/kernel
/randomize_va_space
> randomize_va_space.tmp
;
355 # echo 0 > /proc/sys/kernel/randomize_va_space;\
357 -rm -f slibcat implcat scm~
359 echo
"(quit)" |
$(SETARCH
) .
/udscm4
-no-init-file
-o scm
360 if
[ -f randomize_va_space.tmp
]; then
{\
361 cat randomize_va_space.tmp
> /proc
/sys
/kernel
/randomize_va_space
;\
362 rm randomize_va_space.tmp
;\
365 # dumpable R5RS interpreter
368 cat udscm4.opt
>> udscm5.opt
369 echo
"-F macro" >> udscm5.opt
370 udscm5
: $(cfiles
) $(ufiles
) $(hfiles
) build.scm build udscm5.opt
371 $(BUILD
) -f udscm5.opt
-o udscm5
-s
$(IMPLPATH
)
372 -rm $(ofiles
) scmmain.o
374 dscm5
: udscm5
$(ifiles
) require.scm
376 # if [ -f /proc/sys/kernel/randomize_va_space -a\
377 # "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\
378 # cat /proc/sys/kernel/randomize_va_space > randomize_va_space.tmp;
380 # echo 0 > /proc/sys/kernel/randomize_va_space;\
383 # -rm -f slibcat implcat scm~
385 # echo "(quit)" | $(SETARCH) ./udscm5 -no-init-file -r5 -o scm
386 # if [ -f randomize_va_space.tmp ]; then {\
387 # cat randomize_va_space.tmp > /proc/sys/kernel/randomize_va_space;\
388 # rm randomize_va_space.tmp;\
393 # R5RS interpreter for debugging with GDB.
395 cat udscm5.opt
> gdb.opt
396 echo
"-F debug" >> gdb.opt
397 echo
"--compiler-options=-Wall" >> gdb.opt
398 echo
"--linker-options=-Wall" >> gdb.opt
399 echo
"-D NO_ENV_CACHE" >> gdb.opt
400 # echo "-DTEST_FARLOC -DTEST_SCM2PTR" >> gdb.opt
401 udgdbscm
: gdb.opt
$(cfiles
) $(ufiles
) $(hfiles
) build.scm build
402 $(BUILD
) -f gdb.opt
-o udgdbscm
-s
$(IMPLPATH
)
403 gdbscm
: udgdbscm
$(ifiles
) require.scm
404 echo
"(quit)" |
$(SETARCH
) .
/udgdbscm
-no-init-file
-r5
-o gdbscm
406 # R4RS interpreter for profiling
408 cat udscm4.opt
>> pg.opt
409 echo
"--compiler-options=-pg" >> pg.opt
410 echo
"--linker-options=-pg" >> pg.opt
411 echo
"-DLACK_SETITIMER" >> pg.opt
413 $(BUILD
) -f pg.opt
-o udpgscm
-s
$(IMPLPATH
)
415 echo
"(quit)" |
$(SETARCH
) .
/udpgscm
-no-init-file
-o pgscm
419 echo
"-F cautious bignums arrays inexact" >> libscm.opt
420 echo
"-F engineering-notation" >> libscm.opt
421 echo
"-F dynamic-linking" >> libscm.opt
423 libscm.a
: libscm.opt scm.h scmfig.h
424 $(BUILD
) -t lib
-f libscm.opt
425 libtest
: libscm.a libtest.c
426 $(LD
) -o libtest libtest.c libscm.a
-ldl
-lm
-lc
429 # DLLs for dynamic linking
431 echo
"--compiler-options=-Wall" >> dlls.opt
432 echo
"--linker-options=-Wall" >> dlls.opt
433 mydlls
: dlls.opt bytenumb.so
434 $(BUILD
) -t dll
-f dlls.opt
-c ramap.c
435 $(BUILD
) -t dll
-f dlls.opt
-c record.c
436 $(BUILD
) -t dll
-f dlls.opt
-c gsubr.c
437 $(BUILD
) -t dll
-f dlls.opt
-c byte.c
438 $(BUILD
) -t dll
-f dlls.opt
-c sc2.c
439 $(BUILD
) -t dll
-f dlls.opt
-c ioext.c
440 $(BUILD
) -t dll
-f dlls.opt
-c posix.c
441 $(BUILD
) -t dll
-f dlls.opt
-c socket.c
442 $(BUILD
) -t dll
-f dlls.opt
-c unix.c
443 $(BUILD
) -t dll
-f dlls.opt
-F curses
444 $(BUILD
) -t dll
-f dlls.opt
-c rgx.c
445 if
[ -f
/usr
/lib
/libreadline.so
]; \
446 then
$(BUILD
) -t dll
-f dlls.opt
-F edit-line
; fi
448 rwb-isam.scm wbtab.scm
: ..
/wb
/rwb-isam.scm ..
/wb
/wbtab.scm
449 -cp
-f ..
/wb
/rwb-isam.scm ..
/wb
/wbtab.scm .
/
450 db.so
: dlls.opt build.scm scm.h scmfig.h ..
/wb
/c
/*.c
$(wbfiles
)
452 $(BUILD
) -t dll
-f dlls.opt
-F wb
453 $(SCMLIT
) -lmkimpcat.scm
455 bytenumb.so
: bytenumb.c scm.h scmfig.h
456 $(BUILD
) -t dll
-f dlls.opt
-F byte-number inexact bignums
457 differ.so
: differ.c scm.h scmfig.h
458 $(BUILD
) -t dll
-f dlls.opt
-F differ
459 myturtle
: dlls.opt scm.h scmfig.h
460 $(BUILD
) -t dll
-f dlls.opt
-F turtlegr
462 x.so
: x.c x.h xevent.h dlls.opt scm.h scmfig.h
463 $(BUILD
) -t dll
-f dlls.opt
-F x
465 # Generate x11 include and Scheme files
466 x11.scm
: inc2scm Makefile
468 $(SCMLIT
) -l inc2scm x11.scm x
: $(x11incdir
) \
469 X11
/X.h X11
/cursorfont.h X11
/Xlib.h X11
/Xutil.h
470 keysymdef.scm
: inc2scm Makefile
472 $(SCMLIT
) -l inc2scm keysymdef.scm x
: $(x11incdir
) \
473 X11
/keysym.h X11
/keysymdef.h
474 xevent.h xevent.scm xatoms.scm
: xgen.scm Makefile
475 $(SCMLIT
) -l xgen.scm
$(x11incdir
)X11
/Xlib.h
477 # if [ -x "$(CPROTO)" ]; then $(CPROTO) x.c > x.h; fi
479 # Check SCM; SCMLIT function.
480 checklit
: require.scm
481 $(SCMLIT
) -fr4rstest.scm
-e
'(test-sc4)(test-delay)(gc)' \
482 -e
'(or (null? errs) (quit 1))'
483 Checklit
: require.scm
484 $(SCMLIT
) --no-symbol-case-fold
-fr4rstest.scm
-e
'(test-sc4)(test-delay)(gc)' \
485 -e
'(or (null? errs) (quit 1))'
486 check: r4rstest.scm require.scm
487 $(SCMEXE
) -fr4rstest.scm
-e
'(test-sc4)(test-cont)(test-delay)(gc)' \
488 -e
'(or (null? errs) (quit 1))'
489 Check
: r4rstest.scm require.scm
490 $(SCMEXE
) --no-symbol-case-fold
-fr4rstest.scm
-e
'(test-sc4)(test-cont)(test-delay)(gc)' \
491 -e
'(or (null? errs) (quit 1))'
492 checkmacro
: syntest1.scm syntest2.scm r4rstest.scm
493 $(SCMEXE
) -rmacro
-fsyntest1.scm
-fsyntest2.scm \
494 -fr4rstest.scm
-e
'(test-sc4)(test-cont)(test-delay)' -fsyntest1 \
495 -e
'(or (null? errs) (quit 1))'
497 # Measuare running speed of SCM; SCMLIT. Results are appended to file
500 echo
`whoami`@
`hostname` testing scm \
501 `$(SCMEXE) -e'(display *scm-version*)'` >> BenchLog
502 echo on
`date` >> BenchLog
503 ls
-l scm
>> BenchLog
506 $(SCMEXE
) -lbench.scm
507 -cat prng.log
>> BenchLog
509 -cat pi.log
>> BenchLog
513 -rm -f pi.log prng.log
515 echo
`whoami`@
`hostname` testing scmlit \
516 `$(SCMLIT) -e'(display *scm-version*)'` >> BenchLog
517 echo on
`date` >> BenchLog
518 ls
-l scmlit
>> BenchLog
519 size scmlit
>> BenchLog
521 $(SCMLIT
) -lbench.scm
522 -cat prng.log
>> BenchLog
524 -cat pi.log
>> BenchLog
528 -rm -f pi.log prng.log
530 $(SCMLIT
) -e
"(slib:report #t)"
531 $(SCMEXE
) -e
"(slib:report #t)"
533 ################ INSTALL DEFINITIONS ################
535 install-man
: scm
.1 installdirs
536 -$(INSTALL_DATA
) $< $(DESTDIR
)$(mandir)man1
/
538 install-lib
: $(lsdfiles
) installdirs
539 $(INSTALL_DATA
) $(lsdfiles
) $(DESTDIR
)$(libscmdir
)
540 test -f
$(DESTDIR
)$(libscmdir
)require.scm || \
541 $(INSTALL_DATA
) requires.scm
$(DESTDIR
)$(libscmdir
)require.scm
543 install: install-man install-lib install-infoz
installdirs
544 $(INSTALL_PROGRAM
) scm scmlit
$(DESTDIR
)$(bindir)
545 -strip $(DESTDIR
)$(bindir)scmlit
546 $(INSTALL_DATA
) scm.h scmfig.h scmflags.h
$(DESTDIR
)$(includedir)
547 $(INSTALL_DATA
) libscm.a
$(DESTDIR
)$(libdir)libscm.a
550 $(PRE_UNINSTALL
) # Pre-uninstall commands follow.
551 -$(INSTALL_INFO
) --delete
$(DESTDIR
)$(infodir)scm.
info $(DESTDIR
)$(infodir)dir
552 -$(INSTALL_INFO
) --delete
$(DESTDIR
)$(infodir)Xlibscm.
info $(DESTDIR
)$(infodir)dir
553 -$(INSTALL_INFO
) --delete
$(DESTDIR
)$(infodir)hobbit.
info $(DESTDIR
)$(infodir)dir
554 $(NORMAL_UNINSTALL
) # Normal commands follow.
555 -rm $(DESTDIR
)$(bindir)scm
$(DESTDIR
)$(bindir)scmlit
556 -rm $(DESTDIR
)$(mandir)man1
/scm
.1
557 -rm $(DESTDIR
)$(includedir)scm.h \
558 $(DESTDIR
)$(includedir)scmfig.h \
559 $(DESTDIR
)$(includedir)scmflags.h
560 -rm $(DESTDIR
)$(libdir)libscm.a
561 -(cd
$(DESTDIR
)$(libscmdir
); rm $(lsdfiles
) require.scm
)
562 -rm $(DESTDIR
)$(infodir)scm.
info.gz \
563 $(DESTDIR
)$(infodir)Xlibscm.
info.gz \
564 $(DESTDIR
)$(infodir)hobbit.
info.gz
565 $(POST_UNINSTALL
) # Post-uninstall commands follow.
566 -rmdir
$(DESTDIR
)$(libscmdir
)
568 ################ WINDOWS INSTALLER DEFINITIONS ################
571 echo
"-F arrays array-for-each byte i/o-extensions" >> winscm5.opt
572 echo
"-F bignums inexact engineering-notation" >> winscm5.opt
573 echo
"-F cautious rev2-procedures macro" >> winscm5.opt
574 echo
"-F wb-no-threads" >> winscm5.opt
575 gw32scmwb.sh
: scmlit winscm5.opt build.scm Makefile version.txi
576 .
/build
-p gnu-win32
-f winscm5.opt
-w gw32scmwb.sh
577 scm.exe
: gw32scmwb.sh
580 hobbit.html
: hobbit.texi
581 $(MAKEINFO
) --html
--no-split
--no-warn hobbit.texi
582 scm.html
: $(texifiles
)
583 $(MAKEINFO
) --html
--no-split
--no-warn
--force scm.texi
585 ## to build a windows installer
586 ## make sure makeinfo and NSIS are available on the commandline
587 w32install
: scm.exe hobbit.html scm.html
590 #### Stuff for maintaining SCM below ####
597 ln
$(afiles
) temp
/scm
599 release
: dist pdf
# rpm
600 cvs tag
-F scm-
$(VERSION
)
601 $(INSTALL_DATA
) ANNOUNCE
$(htmldir
)SCM_ANNOUNCE.txt
602 $(RSYNC
) $(htmldir
)SCM.html
$(htmldir
)SCM_ANNOUNCE.txt \
603 $(Uploadee
):public_html
/
604 $(RSYNC
) $(distdir
)README
$(distdir
)scm-
$(VERSION
).zip \
605 $(distdir
)scm-
$(VERSION
)-$(RELEASE
).
*.rpm \
606 $(htmldir
)hobbit.pdf
$(htmldir
)Xlibscm.pdf
$(Uploadee
):dist/
607 # upload $(distdir)README $(distdir)scm-$(VERSION).zip ftp.gnu.org:gnu/jacal/
608 # $(distdir)scm-$(VERSION)-$(RELEASE).x86_64.rpm
610 upzip
: $(snapdir
)scm.zip
611 $(RSYNC
) $(snapdir
)scm.zip
$(Uploadee
):pub
/
612 $(RSYNC
) r4rstest.scm
$(HOME
)/dist/
613 $(RSYNC
) r4rstest.scm
$(Uploadee
):dist/
615 dist: $(distdir
)scm-
$(VERSION
).zip
616 $(distdir
)scm-
$(VERSION
).zip
: temp
/scm
617 $(MAKEDEV
) DEST
=$(distdir
) PROD
=scm ver
=-$(VERSION
) zip
620 cp
-f
$(snapdir
)scm.zip
$(rpm_prefix
)SOURCES
/scm-
$(VERSION
).zip
621 rpmbuild
-ba scm.spec
# --clean --target i386
622 rm $(rpm_prefix
)SOURCES
/scm-
$(VERSION
).zip
623 mv
$(rpm_prefix
)RPMS
/*/scm-
$(VERSION
)-$(RELEASE
).
*.rpm \
624 $(rpm_prefix
)SRPMS
/scm-
$(VERSION
)-$(RELEASE
).src.rpm \
629 $(MAKEDEV
) PROD
=scm
shar
633 $(MAKEDEV
) PROD
=scm com
636 $(MAKEDEV
) PROD
=scm zip
637 doszip
: $(windistdir
)scm-
$(VERSION
).zip
638 $(windistdir
)scm-
$(VERSION
).zip
: temp
/scm turtle turtlegr.c grtest.scm SCM.ico scm.html hobbit.html
639 cp
-f ..
/wb
/wbtab.scm ..
/wb
/rwb-isam.scm temp
/scm
/
640 $(MAKEDEV
) DEST
=$(windistdir
) PROD
=scm ver
=-$(VERSION
) zip
641 -cd ..
; zip
-9ur
$(windistdir
)scm-
$(VERSION
).zip \
642 scm
/turtle scm
/turtlegr.c scm
/grtest.scm \
644 scm
/scm.html scm
/hobbit.html
645 zip
-d
$(windistdir
)scm-
$(VERSION
).zip scm
/scm.
info scm
/Xlibscm.
info scm
/hobbit.
info
646 pubzip
: $(snapdir
)scm.zip
647 $(snapdir
)scm.zip
: temp
/scm
648 $(MAKEDEV
) DEST
=$(snapdir
) PROD
=scm zip
652 $(MAKEDEV
) DEST
=$(snapdir
) PROD
=scm pubdiffs
654 $(MAKEDEV
) DEST
=$(distdir
) PROD
=scm ver
=$(ver
) distdiffs
656 CITERS
= ANNOUNCE hobbit.texi hobbit.scm \
657 ..
/jacal
/ANNOUNCE ..
/jacal
/jacal.texi \
658 ..
/wb
/ANNOUNCE ..
/wb
/README ..
/wb
/wb.texi \
661 $(windistdir
)unzipall.bat
$(windistdir
)buildall \
662 $(htmldir
)JACAL.html
$(htmldir
)README.html \
663 $(htmldir
)SIMSYNCH.html
$(htmldir
)SLIB.html \
664 $(htmldir
)FreeSnell
/ANNOUNCE
$(htmldir
)FreeSnell
/index.html
665 CITES
= scm.spec scm.nsi ..
/wb
/wb.spec
$(htmldir
)SCM.html
667 updates
: Init
$(ver
).scm
668 $(CHPAT
) scm-
$(VERSION
) scm-
$(ver
) $(CITERS
)
669 $(CHPAT
) $(VERSION
) $(ver
) $(CITES
)
673 mv
-f Init
$(VERSION
).scm Init
$(ver
).scm
674 $(CHPAT
) $(VERSION
) $(ver
) patchlvl.h Init
$(ver
).scm
677 echo @set SCMVERSION
$(ver
) > version.txi
678 echo @set SCMDATE
`date +"%B %Y"` >> version.txi
679 echo
`date -I` \ Aubrey Jaffer \ \
<`whoami`@
`hostname`\
>> change
681 echo \ \
* patchlvl.h \
(SCMVERSION\
): Bumped from
$(VERSION
) to
$(ver
).
>>change
683 cat ChangeLog
>> change
684 mv
-f change ChangeLog
685 cvs remove Init
$(VERSION
).scm
686 cvs add Init
$(ver
).scm
687 cvs commit
-m
'Init$(VERSION).scm changed to Init$(ver).scm' \
688 Init
$(VERSION
).scm Init
$(ver
).scm
689 cvs commit
-m
'(SCMVERSION): Bumped from $(VERSION) to $(ver).'
690 cvs tag
-F scm-
$(ver
)
693 lints
: $(cfiles
) $(hfiles
)
694 lint
$(CPPFLAGS
) $(ALL_CFLAGS
) $(cfiles
) | tee lints
695 # lint $(CPPFLAGS) $(ALL_CFLAGS) $(cfiles) | tee lintes
697 #seds to help find names not unique in first 8 characters (name8s)
699 SED_TO_STRIP_NM
=sed
-e
'/.*\.o$$/d' -e
's/.* _//' -e
's/.* T //'
700 #old, bad for T [^_] on suns: SED_TO_STRIP_NM=sed -e '/.*\.o$$/d' -e 's/.* _//'
701 # For a System V nm where plain C identifiers have _ prepended:
702 #SED_TO_STRIP_NM=sed -e '/^_[A-Za-z][A-za-z0-9_]*[ |].*|extern|!d' -e 's/|/ /g' -e 's/^_//'
703 # For a System V nm where plain C identifiers have nothing prepended:
704 #SED_TO_STRIP_NM=sed -e '/^[A-Za-z][A-za-z0-9_]*[ |].*|extern|!d' -e 's/|/ /g'
709 $(SED_TO_STRIP_NM
) |\
711 awk
'{ if (substr(l,1,8)==substr($$1,1,8)) {\
713 print $$1;p=0;stat=1\
727 -rm -f core a.out ramap.o ramap.obj
$(ofiles
) scmmain.o lints
730 -rm -f
$(EXECFILES
) *.o
*.obj a.out TAGS implcat slibcat gdbscm
732 -rm -f scm.doc scm.html hobbit.html scm.exe scmlit.exe scm~ SCM-
*.exe
736 -rm -f
*~
*.bak
*.orig
*.rej tmp
* \
#* *\#