#########################################################################
# This program is copyright (C) 1985, 1986 by Jonathan Payne. It is #
# provided to you without charge for use only on a licensed Unix #
# system. You may copy JOVE provided that this notice is included with #
# the copy. You may not sell copies of this program or versions #
# modified for use on microcomputer systems, unless the copies are #
# included with a Unix system distribution and the source is provided. #
#########################################################################
# Figure out the directories for things. TMPDIR is where the tmp files get
# stored, usually /tmp or /tmp/jove. RECDIR is where the tmp files should be
# moved when the system comes back up (and a call to recover -syscrash should
# be put in /etc/rc before /tmp is cleared). If your system does not remove
# subdirectories of /tmp on reboot (lots do remove them these days) then it
# makes sense to make RECDIR and TMPDIR both be /tmp/jove. That way you
# don't need the call to jove_recover in /etc/rc. LIBDIR is for online
# documentation, the PORTSRV process, JOVE_RECOVER, and the system-wide
# .joverc file. BINDIR is where to put the executables JOVE, JOVE_RECOVER
# and TEACHJOVE. MANDIR is where the manual pages go for JOVE, JOVE_RECOVER
# and TEACHJOVE. MANEXT is the extension for the man pages, e.g., jove.1 or
# These should all just be right if the above ones are.
JOVE = $(DESTDIR)$(BINDIR)/jove
RECOVER = $(DESTDIR)$(BINDIR)/recover
TEACHJOVE = $(DESTDIR)$(BINDIR)/teachjove
JOVERC = $(DESTDIR)$(LIBDIR)/.joverc
CMDS.DOC = $(DESTDIR)$(LIBDIR)/cmds.doc
TEACH-JOVE = $(DESTDIR)$(LIBDIR)/teach-jove
PORTSRV = $(DESTDIR)$(LIBDIR)/portsrv
JOVEM = $(DESTDIR)$(MANDIR)/jove.$(MANEXT)
RECOVERM = $(DESTDIR)$(MANDIR)/recover.$(MANEXT)
TEACHJOVEM = $(DESTDIR)$(MANDIR)/teachjove.$(MANEXT)
# Select the right libraries for your system.
# 2.9BSD: LIBS = -ltermlib -ljobs
# 4.1BSD: LIBS = -ltermlib -ljobs
# 4.2BSD: LIBS = -ltermlib
# 4.3BSD: LIBS = -ltermlib
OVLIBS = -lovtermcap -lovjobs
# If you are not VMUNIX (vax running Berkeley Version 4), you must specify
# the -i flags (split I/D space) and maybe the -x option (for adb to work).
# 2.9BSD: LDFLAGS = -x -i
BASESEG = funcdefs.o keymaps.o ask.o buf.o ctype.o delete.o disp.o fmt.o fp.o \
insert.o io.o jove.o malloc.o macros.o marks.o misc.o move.o re.o \
screen.o tune.o util.o vars.o version.o
OVLAY1 = abbrev.o rec.o paragraph.o
OVLAY5 = proc.o scandir.o term.o case.o
OBJECTS = $(BASESEG) $(OVLAY1) $(OVLAY2) $(OVLAY3) $(OVLAY4) $(OVLAY5)
C-FILES = funcdefs.c abbrev.c ask.c buf.c c.c case.c ctype.c delete.c disp.c \
extend.c fmt.c fp.c insert.c io.c iproc.c iproc-pipes.c iproc-ptys.c \
jove.c macros.c malloc.c marks.c misc.c move.c paragraph.c proc.c \
re.c re1.c rec.c scandir.c screen.c term.c util.c vars.c version.c \
H-FILES = ctype.h io.h jove.h re.h rec.h temp.h termcap.h tune.h
BACKUPS = $(C-FILES) $(H-FILES) teachjove.c recover.c setmaps.c portsrv.c \
tune.template Makefile Ovmakefile keymaps.txt README tags \
all: xjove recover teachjove portsrv
ld $(LDFLAGS) /lib/crt0.o \
cc -o portsrv -n -O portsrv.c $(LIBS)
recover: recover.c tune.o rec.h temp.h
cc -o recover -n -O recover.c tune.o -ljobs
cc -o teachjove -n -O -DTEACHJOVE=\"$(TEACH-JOVE)\" teachjove.c
setmaps: setmaps.c funcdefs.c
keymaps.c: setmaps keymaps.txt
setmaps < keymaps.txt > keymaps.c
tune.c: Makefile tune.template
@echo "/* Changes should be made in Makefile, not to this file! */" > tune.c
@sed -e 's;TMPDIR;$(TMPDIR);' \
-e 's;RECDIR;$(RECDIR);' \
-e 's;LIBDIR;$(LIBDIR);' \
-e 's;BINDIR;$(BINDIR);' \
-e 's;SHELL;$(SHELL);' tune.template >> tune.c
install: $(LIBDIR) $(TEACH-JOVE) $(CMDS.DOC) $(JOVERC) $(PORTSRV) $(RECOVER) \
$(JOVE) $(TEACHJOVE) $(JOVEM) $(RECOVERM) $(TEACHJOVEM)
-mkdir (DESTDIR)$(LIBDIR)
$(TEACH-JOVE): doc/teach-jove
install -c -m 644 doc/teach-jove $(TEACH-JOVE)
$(CMDS.DOC): doc/cmds.doc
install -c -m 644 doc/cmds.doc $(CMDS.DOC)
install -c -m 644 doc/system.rc $(JOVERC)
install -c -m 755 portsrv $(PORTSRV)
install -c -m 755 recover $(RECOVER)
install -c -m 755 xjove $(JOVE)
install -c -m 755 teachjove $(TEACHJOVE)
@sed -e 's;TMPDIR;$(TMPDIR);' \
-e 's;RECDIR;$(RECDIR);' \
-e 's;LIBDIR;$(LIBDIR);' \
-e 's;SHELL;$(SHELL);' doc/jove.nr > /tmp/jove.nr
install -m 644 /tmp/jove.nr $(JOVEM)
$(RECOVERM): doc/recover.nr
@sed -e 's;TMPDIR;$(TMPDIR);' \
-e 's;RECDIR;$(RECDIR);' \
-e 's;LIBDIR;$(LIBDIR);' \
-e 's;SHELL;$(SHELL);' doc/recover.nr > /tmp/recover.nr
install -m 644 /tmp/recover.nr $(RECOVERM)
$(TEACHJOVEM): doc/teachjove.nr
@sed -e 's;TMPDIR;$(TMPDIR);' \
-e 's;RECDIR;$(RECDIR);' \
-e 's;LIBDIR;$(LIBDIR);' \
-e 's;SHELL;$(SHELL);' doc/teachjove.nr > /tmp/teachjove.nr
install -m 644 /tmp/teachjove.nr $(TEACHJOVEM)
@echo $(C-FILES) $(H-FILES)
ctags -w $(C-FILES) $(H-FILES)
shar $(BACKUPS) doc/* > jove.shar
tar cbf 20 /dev/rmt0 $(BACKUPS)
rm -f a.out core $(OBJECTS) keymaps.c xjove \
portsrv recover setmaps teachjove
# abbrev.o: jove.h tune.h
# delete.o: jove.h tune.h
# disp.o: jove.h tune.h termcap.h
# extend.o: jove.h tune.h
# fmt.o: jove.h tune.h termcap.h
# funcdefs.o: jove.h tune.h
# insert.o: jove.h tune.h
# io.o: jove.h tune.h termcap.h temp.h
# jove.o: jove.h tune.h termcap.h
# macros.o: jove.h tune.h
# portsrv.o: jove.h tune.h
# rec.o: jove.h tune.h temp.h rec.h
# recover.o: jove.h tune.h temp.h rec.h
# screen.o: jove.h tune.h temp.h termcap.h
# setmaps.o: jove.h tune.h
# wind.o: jove.h tune.h termcap.h