diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
commit | 302e3218b7d487539ec305bf23881a6ee7d5be99 (patch) | |
tree | bf1adafe552a17b3b78522048bb7c24787696dd3 /Makefile | |
parent | c7d035ae1a729232579a0fe41ed5affa131d3623 (diff) | |
download | scm-upstream/5e1.tar.gz scm-upstream/5e1.zip |
Import Upstream version 5e1upstream/5e1
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 152 |
1 files changed, 91 insertions, 61 deletions
@@ -49,10 +49,15 @@ SHELL = /bin/sh LD = $(CC) SCMLIT = ./scmlit SCMEXE = ./scm +#SHOBJS = *.sl +SHOBJS = *.so #BUILD = ./build -hsystem -p svr4-gcc-sun-ld BUILD = ./build -hsystem +# Workaround for unexec on Fedora Linux i386 +#SETARCH = setarch i386 + #for RPMs RELEASE = 1 @@ -60,16 +65,16 @@ intro: @echo @echo "This is the scm$(VERSION) distribution. Read \"scm.info\"" @echo "to learn how to build and install SCM. Or browse" - @echo " http://swissnet.ai.mit.edu/~jaffer/SCM" + @echo " http://swiss.csail.mit.edu/~jaffer/SCM" @echo $(MAKE) scm -#srcdir=$(HOME)/scm/ -#srcdir=/usr/local/src/scm/ -include srcdir.mk srcdir.mk: Makefile echo "CPROTO=`type cproto | sed 's%.* %%'`" > srcdir.mk echo "srcdir=`pwd`/" >> srcdir.mk +#srcdir=$(HOME)/scm/ +#srcdir=/usr/local/src/scm/ +include srcdir.mk # directory where COPYING and InitXXX.scm reside. #IMPLPATH = /usr/local/src/scm/ @@ -85,21 +90,22 @@ IMPLINIT = $(IMPLPATH)Init$(VERSION).scm cfiles = scmmain.c scm.c time.c repl.c ioext.c scl.c sys.c eval.c \ subr.c sc2.c unif.c rgx.c crs.c dynl.c record.c posix.c socket.c\ - unix.c rope.c ramap.c gsubr.c edline.c Iedline.scm continue.c \ - findexec.c script.c debug.c byte.c + unix.c rope.c ramap.c gsubr.c edline.c continue.c \ + findexec.c script.c debug.c byte.c differ.c ofiles = scm.o time.o repl.o scl.o sys.o eval.o subr.o unif.o rope.o \ continue.o findexec.o script.o debug.o # ramap.o ifiles = Init$(VERSION).scm Transcen.scm Link.scm Macro.scm Macexp.scm \ - Tscript.scm compile.scm + Tscript.scm compile.scm Iedline.scm Idiffer.scm hobfiles = hobbit.scm scmhob.scm scmhob.h xafiles = xatoms.scm x11.scm xevent.scm keysymdef.scm xfiles = x.c x.h xgen.scm xevent.h inc2scm $(xafiles) all: require.scm $(MAKE) mydlls - $(MAKE) myscm5 + $(MAKE) dscm5 $(MAKE) x.so + $(MAKE) db.so require.scm: cp -p requires.scm require.scm @@ -113,7 +119,7 @@ scmflags: echo "#define IMPLINIT \"$(IMPLINIT)\"" >> newflags.h echo "#endif" >> newflags.h echo "#define CAUTIOUS" >> newflags.h - -if (diff newflags.h scmflags.h) then rm newflags.h; \ + -if (cmp -s newflags.h scmflags.h) then rm newflags.h; \ else mv newflags.h scmflags.h; fi .c.o: $(CC) -c $(CFLAGS) $< -o $@ @@ -132,23 +138,34 @@ rope.o: rope.c scm.h scmfig.h scmflags.h continue.o: continue.c continue.h setjump.h scm.h scmfig.h scmflags.h # Simple build with bignums for running JACAL -scm: +scm: scmlit $(BUILD) -s $(IMPLPATH) -F cautious bignums arrays # i/o-extensions $(MAKE) check -# R4RS interpreter +# R5RS interpreter (not dumpable) +scm5.opt: + echo "-F cautious bignums arrays inexact" >> scm5.opt + echo "-F engineering-notation dynamic-linking" >> scm5.opt + echo "-F macro" >> scm5.opt +scm5: $(cfiles) $(hfiles) build.scm build scm5.opt + $(BUILD) -f scm5.opt -o scm -s $(IMPLPATH) + rm $(ofiles) scmmain.o + -$(MAKE) check + -$(MAKE) checkmacro + +# dumpable R4RS interpreter udscm4.opt: echo "-F cautious bignums arrays inexact" >> udscm4.opt echo "-F engineering-notation dump dynamic-linking" >> udscm4.opt udscm4: $(cfiles) $(hfiles) build.scm build udscm4.opt $(BUILD) -f udscm4.opt -o udscm4 -s $(IMPLPATH) rm $(ofiles) scmmain.o -myscm4: udscm4 $(ifiles) require.scm +dscm4: udscm4 $(ifiles) require.scm -rm slibcat implcat -mv scm scm~ - echo "(quit)" | ./udscm4 -no-init-file -o scm + echo "(quit)" | $(SETARCH) ./udscm4 -no-init-file -o scm -# R5RS interpreter +# dumpable R5RS interpreter udscm5.opt: udscm4.opt cat udscm4.opt >> udscm5.opt echo "-F macro" >> udscm5.opt @@ -156,10 +173,10 @@ udscm5.opt: udscm4.opt udscm5: $(cfiles) $(hfiles) build.scm build Makefile udscm5.opt $(BUILD) -f udscm5.opt -o udscm5 -s $(IMPLPATH) rm $(ofiles) scmmain.o -myscm5: udscm5 $(ifiles) require.scm +dscm5: udscm5 $(ifiles) require.scm -rm slibcat implcat -mv scm scm~ - echo "(quit)" | ./udscm5 -no-init-file -r5 -o scm + echo "(quit)" | $(SETARCH) ./udscm5 -no-init-file -r5 -o scm $(MAKE) check $(MAKE) checkmacro @@ -174,7 +191,7 @@ gdb.opt: udscm5.opt udgdbscm: gdb.opt $(BUILD) -f gdb.opt -o udgdbscm -s $(IMPLPATH) gdbscm: udgdbscm - echo "(quit)" | ./udgdbscm -no-init-file -r5 -o gdbscm + echo "(quit)" | $(SETARCH) ./udgdbscm -no-init-file -r5 -o gdbscm # R4RS interpreter for profiling pg.opt: udscm4.opt @@ -185,7 +202,7 @@ pg.opt: udscm4.opt udpgscm: pg.opt $(BUILD) -f pg.opt -o udpgscm -s $(IMPLPATH) pgscm: udpgscm - echo "(quit)" | ./udpgscm -no-init-file -o pgscm + echo "(quit)" | $(SETARCH) ./udpgscm -no-init-file -o pgscm # R4RS SCM library libscm.opt: @@ -207,9 +224,25 @@ mydlls: dlls.opt if [ -f /usr/lib/libreadline.so ]; \ then $(BUILD) -t dll -f dlls.opt -F edit-line; fi $(BUILD) -t dll -f dlls.opt -F curses - $(BUILD) -t dll -f dlls.opt -c sc2.c rgx.c record.c gsubr.c \ - ioext.c posix.c unix.c socket.c ramap.c byte.c - + $(BUILD) -t dll -f dlls.opt -c sc2.c + $(BUILD) -t dll -f dlls.opt -c rgx.c + $(BUILD) -t dll -f dlls.opt -c record.c + $(BUILD) -t dll -f dlls.opt -c gsubr.c + $(BUILD) -t dll -f dlls.opt -c ioext.c + $(BUILD) -t dll -f dlls.opt -c posix.c + $(BUILD) -t dll -f dlls.opt -c unix.c + $(BUILD) -t dll -f dlls.opt -c socket.c + $(BUILD) -t dll -f dlls.opt -c ramap.c + $(BUILD) -t dll -f dlls.opt -c byte.c + +rwb-isam.scm wbtab.scm: ../wb/rwb-isam.scm ../wb/wbtab.scm + cp ../wb/rwb-isam.scm ../wb/wbtab.scm ./ +db.so: dlls.opt rwb-isam.scm wbtab.scm + if [ -f ../wb/blink.c ]; then \ + $(BUILD) -t dll -f dlls.opt -F wb; fi + +differ.so: differ.c + $(BUILD) -t dll -f dlls.opt -F differ myturtle: dlls.opt $(BUILD) -t dll -f dlls.opt -F turtlegr @@ -228,7 +261,7 @@ keysymdef.scm: inc2scm xevent.h xevent.scm xatoms.scm: xgen.scm Makefile $(SCMLIT) -l xgen.scm $(incdir)X11/Xlib.h x.h: x.c xevent.h - if [ ! -z "$(CPROTO)" ]; then $(CPROTO) x.c > x.h; fi + if [ -x "$(CPROTO)" ]; then $(CPROTO) x.c > x.h; fi # Check SCM; SCMLIT function. checklit: @@ -278,7 +311,7 @@ report: $(SCMLIT) -e"(slib:report #t)" $(SCMEXE) -e"(slib:report #t)" -implcat: *.so mkimpcat.scm +implcat: $(SHOBJS) mkimpcat.scm $(SCMLIT) -lmkimpcat.scm htmldir=../public_html/ @@ -286,23 +319,23 @@ dvidir=../dvi/ dvi: $(dvidir)scm.dvi $(dvidir)Xlibscm.dvi $(dvidir)hobbit.dvi $(dvidir)scm.dvi: version.txi scm.texi platform.txi features.txi\ $(dvidir)scm.fn Makefile -# cd $(dvidir);export TEXINPUTS=$(srcdir):;texi2dvi $(srcdir)scm.texi - -(cd $(dvidir);export TEXINPUTS=$(srcdir):;texindex scm.??) - cd $(dvidir);export TEXINPUTS=$(srcdir):;tex $(srcdir)scm.texi +# cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;texi2dvi $(srcdir)scm.texi + -(cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;texindex scm.??) + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;tex $(srcdir)scm.texi $(dvidir)scm.fn: - cd $(dvidir);export TEXINPUTS=$(srcdir):;tex $(srcdir)scm.texi + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;tex $(srcdir)scm.texi $(dvidir)Xlibscm.dvi: version.txi Xlibscm.texi $(dvidir)Xlibscm.fn Makefile -# cd $(dvidir);export TEXINPUTS=$(srcdir):;texi2dvi $(srcdir)Xlibscm.texi - -(cd $(dvidir);export TEXINPUTS=$(srcdir):;texindex Xlibscm.??) - cd $(dvidir);export TEXINPUTS=$(srcdir):;tex $(srcdir)Xlibscm.texi +# cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;texi2dvi $(srcdir)Xlibscm.texi + -(cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;texindex Xlibscm.??) + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;tex $(srcdir)Xlibscm.texi $(dvidir)Xlibscm.fn: - cd $(dvidir);export TEXINPUTS=$(srcdir):;tex $(srcdir)Xlibscm.texi + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;tex $(srcdir)Xlibscm.texi $(dvidir)hobbit.dvi: version.txi hobbit.texi $(dvidir)hobbit.fn Makefile -# cd $(dvidir);export TEXINPUTS=$(srcdir):;texi2dvi $(srcdir)hobbit.texi - -(cd $(dvidir);export TEXINPUTS=$(srcdir):;texindex hobbit.??) - cd $(dvidir);export TEXINPUTS=$(srcdir):;tex $(srcdir)hobbit.texi +# cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;texi2dvi $(srcdir)hobbit.texi + -(cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;texindex hobbit.??) + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;tex $(srcdir)hobbit.texi $(dvidir)hobbit.fn: - cd $(dvidir);export TEXINPUTS=$(srcdir):;tex $(srcdir)hobbit.texi + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;tex $(srcdir)hobbit.texi xdvi: $(dvidir)scm.dvi xdvi -s 3 $(dvidir)scm.dvi Xdvi: $(dvidir)Xlibscm.dvi @@ -313,13 +346,13 @@ hobdvi: $(dvidir)hobbit.dvi pdf: $(htmldir)scm.pdf $(htmldir)Xlibscm.pdf $(htmldir)hobbit.pdf $(htmldir)scm.pdf: version.txi scm.texi platform.txi features.txi\ $(dvidir)scm.fn Makefile - cd $(dvidir);export TEXINPUTS=$(srcdir):;pdftex $(srcdir)scm.texi + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;pdftex $(srcdir)scm.texi mv $(dvidir)scm.pdf $(htmldir) $(htmldir)Xlibscm.pdf: version.txi Xlibscm.texi $(dvidir)Xlibscm.fn Makefile - cd $(dvidir);export TEXINPUTS=$(srcdir):;pdftex $(srcdir)Xlibscm.texi + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;pdftex $(srcdir)Xlibscm.texi mv $(dvidir)Xlibscm.pdf $(htmldir) $(htmldir)hobbit.pdf: version.txi hobbit.texi $(dvidir)hobbit.fn Makefile - cd $(dvidir);export TEXINPUTS=$(srcdir):;pdftex $(srcdir)hobbit.texi + cd $(dvidir);TEXINPUTS=$(srcdir):;export TEXINPUTS;pdftex $(srcdir)hobbit.texi mv $(dvidir)hobbit.pdf $(htmldir) xpdf: $(htmldir)scm.pdf xpdf -z 3 $(htmldir)scm.pdf @@ -420,7 +453,7 @@ $(infodir)Xlibscm.info.gz: $(infodir)Xlibscm.info $(infodir)hobbit.info.gz: $(infodir)hobbit.info gzip -f $(infodir)hobbit.info -install: scm.1 +install: scm.1 db.so wbtab.scm rwb-isam.scm test -d $(bindir) || mkdir $(bindir) test -d $(mandir) || mkdir $(mandir) test -d $(man1dir) || mkdir $(man1dir) @@ -432,8 +465,9 @@ install: scm.1 -cp $(ifiles) $(hobfiles) COPYING r4rstest.scm $(libscmdir) test -f $(libscmdir)require.scm || \ cp requires.scm $(libscmdir)require.scm - -cp build build.scm mkimpcat.scm Iedline.scm *.sl *.so patchlvl.h\ + -cp build build.scm mkimpcat.scm Iedline.scm $(SHOBJS) patchlvl.h\ $(xafiles) $(libscmdir) + -cp db.so wbtab.scm rwb-isam.scm $(libscmdir) installlib: test -d $(includedir) || mkdir $(includedir) @@ -446,18 +480,10 @@ uninstall: -rm $(man1dir)scm.1 -rm $(includedir)scm.h $(includedir)scmfig.h $(includedir)scmflags.h -rm $(libdir)libscm.a - -rm $(libscmdir)Transcen.scm\ - $(libscmdir)Link.scm\ - $(libscmdir)Macro.scm\ - $(libscmdir)Macexp.scm\ - $(libscmdir)Tscript.scm\ - $(libscmdir)compile.scm\ - $(libscmdir)hobbit.scm\ - $(libscmdir)scmhob.scm\ - $(libscmdir)scmhob.h\ - $(libscmdir)COPYING\ - $(libscmdir)r4rstest.scm - -rm $(libscmdir)Init$(VERSION).scm + -(cd $(libscmdir); rm $(ifiles) $(hobfiles) COPYING r4rstest.scm) + -(cd $(libscmdir); rm build build.scm mkimpcat.scm \ + $(SHOBJS) patchlvl.h $(xafiles)) + -(cd $(libscmdir); rm db.so wbtab.scm rwb-isam.scm require.scm) uninstallinfo: -rm $(infodir)scm.info.gz $(infodir)Xlibscm.info.gz\ @@ -499,9 +525,11 @@ afiles = $(dfiles) $(cfiles) $(hfiles) $(ifiles) $(tfiles) $(mfiles) \ makedev = make -f $(HOME)/makefile.dev CHPAT=$(HOME)/bin/chpat -RSYNC=rsync -avessh +RSYNC=rsync --rsync-path=bin/rsync -bav UPLOADEE=swissnet_upload dest = $(HOME)/dist/ +DOSCM = /misc/usb1/scm/ + temp/scm: $(afiles) -$(RM_R) temp mkdir temp @@ -532,6 +560,8 @@ postnews: upzip: $(HOME)/pub/scm.zip $(RSYNC) $(HOME)/pub/scm.zip $(UPLOADEE):pub/ + $(RSYNC) r4rstest.scm $(HOME)/dist/ + $(RSYNC) r4rstest.scm $(UPLOADEE):dist/ dist: $(dest)scm$(VERSION).zip $(dest)scm$(VERSION).zip: temp/scm @@ -540,7 +570,7 @@ $(dest)scm$(VERSION).zip: temp/scm rpm: pubzip # $(dest)scm-$(VERSION)-$(RELEASE).i386.rpm: $(dest)scm$(VERSION).zip cp -f $(HOME)/pub/scm.zip $(rpm_prefix)SOURCES/scm$(VERSION).zip - rpm -ba scm.spec # --clean + rpmbuild -ba scm.spec # --clean rm $(rpm_prefix)SOURCES/scm$(VERSION).zip mv $(rpm_prefix)RPMS/i386/scm-$(VERSION)-$(RELEASE).i386.rpm \ $(rpm_prefix)SRPMS/scm-$(VERSION)-$(RELEASE).src.rpm $(dest) @@ -555,12 +585,12 @@ scm.com: temp/scm zip: scm.zip scm.zip: temp/scm $(makedev) PROD=scm zip -doszip: /c/scm/dist/scm$(VERSION).zip -/c/scm/dist/scm$(VERSION).zip: temp/scm turtle turtlegr.c grtest.scm - $(makedev) DEST=/c/scm/dist/ PROD=scm ver=$(VERSION) zip - cd ..; zip -9ur /c/scm/dist/scm$(VERSION).zip \ +doszip: $(DOSCM)dist/scm$(VERSION).zip +$(DOSCM)dist/scm$(VERSION).zip: temp/scm turtle turtlegr.c grtest.scm + $(makedev) DEST=$(DOSCM)dist/ PROD=scm ver=$(VERSION) zip + cd ..; zip -9ur $(DOSCM)dist/scm$(VERSION).zip \ scm/turtle scm/turtlegr.c scm/grtest.scm - zip -d /c/scm/dist/scm$(VERSION).zip scm/scm.info scm/Xlibscm.info scm/hobbit.info + zip -d $(DOSCM)dist/scm$(VERSION).zip scm/scm.info scm/Xlibscm.info scm/hobbit.info pubzip: $(HOME)/pub/scm.zip $(HOME)/pub/scm.zip: temp/scm $(makedev) DEST=$(HOME)/pub/ PROD=scm zip @@ -577,8 +607,8 @@ CITERS = ANNOUNCE ../jacal/ANNOUNCE \ $(htmldir)SLIB.html $(htmldir)JACAL.html \ $(htmldir)SCM.html $(htmldir)SIMSYNCH.html \ ../jacal/jacal.texi ../wb/wb.texi \ - /c/scm/dist/install.bat /c/scm/dist/makefile \ - /c/scm/dist/mkdisk.bat hobbit.texi hobbit.scm + $(DOSCM)dist/install.bat $(DOSCM)dist/makefile \ + $(DOSCM)dist/mkdisk.bat hobbit.texi hobbit.scm updates: Init$(ver).scm $(CHPAT) scm$(VERSION) scm$(ver) $(CITERS) |