| 1 |
# "Makefile" for scm Scheme Interpreter |
| 2 |
# Copyright (C) 1990-2008, 2010 Free Software Foundation, Inc. |
| 3 |
# |
| 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. |
| 8 |
# |
| 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. |
| 13 |
# |
| 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/>. |
| 17 |
|
| 18 |
# Author: Aubrey Jaffer |
| 19 |
|
| 20 |
# These are normally set in "config.status"; defaults are here so that |
| 21 |
# "make" won't complain about target redefinitions. |
| 22 |
snapdir=$(HOME)/pub/ |
| 23 |
infodir=$(HOME)/info/ |
| 24 |
htmldir=$(HOME)/public_html/ |
| 25 |
|
| 26 |
SHELL = /bin/sh |
| 27 |
INSTALL = install |
| 28 |
INSTALL_PROGRAM = ${INSTALL} |
| 29 |
INSTALL_DATA = ${INSTALL} -m 644 |
| 30 |
INSTALL_INFO = ginstall-info |
| 31 |
|
| 32 |
# For Windows (or at least MSYS2), set EXE=".exe" and BAT=".bat" in the environment |
| 33 |
SCMLIT = ./scmlit$(EXE) |
| 34 |
SCMEXE = ./scm$(EXE) |
| 35 |
BUILD = ./build$(BAT) -hsystem |
| 36 |
|
| 37 |
TEXI2HTML = /usr/local/bin/texi2html -split -verbose |
| 38 |
TEXI2PDF = texi2pdf |
| 39 |
VIEWPDF = evince |
| 40 |
MAKEDEV = $(MAKE) -f $(HOME)/makefile.dev |
| 41 |
CHPAT = $(HOME)/bin/chpat |
| 42 |
RSYNC = rsync -av |
| 43 |
Uploadee = csail |
| 44 |
SCMOPTS = udscm[45].opt scm[45].opt |
| 45 |
|
| 46 |
# OS-X 10.6, but harmless for other OS. |
| 47 |
SETARCH = env DYLD_NO_PIE=1 |
| 48 |
# Fedora-Core-1 |
| 49 |
#SETARCH = setarch i386 |
| 50 |
|
| 51 |
#CC = gcc |
| 52 |
#CFLAGS = -g |
| 53 |
#LIBS = |
| 54 |
#LD = $(CC) -g |
| 55 |
LD = $(CC) |
| 56 |
|
| 57 |
# VERSION is defined in "patchlvl.h" |
| 58 |
# RELEASE is for RPMs |
| 59 |
RELEASE = 1 |
| 60 |
|
| 61 |
intro: config.status |
| 62 |
@echo |
| 63 |
@echo "This is the scm $(VERSION) distribution. Read \"scm.info\"" |
| 64 |
@echo "to learn how to build and install SCM. Or browse" |
| 65 |
@echo " http://people.csail.mit.edu/jaffer/SCM" |
| 66 |
@echo |
| 67 |
|
| 68 |
# ./configure --distdir=${HOME}/dist/ --snapdir=${HOME}/pub/ --htmldir=${HOME}/public_html/ --pdfdir=${HOME}/public_html/ |
| 69 |
|
| 70 |
config.status: |
| 71 |
./configure |
| 72 |
Makefile: config.status |
| 73 |
include config.status |
| 74 |
|
| 75 |
libscmdir = $(libdir)scm/ |
| 76 |
windistdir = /c/Voluntocracy/dist/ |
| 77 |
rpm_prefix = $(HOME)/rpmbuild/ |
| 78 |
|
| 79 |
# This should be moved to "config.status" |
| 80 |
x11incdir=/usr/include/ |
| 81 |
|
| 82 |
# directory where COPYING and InitXXX.scm reside. |
| 83 |
#IMPLPATH = `pwd`/ |
| 84 |
IMPLPATH=$(srcdir) |
| 85 |
include patchlvl.h |
| 86 |
IMPLINIT = $(IMPLPATH)Init$(VERSION).scm |
| 87 |
|
| 88 |
# If pathname where InitXXX.scm resides is not known in advance then |
| 89 |
# SCM_INIT_PATH is the environment variable whose value is the |
| 90 |
# pathname where InitXXX.scm resides. |
| 91 |
|
| 92 |
hfiles = scm.h scmfig.h setjump.h patchlvl.h continue.h |
| 93 |
cfiles = scmmain.c scm.c time.c repl.c ioext.c scl.c sys.c eval.c \ |
| 94 |
subr.c sc2.c unif.c rgx.c crs.c dynl.c record.c posix.c socket.c\ |
| 95 |
unix.c rope.c ramap.c gsubr.c edline.c continue.c \ |
| 96 |
findexec.c script.c debug.c byte.c bytenumb.c differ.c |
| 97 |
ufiles = pre-crt0.c ecrt0.c gmalloc.c unexec.c unexelf.c unexhp9k800.c \ |
| 98 |
unexsunos4.c unexalpha.c unexsgi.c unexmacosx.c \ |
| 99 |
macosx-config.h lastfile.c |
| 100 |
# cxux-crt0.s ecrt0.c gmalloc.c pre-crt0.c unexaix.c unexalpha.c \ |
| 101 |
# unexapollo.c unexconvex.c unexec.c unexelf.c unexelf1.c \ |
| 102 |
# unexencap.c unexenix.c unexfx2800.c unexhp9k800.c unexmips.c \ |
| 103 |
# unexnext.c unexnt.c unexsgi.c unexsni.c unexsunos4.c |
| 104 |
ofiles = scm.o time.o repl.o scl.o sys.o eval.o subr.o unif.o rope.o \ |
| 105 |
continue.o findexec.o script.o debug.o |
| 106 |
# continue-ia64.o |
| 107 |
ifiles = Init$(VERSION).scm Transcen.scm Link.scm Macro.scm Macexp.scm \ |
| 108 |
Tscript.scm compile.scm Iedline.scm Idiffer.scm |
| 109 |
hobfiles = hobbit.scm scmhob.scm scmhob.h |
| 110 |
turfiles = turtlegr.c turtle grtest.scm |
| 111 |
xafiles = xatoms.scm x11.scm xevent.scm keysymdef.scm |
| 112 |
xfiles = x.c x.h xgen.scm xevent.h inc2scm $(xafiles) |
| 113 |
|
| 114 |
tfiles = r4rstest.scm example.scm pi.scm pi.c split.scm bench.scm \ |
| 115 |
syntest2.scm syntest1.scm |
| 116 |
texifiles = scm.texi fdl.texi indexes.texi platform.txi features.txi |
| 117 |
dfiles = ANNOUNCE README COPYING COPYING.LESSER scm.1 scm.doc QUICKREF \ |
| 118 |
$(texifiles) scm.info Xlibscm.info Xlibscm.texi \ |
| 119 |
hobbit.info hobbit.texi |
| 120 |
mfiles = configure Makefile build.scm build build.bat requires.scm \ |
| 121 |
.gdbinit mkimpcat.scm disarm.scm scm.spec scm.nsi |
| 122 |
sfiles = setjump.mar setjump.s ugsetjump.s continue-ia64.S \ |
| 123 |
get-contoffset-ia64.c |
| 124 |
wbfiles = wbtab.scm rwb-isam.scm |
| 125 |
catfiles = implcat slibcat |
| 126 |
afiles = $(dfiles) ChangeLog $(cfiles) $(hfiles) $(ifiles) $(tfiles) \ |
| 127 |
$(mfiles) $(hobfiles) $(sfiles) $(ufiles) $(xfiles) \ |
| 128 |
version.txi # $(wbfiles) $(turfiles) |
| 129 |
|
| 130 |
lsdfiles = $(ifiles) $(hobfiles) COPYING COPYING.LESSER r4rstest.scm \ |
| 131 |
build.scm mkimpcat.scm patchlvl.h |
| 132 |
#*.sl |
| 133 |
|
| 134 |
ctagfiles = $(hfiles) $(cfiles) $(xfiles) |
| 135 |
tagfiles = $(ctagfiles) $(ifiles) $(sfiles) $(mfiles) \ |
| 136 |
Xlibscm.texi hobbit.texi build hobbit.scm |
| 137 |
# # $(ufiles) ChangeLog $(dfiles) |
| 138 |
|
| 139 |
installdirs: |
| 140 |
mkdir -p $(DESTDIR)$(includedir) |
| 141 |
mkdir -p $(DESTDIR)$(bindir) |
| 142 |
mkdir -p $(DESTDIR)$(libdir) |
| 143 |
mkdir -p $(DESTDIR)$(libscmdir) |
| 144 |
mkdir -p $(DESTDIR)$(mandir)man1/ |
| 145 |
mkdir -p $(DESTDIR)$(infodir) |
| 146 |
mkdir -p $(DESTDIR)$(pdfdir) |
| 147 |
mkdir -p $(DESTDIR)$(dvidir) |
| 148 |
|
| 149 |
platform.txi: build.scm |
| 150 |
$(MAKE) $(SCMLIT) |
| 151 |
$(SCMLIT) -r database-browse -l build.scm \ |
| 152 |
-e "(browse build 'platform)" > platform.txi |
| 153 |
features.txi: build build.scm |
| 154 |
$(MAKE) $(SCMLIT) |
| 155 |
$(SCMLIT) -l build -e"(make-features-txi)" |
| 156 |
|
| 157 |
scm.dvi: $(texifiles) Makefile |
| 158 |
$(TEXI2DVI) -b -c $< |
| 159 |
Xlibscm.dvi: Xlibscm.texi version.txi |
| 160 |
$(TEXI2DVI) -b -c $< |
| 161 |
hobbit.dvi: hobbit.texi version.txi |
| 162 |
$(TEXI2DVI) -b -c $< |
| 163 |
dvi: scm.dvi Xlibscm.dvi hobbit.dvi |
| 164 |
xdvi: scm.dvi |
| 165 |
xdvi $< |
| 166 |
Xdvi: Xlibscm.dvi |
| 167 |
xdvi $< |
| 168 |
hobdvi: hobbit.dvi |
| 169 |
xdvi $< |
| 170 |
install-dvi: scm.dvi Xlibscm.dvi hobbit.dvi |
| 171 |
$(INSTALL_DATA) $< Xlibscm.dvi hobbit.dvi $(DESTDIR)$(dvidir) |
| 172 |
|
| 173 |
scm.pdf: $(texifiles) |
| 174 |
$(TEXI2PDF) -b -c $< |
| 175 |
Xlibscm.pdf: Xlibscm.texi version.txi |
| 176 |
$(TEXI2PDF) -b -c $< |
| 177 |
hobbit.pdf: hobbit.texi version.txi |
| 178 |
$(TEXI2PDF) -b -c $< |
| 179 |
pdf: scm.pdf Xlibscm.pdf hobbit.pdf |
| 180 |
xpdf: scm.pdf |
| 181 |
$(VIEWPDF) $< |
| 182 |
Xpdf: Xlibscm.pdf |
| 183 |
$(VIEWPDF) $< |
| 184 |
hobpdf: hobbit.pdf |
| 185 |
$(VIEWPDF) $< |
| 186 |
install-pdf: scm.pdf Xlibscm.pdf hobbit.pdf |
| 187 |
$(INSTALL_DATA) $< Xlibscm.pdf hobbit.pdf $(DESTDIR)$(pdfdir) |
| 188 |
|
| 189 |
html/scm: $(texifiles) |
| 190 |
mkdir -p html |
| 191 |
rm -rf html/scm |
| 192 |
$(MAKEINFO) --html $< -o html/scm --split=section |
| 193 |
if type icoize>/dev/null; then icoize ../Logo/SCM.ico html/scm/*.html; fi |
| 194 |
$(DESTDIR)$(htmldir)scm: html/scm |
| 195 |
-rm -rf $(DESTDIR)$(htmldir)scm |
| 196 |
mkdir -p $(DESTDIR)$(htmldir)scm |
| 197 |
$(INSTALL_DATA) html/scm/*.html $(DESTDIR)$(htmldir)scm |
| 198 |
|
| 199 |
html/Xlibscm: Xlibscm.texi version.txi |
| 200 |
mkdir -p html |
| 201 |
rm -rf html/Xlibscm |
| 202 |
$(MAKEINFO) --html $< -o html/Xlibscm --split=section --no-node-files |
| 203 |
if type icoize>/dev/null; then icoize ../Logo/SCM.ico html/Xlibscm/*.html; fi |
| 204 |
$(DESTDIR)$(htmldir)Xlibscm: html/Xlibscm |
| 205 |
-rm -rf $(DESTDIR)$(htmldir)Xlibscm |
| 206 |
mkdir -p $(DESTDIR)$(htmldir)Xlibscm |
| 207 |
$(INSTALL_DATA) html/Xlibscm/*.html $(DESTDIR)$(htmldir)Xlibscm |
| 208 |
|
| 209 |
html/hobbit: hobbit.texi version.txi |
| 210 |
mkdir -p html |
| 211 |
rm -rf html/hobbit |
| 212 |
$(MAKEINFO) --html $< -o html/hobbit --split=section |
| 213 |
if type icoize>/dev/null; then icoize ../Logo/SCM.ico html/hobbit/*.html; fi |
| 214 |
$(DESTDIR)$(htmldir)hobbit: html/hobbit |
| 215 |
-rm -rf $(DESTDIR)$(htmldir)hobbit |
| 216 |
mkdir -p $(DESTDIR)$(htmldir)hobbit |
| 217 |
$(INSTALL_DATA) html/hobbit/*.html $(DESTDIR)$(htmldir)hobbit |
| 218 |
|
| 219 |
html: html/scm html/Xlibscm html/hobbit |
| 220 |
|
| 221 |
install-html: $(DESTDIR)$(htmldir)scm \ |
| 222 |
$(DESTDIR)$(htmldir)Xlibscm \ |
| 223 |
$(DESTDIR)$(htmldir)hobbit |
| 224 |
|
| 225 |
|
| 226 |
scm-$(VERSION).info: $(texifiles) |
| 227 |
$(MAKEINFO) $< --no-split -o $@ |
| 228 |
scm.info: scm-$(VERSION).info |
| 229 |
cp $< $@ |
| 230 |
$(DESTDIR)$(infodir)scm.info: scm.info installdirs |
| 231 |
$(INSTALL_DATA) -p $< $@ |
| 232 |
-rm -f $(DESTDIR)$(infodir)scm.info.gz |
| 233 |
$(POST_INSTALL) # Post-install commands follow. |
| 234 |
-$(INSTALL_INFO) $@ $(DESTDIR)$(infodir)dir |
| 235 |
|
| 236 |
Xlibscm.info: Xlibscm.texi version.txi |
| 237 |
$(MAKEINFO) $< --no-split -o $@ |
| 238 |
$(DESTDIR)$(infodir)Xlibscm.info: Xlibscm.info installdirs |
| 239 |
$(INSTALL_DATA) $< $@ |
| 240 |
-rm -f $(DESTDIR)$(infodir)Xlibscm.info*.gz |
| 241 |
$(POST_INSTALL) # Post-install commands follow. |
| 242 |
-$(INSTALL_INFO) $@ $(DESTDIR)$(infodir)dir |
| 243 |
|
| 244 |
hobbit.info: hobbit.texi version.txi |
| 245 |
$(MAKEINFO) $< --no-split -o hobbit.info |
| 246 |
$(DESTDIR)$(infodir)hobbit.info: hobbit.info installdirs |
| 247 |
$(INSTALL_DATA) $< $@ |
| 248 |
-rm -f $(DESTDIR)$(infodir)hobbit.info*.gz |
| 249 |
$(POST_INSTALL) # Post-install commands follow. |
| 250 |
-$(INSTALL_INFO) $@ $(DESTDIR)$(infodir)dir |
| 251 |
|
| 252 |
install-info: $(DESTDIR)$(infodir)scm.info \ |
| 253 |
$(DESTDIR)$(infodir)Xlibscm.info \ |
| 254 |
$(DESTDIR)$(infodir)hobbit.info |
| 255 |
info: install-info |
| 256 |
|
| 257 |
$(DESTDIR)$(infodir)scm.info.gz: $(DESTDIR)$(infodir)scm.info |
| 258 |
gzip -f $< |
| 259 |
$(DESTDIR)$(infodir)Xlibscm.info.gz: $(DESTDIR)$(infodir)Xlibscm.info |
| 260 |
gzip -f $< |
| 261 |
$(DESTDIR)$(infodir)hobbit.info.gz: $(DESTDIR)$(infodir)hobbit.info |
| 262 |
gzip -f $< |
| 263 |
install-infoz: $(DESTDIR)$(infodir)scm.info.gz \ |
| 264 |
$(DESTDIR)$(infodir)Xlibscm.info.gz \ |
| 265 |
$(DESTDIR)$(infodir)hobbit.info.gz |
| 266 |
infoz: install-infoz |
| 267 |
|
| 268 |
scm.doc: scm.1 |
| 269 |
nroff -man $< | ul -tunknown >$@ |
| 270 |
|
| 271 |
# configure.usage: configure |
| 272 |
# $(srcdir)configure --help >$@ 2>&1 |
| 273 |
|
| 274 |
README: build build.scm scm.info |
| 275 |
$(SCMEXE) -bl build -e"(make-readme)" |
| 276 |
|
| 277 |
docs: README scm.doc install-html install-pdf install-dvi install-infoz |
| 278 |
|
| 279 |
alld5: udscm5.opt $(SCMLIT) |
| 280 |
if grep -ie dynamic-linking udscm5.opt>/dev/null && ! $(MAKE) dlls; \ |
| 281 |
then \ |
| 282 |
if sed "s/dynamic-linking//g" < udscm5.opt > tmp.opt; then \ |
| 283 |
mv -f tmp.opt udscm5.opt; fi; \ |
| 284 |
if sed "s/dynamic-linking//g" < scm5.opt > tmp.opt; then \ |
| 285 |
mv -f tmp.opt scm5.opt; fi \ |
| 286 |
fi |
| 287 |
if ! $(MAKE) dscm5; then $(MAKE) scm5; fi |
| 288 |
|
| 289 |
all5: scm5.opt $(SCMLIT) |
| 290 |
if grep -ie dynamic-linking scm5.opt>/dev/null && ! $(MAKE) dlls; \ |
| 291 |
then \ |
| 292 |
if sed "s/dynamic-linking//g" < scm5.opt > tmp.opt; then \ |
| 293 |
mv -f tmp.opt scm5.opt; fi \ |
| 294 |
fi |
| 295 |
$(MAKE) scm5 |
| 296 |
|
| 297 |
all: |
| 298 |
if [ -f udscm5.opt -o ! -f scm5.opt ]; then $(MAKE) alld5; \ |
| 299 |
else $(MAKE) all5; fi |
| 300 |
|
| 301 |
# $(MAKE) wbscm.so |
| 302 |
|
| 303 |
require.scm: |
| 304 |
cp -p requires.scm require.scm |
| 305 |
|
| 306 |
# SCMLIT -- Make this first! |
| 307 |
$(SCMLIT): $(ofiles) scmmain.o require.scm Makefile |
| 308 |
$(LD) -o scmlit $(ofiles) scmmain.o $(LIBS) |
| 309 |
$(MAKE) checklit |
| 310 |
scmflags.h: scmflags |
| 311 |
scmflags: |
| 312 |
echo "#ifndef IMPLINIT" > newflags.h |
| 313 |
echo "#define IMPLINIT \"$(IMPLINIT)\"" >> newflags.h |
| 314 |
echo "#endif" >> newflags.h |
| 315 |
echo "#define CHEAP_CONTINUATIONS" >> newflags.h |
| 316 |
echo "#define CAUTIOUS" >> newflags.h |
| 317 |
-if (cmp -s newflags.h scmflags.h) then rm newflags.h; \ |
| 318 |
else mv newflags.h scmflags.h; fi |
| 319 |
.c.o: |
| 320 |
$(CC) -c $(CFLAGS) $< -o $@ |
| 321 |
scm.o: scm.c scm.h scmfig.h scmflags.h patchlvl.h |
| 322 |
scmmain.o: scmmain.c scm.h scmfig.h scmflags.h patchlvl.h |
| 323 |
scl.o: scl.c scm.h scmfig.h scmflags.h |
| 324 |
eval.o: eval.c scm.h scmfig.h scmflags.h setjump.h |
| 325 |
debug.o: debug.c scm.h scmfig.h scmflags.h setjump.h |
| 326 |
unif.o: unif.c scm.h scmfig.h scmflags.h |
| 327 |
#ramap.o: ramap.c scm.h scmfig.h scmflags.h |
| 328 |
repl.o: repl.c scm.h scmfig.h scmflags.h setjump.h |
| 329 |
sys.o: sys.c scm.h scmfig.h scmflags.h setjump.h |
| 330 |
time.o: time.c scm.h scmfig.h scmflags.h |
| 331 |
subr.o: subr.c scm.h scmfig.h scmflags.h |
| 332 |
rope.o: rope.c scm.h scmfig.h scmflags.h |
| 333 |
continue.o: continue.c continue.h setjump.h scm.h scmfig.h scmflags.h |
| 334 |
continue-ia64.o: continue-ia64.S get-contoffset-ia64.c |
| 335 |
gcc -o get-contoffset-ia64 get-contoffset-ia64.c |
| 336 |
./get-contoffset-ia64 contoffset-ia64.S |
| 337 |
gcc -c -o continue-ia64.o continue-ia64.S |
| 338 |
|
| 339 |
# Simple build with bignums for running JACAL |
| 340 |
scm: $(SCMLIT) |
| 341 |
$(BUILD) -s $(IMPLPATH) -F cautious bignums arrays # i/o-extensions |
| 342 |
$(MAKE) check |
| 343 |
|
| 344 |
# R4RS interpreter (not dumpable) |
| 345 |
scm4.opt: |
| 346 |
echo "-F cautious bignums arrays inexact" > scm4.opt |
| 347 |
echo "-F engineering-notation dynamic-linking" >> scm4.opt |
| 348 |
# if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> scm4.opt; fi |
| 349 |
scm4: $(cfiles) $(hfiles) build.scm build scm4.opt |
| 350 |
$(BUILD) -f scm4.opt -o scm -s $(IMPLPATH) |
| 351 |
-rm $(ofiles) scmmain.o |
| 352 |
$(MAKE) check |
| 353 |
|
| 354 |
# R5RS interpreter (not dumpable) |
| 355 |
scm5.opt: |
| 356 |
echo "-F cautious bignums arrays inexact" > scm5.opt |
| 357 |
echo "-F engineering-notation dynamic-linking" >> scm5.opt |
| 358 |
echo "-F macro" >> scm5.opt |
| 359 |
echo "--compiler-options=\"-O1\"" >> scm5.opt |
| 360 |
# if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> scm5.opt; fi |
| 361 |
scm5: $(cfiles) $(hfiles) build.scm build scm5.opt |
| 362 |
$(BUILD) -f scm5.opt -o scm -s $(IMPLPATH) |
| 363 |
-rm $(ofiles) scmmain.o |
| 364 |
$(MAKE) checkmacro |
| 365 |
|
| 366 |
# http://www.opensubscriber.com/message/[email protected]/1007118.html |
| 367 |
# Kernels later than 2.6.11 must do (as root) before dumping: |
| 368 |
#echo 0 > /proc/sys/kernel/randomize_va_space |
| 369 |
|
| 370 |
# dumpable R4RS interpreter |
| 371 |
udscm4.opt: |
| 372 |
$(MAKE) scm4.opt |
| 373 |
cat scm4.opt > udscm4.opt |
| 374 |
echo "-F dump" >> udscm4.opt |
| 375 |
# if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> udscm4.opt; fi |
| 376 |
udscm4: $(cfiles) $(hfiles) build.scm build udscm4.opt |
| 377 |
$(BUILD) -f udscm4.opt -o udscm4 -s $(IMPLPATH) |
| 378 |
-rm $(ofiles) scmmain.o |
| 379 |
strip udscm4 |
| 380 |
dscm4: udscm4 $(ifiles) require.scm |
| 381 |
if [ -f /proc/sys/kernel/randomize_va_space -a\ |
| 382 |
"`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\ |
| 383 |
cat /proc/sys/kernel/randomize_va_space > randomize_va_space.tmp;\ |
| 384 |
echo 0 > /proc/sys/kernel/randomize_va_space;\ |
| 385 |
} fi |
| 386 |
-rm -f slibcat implcat scm~ |
| 387 |
-mv scm scm~ |
| 388 |
echo "(quit)" | $(SETARCH) ./udscm4 -no-init-file -o scm |
| 389 |
if [ -f randomize_va_space.tmp ]; then {\ |
| 390 |
cat randomize_va_space.tmp > /proc/sys/kernel/randomize_va_space;\ |
| 391 |
rm randomize_va_space.tmp;\ |
| 392 |
} fi |
| 393 |
|
| 394 |
# dumpable R5RS interpreter |
| 395 |
udscm5.opt: |
| 396 |
$(MAKE) scm5.opt |
| 397 |
cat scm5.opt > udscm5.opt |
| 398 |
echo "-F dump" >> udscm5.opt |
| 399 |
udscm5: $(cfiles) $(ufiles) $(hfiles) build.scm build udscm5.opt |
| 400 |
$(BUILD) -f udscm5.opt -o udscm5 -s $(IMPLPATH) |
| 401 |
-rm $(ofiles) scmmain.o |
| 402 |
strip udscm5 |
| 403 |
dscm5: udscm5 $(ifiles) require.scm |
| 404 |
if [ -f /proc/sys/kernel/randomize_va_space -a\ |
| 405 |
"`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\ |
| 406 |
cat /proc/sys/kernel/randomize_va_space > randomize_va_space.tmp;\ |
| 407 |
echo 0 > /proc/sys/kernel/randomize_va_space;\ |
| 408 |
} fi |
| 409 |
-rm -f slibcat implcat scm~ |
| 410 |
-mv scm scm~ |
| 411 |
echo "(quit)" | $(SETARCH) ./udscm5 -no-init-file -r5 -o scm |
| 412 |
if [ -f randomize_va_space.tmp ]; then {\ |
| 413 |
cat randomize_va_space.tmp > /proc/sys/kernel/randomize_va_space;\ |
| 414 |
rm randomize_va_space.tmp;\ |
| 415 |
} fi |
| 416 |
$(MAKE) checkmacro |
| 417 |
|
| 418 |
# R5RS interpreter for debugging with GDB. |
| 419 |
gdb.opt: udscm5.opt |
| 420 |
cat udscm5.opt > gdb.opt |
| 421 |
echo "-F debug" >> gdb.opt |
| 422 |
echo "--compiler-options=-Wall" >> gdb.opt |
| 423 |
echo "--linker-options=-Wall" >> gdb.opt |
| 424 |
echo "-D NO_ENV_CACHE" >> gdb.opt |
| 425 |
# echo "-DTEST_FARLOC -DTEST_SCM2PTR" >> gdb.opt |
| 426 |
udgdbscm: gdb.opt $(cfiles) $(ufiles) $(hfiles) build.scm build |
| 427 |
$(BUILD) -f gdb.opt -o udgdbscm -s $(IMPLPATH) |
| 428 |
gdbscm: udgdbscm $(ifiles) require.scm |
| 429 |
echo "(quit)" | $(SETARCH) ./udgdbscm -no-init-file -r5 -o gdbscm |
| 430 |
|
| 431 |
# R4RS interpreter for profiling |
| 432 |
pg.opt: udscm4.opt |
| 433 |
cat udscm4.opt > pg.opt |
| 434 |
echo "--compiler-options=-pg" >> pg.opt |
| 435 |
echo "--linker-options=-pg" >> pg.opt |
| 436 |
echo "-DLACK_SETITIMER" >> pg.opt |
| 437 |
udpgscm: pg.opt |
| 438 |
$(BUILD) -f pg.opt -o udpgscm -s $(IMPLPATH) |
| 439 |
pgscm: udpgscm |
| 440 |
echo "(quit)" | $(SETARCH) ./udpgscm -no-init-file -o pgscm |
| 441 |
|
| 442 |
# R4RS SCM library |
| 443 |
libscm.opt: |
| 444 |
echo "-F cautious bignums arrays inexact" > libscm.opt |
| 445 |
echo "-F engineering-notation" >> libscm.opt |
| 446 |
echo "-F dynamic-linking" >> libscm.opt |
| 447 |
libscm.a: libscm.opt scm.h scmfig.h |
| 448 |
$(BUILD) -t lib -f libscm.opt |
| 449 |
libtest: libscm.a libtest.c |
| 450 |
$(LD) -o libtest libtest.c libscm.a -ldl -lm -lc |
| 451 |
./libtest |
| 452 |
|
| 453 |
# DLLs for dynamic linking |
| 454 |
dlls.opt: |
| 455 |
echo "--compiler-options=-Wall" > dlls.opt |
| 456 |
echo "--linker-options=-Wall" >> dlls.opt |
| 457 |
dlls: dlls.opt |
| 458 |
$(BUILD) -t dll -f dlls.opt -F rev2-procedures #-c sc2.c |
| 459 |
$(BUILD) -t dll -f dlls.opt -F byte #-c byte.c |
| 460 |
$(BUILD) -t dll -f dlls.opt -F array-for-each #-c ramap.c |
| 461 |
$(BUILD) -t dll -f dlls.opt -F differ #-c differ.c |
| 462 |
$(BUILD) -t dll -f dlls.opt -F generalized-c-arguments #-c gsubr.c |
| 463 |
$(BUILD) -t dll -f dlls.opt -F record #-c record.c |
| 464 |
-$(BUILD) -t dll -f dlls.opt -F byte-number inexact bignums |
| 465 |
-$(BUILD) -t dll -f dlls.opt -F i/o-extensions #-c ioext.c |
| 466 |
-$(BUILD) -t dll -f dlls.opt -F posix #-c posix.c |
| 467 |
-$(BUILD) -t dll -f dlls.opt -F socket #-c socket.c |
| 468 |
-$(BUILD) -t dll -f dlls.opt -F unix #-c unix.c |
| 469 |
-$(BUILD) -t dll -f dlls.opt -F regex #-c rgx.c |
| 470 |
-$(BUILD) -t dll -f dlls.opt -F edit-line |
| 471 |
-$(MAKE) x.so |
| 472 |
|
| 473 |
# -$(MAKE) turtlegr.so |
| 474 |
# -$(BUILD) -t dll -f dlls.opt -F curses #-c crs.c |
| 475 |
mydlls: dlls # legacy |
| 476 |
|
| 477 |
rwb-isam.scm wbtab.scm: ../wb/rwb-isam.scm ../wb/wbtab.scm |
| 478 |
-cp -f ../wb/rwb-isam.scm ../wb/wbtab.scm ./ |
| 479 |
wbscm.so: dlls.opt build.scm scm.h scmfig.h ../wb/c/*.c $(wbfiles) |
| 480 |
$(MAKE) $(SCMLIT) |
| 481 |
$(BUILD) -t dll -f dlls.opt -F wb |
| 482 |
$(SCMLIT) -lmkimpcat.scm |
| 483 |
|
| 484 |
turtlegr.so: dlls.opt scm.h scmfig.h |
| 485 |
$(BUILD) -t dll -f dlls.opt -F turtlegr |
| 486 |
|
| 487 |
x.so: x.c x.h xevent.h dlls.opt scm.h scmfig.h |
| 488 |
$(BUILD) -t dll -f dlls.opt -F x |
| 489 |
# Generate x11 include and Scheme files |
| 490 |
x11.scm: inc2scm Makefile |
| 491 |
rm -f x11.scm |
| 492 |
$(SCMLIT) -l inc2scm x11.scm x: $(x11incdir) \ |
| 493 |
X11/X.h X11/cursorfont.h X11/Xlib.h X11/Xutil.h |
| 494 |
keysymdef.scm: inc2scm Makefile |
| 495 |
rm -f keysymdef.scm |
| 496 |
$(SCMLIT) -l inc2scm keysymdef.scm x: $(x11incdir) \ |
| 497 |
X11/keysym.h X11/keysymdef.h |
| 498 |
xevent.h xevent.scm xatoms.scm: xgen.scm Makefile |
| 499 |
$(SCMLIT) -l xgen.scm $(x11incdir)X11/Xlib.h |
| 500 |
# x.h: x.c xevent.h |
| 501 |
# if [ -x "$(CPROTO)" ]; then $(CPROTO) x.c > x.h; fi |
| 502 |
|
| 503 |
# **************** Tests and Performance **************** |
| 504 |
# Check SCMLIT; SCM |
| 505 |
Checklit: require.scm |
| 506 |
$(SCMLIT) --no-symbol-case-fold -fr4rstest.scm -e'(test-sc4)(test-delay)(gc)' \ |
| 507 |
-e '(or (null? errs) (quit 1))' < /dev/null |
| 508 |
checklit: require.scm |
| 509 |
$(SCMLIT) -fr4rstest.scm -e'(test-sc4)(test-delay)(gc)' \ |
| 510 |
-e '(or (null? errs) (quit 1))' < /dev/null |
| 511 |
Check: r4rstest.scm require.scm |
| 512 |
$(SCMEXE) --no-symbol-case-fold -fr4rstest.scm -e'(test-sc4)(test-cont)(test-delay)(gc)' \ |
| 513 |
-e '(or (null? errs) (quit 1))' < /dev/null |
| 514 |
check: r4rstest.scm require.scm |
| 515 |
$(SCMEXE) -fr4rstest.scm -e'(test-sc4)(test-cont)(test-delay)(gc)' \ |
| 516 |
-e '(or (null? errs) (quit 1))' < /dev/null |
| 517 |
checkmacro: syntest1.scm syntest2.scm r4rstest.scm |
| 518 |
$(SCMEXE) -rmacro -fsyntest1.scm -fsyntest2.scm \ |
| 519 |
-fr4rstest.scm -e'(test-sc4)(test-cont)(test-delay)' -fsyntest1 \ |
| 520 |
-e '(or (null? synerrs) (quit 1))' < /dev/null |
| 521 |
|
| 522 |
# Measure running speed of SCM; SCMLIT. Results are appended to file |
| 523 |
# "BenchLog" |
| 524 |
bench: |
| 525 |
echo `whoami`@`hostname` testing scm \ |
| 526 |
`$(SCMEXE) -e'(display *scm-version*)'` >> BenchLog |
| 527 |
echo on `date` >> BenchLog |
| 528 |
ls -l scm >> BenchLog |
| 529 |
size scm >> BenchLog |
| 530 |
uname -a >> BenchLog |
| 531 |
$(SCMEXE) -lbench.scm |
| 532 |
-cat prng.log >> BenchLog |
| 533 |
echo >> BenchLog |
| 534 |
-cat pi.log >> BenchLog |
| 535 |
echo >> BenchLog |
| 536 |
echo |
| 537 |
tail -20 BenchLog |
| 538 |
-rm -f pi.log prng.log |
| 539 |
benchlit: |
| 540 |
echo `whoami`@`hostname` testing scmlit \ |
| 541 |
`$(SCMLIT) -e'(display *scm-version*)'` >> BenchLog |
| 542 |
echo on `date` >> BenchLog |
| 543 |
ls -l scmlit >> BenchLog |
| 544 |
size scmlit >> BenchLog |
| 545 |
uname -a >> BenchLog |
| 546 |
$(SCMLIT) -lbench.scm |
| 547 |
-cat prng.log >> BenchLog |
| 548 |
echo >> BenchLog |
| 549 |
-cat pi.log >> BenchLog |
| 550 |
echo >> BenchLog |
| 551 |
echo |
| 552 |
tail -20 BenchLog |
| 553 |
-rm -f pi.log prng.log |
| 554 |
report: |
| 555 |
$(SCMLIT) -e"(slib:report #t)" |
| 556 |
$(SCMEXE) -e"(slib:report #t)" |
| 557 |
|
| 558 |
################ INSTALL DEFINITIONS ################ |
| 559 |
|
| 560 |
install-man: scm.1 installdirs |
| 561 |
-$(INSTALL_DATA) $< $(DESTDIR)$(mandir)man1/ |
| 562 |
|
| 563 |
install-lib: $(lsdfiles) installdirs |
| 564 |
$(INSTALL_DATA) $(lsdfiles) $(DESTDIR)$(libscmdir) |
| 565 |
$(INSTALL_PROGRAM) build $(DESTDIR)$(libscmdir) |
| 566 |
if [ -f x.so ]; \ |
| 567 |
then $(INSTALL_DATA) $(xafiles) $(DESTDIR)$(libscmdir); fi |
| 568 |
if [ -f byte.so ]; \ |
| 569 |
then $(INSTALL_DATA) *.so $(DESTDIR)$(libscmdir); fi |
| 570 |
if [ -f wbscm.so ]; \ |
| 571 |
then $(INSTALL_DATA) $(wbfiles) $(DESTDIR)$(libscmdir); fi |
| 572 |
# test -f $(DESTDIR)$(libscmdir)require.scm || \ what was this doing? |
| 573 |
$(INSTALL_DATA) requires.scm $(DESTDIR)$(libscmdir)require.scm |
| 574 |
if [ -f libscm.a ]; \ |
| 575 |
then $(INSTALL_DATA) libscm.a $(DESTDIR)$(libdir)libscm.a; fi |
| 576 |
|
| 577 |
install-for-rpm: install-man install-lib install-infoz installdirs |
| 578 |
$(INSTALL_PROGRAM) scm scmlit $(DESTDIR)$(bindir) |
| 579 |
-strip $(DESTDIR)$(bindir)scmlit |
| 580 |
$(INSTALL_DATA) scm.h scmfig.h scmflags.h $(DESTDIR)$(includedir) |
| 581 |
|
| 582 |
install: install-man install-lib install-infoz installdirs |
| 583 |
$(INSTALL_PROGRAM) scm scmlit $(DESTDIR)$(bindir) |
| 584 |
-strip $(DESTDIR)$(bindir)scmlit |
| 585 |
$(INSTALL_DATA) scm.h scmfig.h scmflags.h $(DESTDIR)$(includedir) |
| 586 |
$(DESTDIR)$(bindir)scm -br new-catalog |
| 587 |
|
| 588 |
uninstall: |
| 589 |
$(PRE_UNINSTALL) # Pre-uninstall commands follow. |
| 590 |
-$(INSTALL_INFO) --delete $(DESTDIR)$(infodir)scm.info $(DESTDIR)$(infodir)dir |
| 591 |
-$(INSTALL_INFO) --delete $(DESTDIR)$(infodir)Xlibscm.info $(DESTDIR)$(infodir)dir |
| 592 |
-$(INSTALL_INFO) --delete $(DESTDIR)$(infodir)hobbit.info $(DESTDIR)$(infodir)dir |
| 593 |
$(NORMAL_UNINSTALL) # Normal commands follow. |
| 594 |
-rm $(DESTDIR)$(bindir)scm $(DESTDIR)$(bindir)scmlit |
| 595 |
-rm $(DESTDIR)$(mandir)man1/scm.1 |
| 596 |
-rm $(DESTDIR)$(includedir)scm.h \ |
| 597 |
$(DESTDIR)$(includedir)scmfig.h \ |
| 598 |
$(DESTDIR)$(includedir)scmflags.h |
| 599 |
-rm $(DESTDIR)$(libdir)libscm.a |
| 600 |
-(cd $(DESTDIR)$(libscmdir); \ |
| 601 |
rm $(lsdfiles) build $(xafiles) *.so require.scm \ |
| 602 |
$(wbfiles) $(catfiles)) |
| 603 |
-rm $(DESTDIR)$(infodir)scm.info.gz \ |
| 604 |
$(DESTDIR)$(infodir)Xlibscm.info.gz \ |
| 605 |
$(DESTDIR)$(infodir)hobbit.info.gz |
| 606 |
$(POST_UNINSTALL) # Post-uninstall commands follow. |
| 607 |
-rmdir $(DESTDIR)$(libscmdir) |
| 608 |
|
| 609 |
################ WINDOWS INSTALLER DEFINITIONS ################ |
| 610 |
|
| 611 |
winscm5.opt: |
| 612 |
echo "-p gnu-win32" > winscm5.opt |
| 613 |
echo "-F arrays array-for-each byte i/o-extensions" >> winscm5.opt |
| 614 |
echo "-F bignums inexact engineering-notation" >> winscm5.opt |
| 615 |
echo "-F cautious rev2-procedures macro" >> winscm5.opt |
| 616 |
echo "-F wb-no-threads" >> winscm5.opt |
| 617 |
gw32scmwb.sh: $(SCMLIT) winscm5.opt build.scm Makefile version.txi |
| 618 |
$(BUILD) -p gnu-win32 -f winscm5.opt -w gw32scmwb.sh |
| 619 |
scm.exe: gw32scmwb.sh |
| 620 |
./gw32scmwb.sh |
| 621 |
|
| 622 |
hobbit.html: hobbit.texi |
| 623 |
$(MAKEINFO) --html --no-split hobbit.texi |
| 624 |
scm.html: $(texifiles) |
| 625 |
$(MAKEINFO) --html --no-split scm.texi |
| 626 |
|
| 627 |
## to build a windows installer |
| 628 |
## make sure makeinfo and NSIS are available on the commandline |
| 629 |
w32install: $(distdir)scm-$(VERSION)-$(RELEASE).exe |
| 630 |
$(distdir)scm-$(VERSION)-$(RELEASE).exe: scm.nsi hobbit.html scm.html # scm.exe |
| 631 |
makensis $< "-XOutFile $@" |
| 632 |
|
| 633 |
#### Stuff for maintaining SCM below #### |
| 634 |
|
| 635 |
ver = $(VERSION) |
| 636 |
|
| 637 |
temp/scm: $(afiles) |
| 638 |
-rm -rf temp |
| 639 |
mkdir -p temp/scm |
| 640 |
ln $(afiles) temp/scm |
| 641 |
|
| 642 |
release: dist pdf # rpm |
| 643 |
cvs tag -F scm-$(VERSION) |
| 644 |
$(INSTALL_DATA) ANNOUNCE $(htmldir)SCM_ANNOUNCE.txt |
| 645 |
$(RSYNC) $(htmldir)SCM.html $(htmldir)SCM_ANNOUNCE.txt \ |
| 646 |
$(htmldir)hobbit.pdf $(htmldir)Xlibscm.pdf \ |
| 647 |
$(Uploadee):public_html/ |
| 648 |
$(RSYNC) $(distdir)README $(distdir)scm-$(VERSION).zip \ |
| 649 |
$(distdir)scm-$(VERSION)-$(RELEASE).*.rpm $(Uploadee):dist/ |
| 650 |
# upload $(distdir)README $(distdir)scm-$(VERSION).zip ftp.gnu.org:gnu/jacal/ |
| 651 |
# $(distdir)scm-$(VERSION)-$(RELEASE).x86_64.rpm |
| 652 |
|
| 653 |
upzip: $(snapdir)scm.zip |
| 654 |
$(RSYNC) $(snapdir)scm.zip $(Uploadee):pub/ |
| 655 |
$(RSYNC) r4rstest.scm $(HOME)/dist/ |
| 656 |
$(RSYNC) r4rstest.scm $(Uploadee):dist/ |
| 657 |
|
| 658 |
dist: $(distdir)scm-$(VERSION).zip |
| 659 |
$(distdir)scm-$(VERSION).zip: temp/scm |
| 660 |
$(MAKEDEV) DEST=$(distdir) PROD=scm ver=-$(VERSION) zip |
| 661 |
|
| 662 |
upgnu: $(distdir)scm-$(VERSION).tar.gz |
| 663 |
cd $(distdir); gnupload --replace --to ftp.gnu.org:scm scm-$(VERSION).tar.gz |
| 664 |
tar.gz: $(distdir)scm-$(VERSION).tar.gz |
| 665 |
$(distdir)scm-$(VERSION).tar.gz: temp/scm/ |
| 666 |
$(MAKEDEV) DEST=$(distdir) PROD=scm ver=-$(VERSION) tar.gz |
| 667 |
|
| 668 |
rpm: pubzip |
| 669 |
cp -f $(snapdir)scm.zip $(rpm_prefix)SOURCES/scm-$(VERSION).zip |
| 670 |
rpmbuild -ba scm.spec # --clean --target i386 |
| 671 |
rm $(rpm_prefix)SOURCES/scm-$(VERSION).zip |
| 672 |
mv $(rpm_prefix)RPMS/*/scm-$(VERSION)-$(RELEASE).*.rpm \ |
| 673 |
$(rpm_prefix)SRPMS/scm-$(VERSION)-$(RELEASE).src.rpm \ |
| 674 |
$(distdir) |
| 675 |
|
| 676 |
shar: scm.shar |
| 677 |
scm.shar: temp/scm |
| 678 |
$(MAKEDEV) PROD=scm shar |
| 679 |
dclshar: scm.com |
| 680 |
com: scm.com |
| 681 |
scm.com: temp/scm |
| 682 |
$(MAKEDEV) PROD=scm com |
| 683 |
zip: scm.zip |
| 684 |
scm.zip: temp/scm |
| 685 |
$(MAKEDEV) PROD=scm zip |
| 686 |
doszip: $(windistdir)scm-$(VERSION).zip |
| 687 |
$(windistdir)scm-$(VERSION).zip: temp/scm $(turfiles) SCM.ico scm.html hobbit.html |
| 688 |
cp -f ../wb/wbtab.scm ../wb/rwb-isam.scm temp/scm/ |
| 689 |
$(MAKEDEV) DEST=$(windistdir) PROD=scm ver=-$(VERSION) zip |
| 690 |
-cd ..; zip -9ur $(windistdir)scm-$(VERSION).zip \ |
| 691 |
scm/turtle scm/turtlegr.c scm/grtest.scm \ |
| 692 |
scm/SCM.ico \ |
| 693 |
scm/scm.html scm/hobbit.html |
| 694 |
zip -d $(windistdir)scm-$(VERSION).zip scm/scm.info scm/Xlibscm.info scm/hobbit.info |
| 695 |
pubzip: $(snapdir)scm.zip |
| 696 |
$(snapdir)scm.zip: temp/scm |
| 697 |
$(MAKEDEV) DEST=$(snapdir) PROD=scm zip |
| 698 |
|
| 699 |
diffs: pubdiffs |
| 700 |
pubdiffs: temp/scm |
| 701 |
$(MAKEDEV) DEST=$(snapdir) PROD=scm pubdiffs |
| 702 |
distdiffs: temp/scm |
| 703 |
$(MAKEDEV) DEST=$(distdir) PROD=scm ver=$(ver) distdiffs |
| 704 |
|
| 705 |
CITERS = ANNOUNCE hobbit.texi hobbit.scm \ |
| 706 |
../jacal/ANNOUNCE ../jacal/jacal.texi \ |
| 707 |
../wb/ANNOUNCE ../wb/README ../wb/wb.texi \ |
| 708 |
../synch/ANNOUNCE \ |
| 709 |
$(distdir)README \ |
| 710 |
$(windistdir)unzipall.bat $(windistdir)buildall \ |
| 711 |
$(htmldir)JACAL.html $(htmldir)README.html \ |
| 712 |
$(htmldir)SIMSYNCH.html $(htmldir)SLIB.html \ |
| 713 |
$(htmldir)FreeSnell/ANNOUNCE \ |
| 714 |
$(htmldir)FreeSnell/FreeSnell.texi \ |
| 715 |
$(htmldir)FreeSnell/index.html |
| 716 |
CITES = scm.spec scm.nsi ../wb/wb.spec $(htmldir)SCM.html |
| 717 |
|
| 718 |
updates: Init$(ver).scm |
| 719 |
$(CHPAT) scm-$(VERSION) scm-$(ver) $(CITERS) |
| 720 |
$(CHPAT) $(VERSION) $(ver) $(CITES) |
| 721 |
$(MAKE) README |
| 722 |
|
| 723 |
Init$(ver).scm: |
| 724 |
mv -f Init$(VERSION).scm Init$(ver).scm |
| 725 |
$(CHPAT) $(VERSION) $(ver) patchlvl.h Init$(ver).scm |
| 726 |
|
| 727 |
new: updates |
| 728 |
echo @set SCMVERSION $(ver) > version.txi |
| 729 |
echo @set SCMDATE `date +"%B %Y"` >> version.txi |
| 730 |
echo `date -I` \ Aubrey Jaffer \ \<`whoami`@`hostname`\>> change |
| 731 |
echo>> change |
| 732 |
echo \ \* patchlvl.h \(SCMVERSION\): Bumped from $(VERSION) to $(ver).>>change |
| 733 |
echo>> change |
| 734 |
cat ChangeLog >> change |
| 735 |
mv -f change ChangeLog |
| 736 |
cvs remove Init$(VERSION).scm |
| 737 |
cvs add Init$(ver).scm |
| 738 |
cvs commit -m 'Init$(VERSION).scm changed to Init$(ver).scm' \ |
| 739 |
Init$(VERSION).scm Init$(ver).scm |
| 740 |
cvs commit -m '(SCMVERSION): Bumped from $(VERSION) to $(ver).' |
| 741 |
cvs tag -F scm-$(ver) |
| 742 |
|
| 743 |
lint: lints |
| 744 |
lints: $(cfiles) $(hfiles) |
| 745 |
lint $(CPPFLAGS) $(ALL_CFLAGS) $(cfiles) | tee lints |
| 746 |
# lint $(CPPFLAGS) $(ALL_CFLAGS) $(cfiles) | tee lintes |
| 747 |
|
| 748 |
#seds to help find names not unique in first 8 characters (name8s) |
| 749 |
# for BSD nm format |
| 750 |
SED_TO_STRIP_NM=sed -e '/.*\.o$$/d' -e 's/.* _//' -e 's/.* T //' |
| 751 |
#old, bad for T [^_] on suns: SED_TO_STRIP_NM=sed -e '/.*\.o$$/d' -e 's/.* _//' |
| 752 |
# For a System V nm where plain C identifiers have _ prepended: |
| 753 |
#SED_TO_STRIP_NM=sed -e '/^_[A-Za-z][A-za-z0-9_]*[ |].*|extern|!d' -e 's/|/ /g' -e 's/^_//' |
| 754 |
# For a System V nm where plain C identifiers have nothing prepended: |
| 755 |
#SED_TO_STRIP_NM=sed -e '/^[A-Za-z][A-za-z0-9_]*[ |].*|extern|!d' -e 's/|/ /g' |
| 756 |
|
| 757 |
name8: name8s |
| 758 |
name8s: scmlit |
| 759 |
nm scmlit |\ |
| 760 |
$(SED_TO_STRIP_NM) |\ |
| 761 |
sort -u|\ |
| 762 |
awk '{ if (substr(l,1,8)==substr($$1,1,8)) {\ |
| 763 |
if (p) print l;\ |
| 764 |
print $$1;p=0;stat=1\ |
| 765 |
}else p=1;\ |
| 766 |
l=$$1\ |
| 767 |
}END{exit stat}' - |
| 768 |
|
| 769 |
ctags: $(ctagfiles) |
| 770 |
etags $(ctagfiles) |
| 771 |
|
| 772 |
TAGS: $(tagfiles) |
| 773 |
etags $(tagfiles) |
| 774 |
tags: TAGS |
| 775 |
|
| 776 |
mostlyclean: |
| 777 |
clean: |
| 778 |
-rm -f core a.out ramap.o ramap.obj $(ofiles) scmmain.o lints |
| 779 |
-rm -rf *temp |
| 780 |
distclean: clean |
| 781 |
-rm -f $(EXECFILES) *.o *.obj a.out TAGS implcat slibcat gdbscm |
| 782 |
realclean: distclean |
| 783 |
-rm -f scm.doc scm.html hobbit.html scm.exe scmlit.exe scm~ SCM-*.exe |
| 784 |
realempty: temp/scm |
| 785 |
-rm -f $(afiles) |
| 786 |
myclean: clean |
| 787 |
-rm -f *~ *.bak *.orig *.rej tmp* \#* *\# |