home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
CMDS
/
rcs4.lha
/
makefile.orgosk
< prev
next >
Wrap
Makefile
|
1993-03-03
|
11KB
|
339 lines
#$Header: /usr/src/local/bin/rcs/src/RCS/Makefile,v 1.10 87/12/18 17:06:19 narten Exp $
# Copyright (C) 1982 by Walter F. Tichy
# Purdue University
# Computer Science Department
# West Lafayette, IN 47907
#
# All rights reserved. No part of this software may be sold or distributed
# in any form or by any means without the prior written permission of the
# author.
# Report problems and direct all inquiries to
# tichy@purdue, decvax!purdue!tichy
#
# INSTRUCTIONS
# ============
# 0. If you are porting to different hardware,
# check the instructions in rcsbase.h
#
# Note: instructions 1-5 are normally taken care of by the calling make,
# which passes in DIFF, DIFF3, RCSDIR, OLDDIR, OS, and LOCKING.
#
# 1. Early version of diff did not support options needed by RCS.
# Newer versions of diff, support them and diff is no longer distributed with
# RCS. The following definitions apply only if you have both old versions
# and new versions of diff, and you want RCS to use the new versions.
# The default should be :
#DIFF = /bin/diff
#DIFF3 = /usr/lib/diff3
# Figure out where to put the modified diff and diff3 commands, and
# install them. (Read the instructions in the Make-files).
# Define the macros DIFF and DIFF3 accordingly (below).
DESTDIR = /h0/usr/cmds/
DIFF = diff
DIFF3 = diff3
# 2. Figure out where to put the RCS commands; define RCSDIR accordingly.
RCSDIR = /h0/usr/cmds
MERGE = merge
# 3. Figure out where to put your old RCS commands; define OLDDIR
# accordingly. This is not needed if you don't have an old release of RCS.
OLDDIR = /usr/old/bin
# 4. Set the operating system variable OS. If you run on 4.1 BSD, do not
# define OS:
# OS =
# If you run on USG Unix or UN*X, use:
# OS = -DUSG
# If you run on Version 6 Unix, use:
# OS = -DV6
# If you run on 4.2 or 4.3 BSD, use:
# OS = -DV4_2BSD
OS =
# 5. Decide whether you want strict locking as the default or not.
# If you want strict locking, use:
# LOCKING = 1
# otherwise:
# LOCKING = 0
LOCKING = 0
# 6. Decide what loader flags you need, and define LDFLAGS accordingly.
# On the Vax you need none, on PDP-11s with split i/d you need -i.
LDFLAGS = -ix -l=/h0/lib/os9lib.l
# 7. RCS can maintain a log of the use of the co and ci commands. If you
# want the logging, you must
# a) define SNOOP (that's where the process that writes the log goes),
# b) define SNOOPFILE (that's the file where SNOOP writes the log;
# it must be owned by the same user that owns SNOOP),
# c) include SNOOP and SNOOPFILE in the CFLAGS macro.
# If you don't want the logging of command usage, omit the SNOOP and
# SNOOPFILE definitions from CFLAGS.
# The two variants of the CFLAG macros are given below.
#SNOOPFILE = /usr/log/rcslog/log
#SNOOP = /usr/local/bin/snoop
DEFINES= $(OS) -DSTRICT_LOCKING=$(LOCKING) -DDIFF='"${DESTDIR}$(DIFF)"' -DMERGE='"${DESTDIR}$(MERGE)"' -DTARGETDIR='"$(RCSDIR)"'
CFLAGS = -ixqt=/dd $(DEFINES)
LINT = lint -c -u -Dlint $(DEFINES)
SHELL= sh
# 8. If you don't have release 2 RCS files around (e.g., if you don't
# have release 2 of RCS), remove the word -DCOMPAT2 from whatever
# variant of CFLAGS you selected. -DCOMPAT2 assures that release 2
# RCS files can still be read. (After all release 2 RCS files have
# been updated with release 3 or 4 ci or rcs, you can remake RCS without
# -DCOMPAT2.) Also, make sure that the co commands at the end of this
# file are commented out; otherwise, Make will complain.
#
# 9. Now you are ready. Try to make 'all'. If all went well, make
# 'install' if you want no logging of command usage, 'installog' otherwise.
#
# 10. IMPORTANT! When you have RCS installed, rename old
# release 2 RCS files as follows (if you have any):
# If the working file was "f.c" and the RCS file "f.c.v", rename the
# RCS file to "f.c,v". If the working file was "f.c" and the RCS file
# "f.v", rename the RCS file "f.c,v". Thus, suffixes are no longer
# dropped and RCS files end in ",v" rather than ".v".
#
# 11. If you want to maintain RCS with itself, be sure you preserve the
# original revision numbers, dates, etc. This is done by checking the
# files in with the -k option. When done, remove the comments from the
# co-rules at the end of this file.
#
BCOMMANDS = ci rcsident rcs rcsdiff rcsmerge rlog co
# binary comands
RCSCOMMANDS = merge $(BCOMMANDS)
# all commands
SOURCES = ci.c co.c ident.c maketime.c partime.c rcs.c rcsdiff.c rcsedit.c\
rcsfcmp.c rcsfnms.c rcsgen.c rcskeep.c rcskeys.c rcslex.c rcsmerge.c\
rcsrev.c rcssyn.c rcsutil.c rlog.c snoop.c\
rcsbase.h time.h merge.sh
BOBJECTS = ci.r co.r ident.r rcs.r rcsdiff.r rcsedit.r\
rcsfcmp.r rcsfnms.r rcsgen.r rcskeep.r rcskeys.r rcslex.r rcsmerge.r\
rcsrev.r rcssyn.r rcsutil.r rlog.r snoop.r\
rcssynTST.r rcsrevTST.r rcsfnmsTST.r rcsfcmpTST.r rcskeepTST.r
all: $(RCSCOMMANDS)
INSTALL = install
$(BOBJECTS): rcsbase.h
partime.r maketime.r co.r ci.r rcs.r rlog.r rcsutil.r: time.h
install: all
# Save the old commands if you have any.
# -cd ${DESTDIR}$(RCSDIR); mv $(RCSCOMMANDS) ${DESTDIR}$(OLDDIR)
# ${INSTALL} -m 775 -o root -s ci ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -s rcsident ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -s rcs ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -s rcsdiff ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -s rcsmerge ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -s rlog ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -s co ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -c merge ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -c rcsclean ${DESTDIR}$(RCSDIR)
# ${INSTALL} -m 775 -o root -c rcsfreeze.sh ${DESTDIR}${RCSDIR}/rcsfreeze
installog: installsnoop install
installsnoop: snoop
# install -s snoop ${DESTDIR}$(SNOOP)
# chmod u+s ${DESTDIR}$(SNOOP)
# touch ${DESTDIR}$(SNOOPFILE)
# chmod 644 ${DESTDIR}$(SNOOPFILE)
# CAUTION: You may have to do a chown of SNOOP and SNOOPFILE (if not owned by root).
lint: ci.lint co.lint ident.lint rlog.lint rcs.lint rcsdiff.lint rcsmerge.lint snoop.lint
clean:
-rm -f *.r; rm -f $(RCSCOMMANDS) snoop
CIFILES = ci.r rcslex.r rcssyn.r rcsgen.r rcsedit.r rcskeys.r rcsrev.r rcsutil.r rcsfnms.r partime.r maketime.r rcskeep.r rcsfcmp.r
CISRC = ci.c rcslex.c rcssyn.c rcsgen.c rcsedit.c rcskeys.c rcsrev.c rcsutil.c rcsfnms.c partime.c maketime.c rcskeep.c rcsfcmp.c
ci.lint:
$(LINT) $(CISRC)
ci: $(CIFILES)
cc $(LDFLAGS) -f=$(RCSDIR)/ci $(CIFILES)
COFILES = co.r rcslex.r rcssyn.r rcsgen.r rcsedit.r rcskeys.r rcsrev.r rcsutil.r rcsfnms.r partime.r maketime.r
COSRC = co.c rcslex.c rcssyn.c rcsgen.c rcsedit.c rcskeys.c rcsrev.c rcsutil.c rcsfnms.c partime.c maketime.c
co.lint:
$(LINT) $(COSRC)
co: $(COFILES)
cc $(LDFLAGS) -f=$(RCSDIR)/co $(COFILES)
rcsident: ident.r rcskeys.r
cc $(LDFLAGS) -f=$(RCSDIR)/rcsident ident.r rcskeys.r
ident.lint:
$(LINT) ident.c rcskeys.c
merge: merge.sh
# sed -e '/^#/d' -e 's:DIFF3=.*$$:DIFF3=$(DIFF3):' merge.sh > merge
# This takes out the comment lines and substitutes in DIFF3.
# (Comments are not permitted in some older shells.)
# chmod 755 merge
RLOG = rlog.r rcslex.r rcssyn.r rcsrev.r rcsutil.r partime.r maketime.r rcsfnms.r
RLOGSRC = rlog.c rcslex.c rcssyn.c rcsrev.c rcsutil.c partime.c maketime.c rcsfnms.c
rlog: $(RLOG)
cc $(LDFLAGS) -f=$(RCSDIR)/rlog $(RLOG)
rlog.lint:
$(LINT) $(RLOGSRC)
RCS = rcs.r rcslex.r rcssyn.r rcsrev.r rcsutil.r rcsgen.r rcsedit.r rcskeys.r rcsfnms.r
RCSSRC = rcs.c rcslex.c rcssyn.c rcsrev.c rcsutil.c rcsgen.c rcsedit.c rcskeys.c rcsfnms.c
rcs: $(RCS)
cc $(LDFLAGS) -f=$(RCSDIR)/rcs $(RCS)
rcs.lint:
$(LINT) $(RCSSRC)
rcsclean: rcsclean.sh
# sed -e '/^#/d' rcsclean.sh > rcsclean
# This takes out the comments (not permitted in older shells).
# chmod 755 rcsclean
RCSDIFF = rcsdiff.r rcsutil.r rcsfnms.r rcsrev.r rcssyn.r rcslex.r
RCSDIFFSRC = rcsdiff.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
rcsdiff: $(RCSDIFF)
cc $(LDFLAGS) -f=$(RCSDIR)/rcsdiff $(RCSDIFF)
rcsdiff.lint:
$(LINT) $(RCSDIFFSRC)
RCSMERGE = rcsmerge.r rcsutil.r rcsfnms.r rcsrev.r rcssyn.r rcslex.r
RCSMERGESRC = rcsmerge.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
rcsmerge: $(RCSMERGE)
cc $(LDFLAGS) -f=$(RCSDIR)/rcsmerge $(RCSMERGE)
rcsmerge.lint:
$(LINT) $(RCSMERGESRC)
snoop: snoop.r
cc $(LDFLAGS) -f=$(RCSDIR)/snoop snoop.r
snoop.lint:
$(LINT) snoop.c
SOURCE= ci.c co.c curdir.c ident.c maketime.c partime.c rcs.c \
rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
rcskeep.c rcskeys.c rcslex.c rcsmerge.c rcsrev.c rcssyn.c rcsutil.c \
rlog.c snoop.c
HFILES= rcsbase.h time.h
depend: ${SOURCE} ${HFILES}
cc -M ${CFLAGS} ${SOURCE} > makedep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
cp Makefile Makefile.bak
ex - Makefile < eddep
rm eddep makedep
# DO NOT DELETE THIS LINE -
ci.r: ci.c
ci.r: ./rcsbase.h
ci.r: /h0/defs/stdio.h
ci.r: /h0/defs/sys/types.h
ci.r: /h0/defs/sys/stat.h
ci.r: ./time.h
co.r: co.c
co.r: ./rcsbase.h
co.r: /h0/defs/stdio.h
co.r: ./time.h
co.r: /h0/defs/sys/types.h
co.r: /h0/defs/sys/stat.h
curdir.r: curdir.c
curdir.r: ./rcsbase.h
curdir.r: /h0/defs/stdio.h
#curdir.r: /h0/defs/sys/param.h
#curdir.r: /h0/defs/machine/machparam.h
curdir.r: /h0/defs/signal.h
curdir.r: /h0/defs/sys/types.h
curdir.r: /h0/defs/sys/stat.h
curdir.r: /h0/defs/dir.h
ident.r: ident.c
ident.r: ./rcsbase.h
ident.r: /h0/defs/stdio.h
maketime.r: maketime.c
maketime.r: ./time.h
maketime.r: /h0/defs/sys/types.h
#maketime.r: /h0/defs/sys/timeb.h
partime.r: partime.c
partime.r: /h0/defs/stdio.h
partime.r: /h0/defs/ctype.h
partime.r: ./time.h
rcs.r: rcs.c
rcs.r: /h0/defs/sys/types.h
rcs.r: /h0/defs/sys/stat.h
#rcs.r: /h0/defs/sysexits.h
rcs.r: ./rcsbase.h
rcs.r: /h0/defs/stdio.h
rcsclean.r: rcsclean.c
rcsclean.r: ./rcsbase.h
rcsclean.r: /h0/defs/stdio.h
rcsdiff.r: rcsdiff.c
rcsdiff.r: ./rcsbase.h
rcsdiff.r: /h0/defs/stdio.h
rcsedit.r: rcsedit.c
rcsedit.r: ./rcsbase.h
rcsedit.r: /h0/defs/stdio.h
rcsfcmp.r: rcsfcmp.c
rcsfcmp.r: ./rcsbase.h
rcsfcmp.r: /h0/defs/stdio.h
rcsfnms.r: rcsfnms.c
rcsfnms.r: ./rcsbase.h
rcsfnms.r: /h0/defs/stdio.h
rcsfnms.r: /h0/defs/sys/types.h
rcsfnms.r: /h0/defs/sys/stat.h
rcsfnms.r: /h0/defs/dir.h
rcsgen.r: rcsgen.c
rcsgen.r: ./rcsbase.h
rcsgen.r: /h0/defs/stdio.h
rcskeep.r: rcskeep.c
rcskeep.r: ./rcsbase.h
rcskeep.r: /h0/defs/stdio.h
rcskeys.r: rcskeys.c
rcskeys.r: ./rcsbase.h
rcskeys.r: /h0/defs/stdio.h
rcslex.r: rcslex.c
rcslex.r: ./rcsbase.h
rcslex.r: /h0/defs/stdio.h
rcsmerge.r: rcsmerge.c
rcsmerge.r: ./rcsbase.h
rcsmerge.r: /h0/defs/stdio.h
rcsrev.r: rcsrev.c
rcsrev.r: ./rcsbase.h
rcsrev.r: /h0/defs/stdio.h
rcssyn.r: rcssyn.c
rcssyn.r: ./rcsbase.h
rcssyn.r: /h0/defs/stdio.h
rcsutil.r: rcsutil.c
rcsutil.r: /h0/defs/sys/types.h
rcsutil.r: /h0/defs/sys/stat.h
rcsutil.r: /h0/defs/signal.h
rcsutil.r: ./rcsbase.h
rcsutil.r: /h0/defs/stdio.h
rcsutil.r: /h0/defs/pwd.h
rlog.r: rlog.c
rlog.r: ./time.h
rlog.r: ./rcsbase.h
rlog.r: /h0/defs/stdio.h
snoop.r: snoop.c
snoop.r: ./rcsbase.h
snoop.r: /h0/defs/stdio.h