head     1.14;
branch   ;
access   ;
symbols  ;
locks    ;
comment  @# @;


1.14
date     91.10.29.22.04.02;  author moraes;  state Exp;
branches ;
next     1.13;

1.13
date     91.04.23.12.09.43;  author root;  state Exp;
branches ;
next     1.12;

1.12
date     91.04.23.12.05.40;  author root;  state Exp;
branches ;
next     1.11;

1.11
date     91.02.17.03.06.36;  author root;  state Exp;
branches ;
next     1.10;

1.10
date     91.02.07.00.17.04;  author root;  state Exp;
branches ;
next     1.9;

1.9
date     90.09.04.23.06.26;  author moraes;  state Exp;
branches ;
next     1.8;

1.8
date     90.09.01.00.28.29;  author moraes;  state Exp;
branches ;
next     1.7;

1.7
date     90.08.29.04.00.20;  author root;  state Exp;
branches ;
next     1.6;

1.6
date     90.07.28.05.30.29;  author root;  state Exp;
branches ;
next     1.5;

1.5
date     88.05.20.02.45.31;  author moraes;  state Exp;
branches ;
next     1.4;

1.4
date     88.04.27.21.09.15;  author moraes;  state Exp;
branches ;
next     1.3;

1.3
date     87.02.16.11.41.25;  author moraes;  state Exp;
branches ;
next     1.2;

1.2
date     87.01.18.13.08.46;  author rayan;  state Exp;
branches ;
next     1.1;

1.1
date     87.01.17.00.25.52;  author rayan;  state Exp;
branches ;
next     ;


desc
@track/src/makefile
@


1.14
log
@INNETGR support
@
text
@# based on:  $Id: Makefile,v 1.13 91/04/23 12:09:43 root Exp $

# defining  DEBUG has some important effects - trackd and calltrack use 
# the special service name "tracktest" for getservbyname() instead of "track", 
# which allows you to use a special port for testing track without disrupting 
# regular track. Add something like the following in /etc/services 
# 	tracktest	4939/tcp	#special track test port
# Under DEBUG, track looks in SRCDIR for calltrack and trackd looks for 
# trackd in SRCDIR. So you can then run SRCDIR/trackd on the librarian and
# run SRCDIR/track on the client to test them. Further, track opens syslog,
# so you can use syslog() to produce debugging output. - moraes

# Define -DBSDSOCKOPT for the 4.3BSD get/setsockopt semantics.

# Define -DSYS_DIR if your system has BSD4.2 style <sys/dir.h> and 
# struct direct, instead of Posix style <dirent.h>.  This is needed
# on SunOS3.5 and Ultrix2.x, at least.

# Track requires an ANSI C memmove() -- something that can handle
# overlapping copies in strings.  If you don't have memmove(), but
# have BSD bcopy(), them define -DHAVE_BCOPY.
# If you don't have either, try the one from 4.3reno by uncommenting BCOPY.

# Change DEF_ROOT to indicate the track root directory.  This directory
# must contain bin, locks, slists, and stats subdirectories.
# Change DEF_ADM to indicate the person who should get track mail.

# Define -DNO_STRING_H if you don't have ANSI/SysV string.h but have
# strings.h instead (only needed on pure 4BSD systems)

# Define -DNO_VOIDSTAR if your compiler supports 'void *' and your
# libraries declare malloc/memcpy/tfind etc to return void *.  Needed
# on 4BSD, Ultrix systems < 4.x.

# Define -DHAVE_SYS_SELECT for machines that need to include <sys/select.h>
# to get the FD_* macros. (IBM RS/6000s)

# Define -DSIG_RET_TYPE=void if your system signal handlers return a pointer
# to a function returning void, as in newer systems.  v7/BSD signal handlers
# return ints.  Not defining this means a warning in most systems, but it
# should still work.

# Define INNETGR if you have innetgr(3).  In this case, the permissions
# file may contain netgroup names as well as hostnames.

SRCDIR=/local/src/track/src
DEF_ROOT=/var/track
LIB_DIR=/local/lib/track
BIN_DIR=/local/bin
MAN1_DIR=/local/man/man1
MAN5_DIR=/local/man/man5
DEFINES=-DDEF_ADM=\"track\" -DBSDSOCKOPT -DHAVE_BCOPY -DINNETGR
#CDEBUGFLAGS= -O
CDEBUGFLAGS=-g
#LIBS = -lresolv
#LIBS=libmalloc.a
# ANT localism: netgroups-without-yp library.
# You'll probably want to comment this out.
LIBS = /local/lib/libnetgroup.a
BCOPY=bcopy.o

# You shouldn't have to change anything below this line.  If you do,
# please file a bug report.

CFLAGS=$(CDEBUGFLAGS) -DDEF_ROOT=\"$(DEF_ROOT)\" $(DEFINES) $(INCLUDES)
LINTFLAGS=$(DEFINES) $(INCLUDES)
LINK.c= $(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH)

PROGS= track calltrack trackd # runtrack sleeprand nullmail
TRACKOBJ = track.o misc.o files.o y.tab.o stamp.o \
	   except.o copyfile.o comm.o find.o pgcache.o \
	   regexp.o regerror.o stash.o error.o lock.o \
	   split.o numcmp.o opentmp.o $(BCOPY)

# For lint
TRACKSRC=${TRACKOBJ:.o=.c}

all: $(PROGS)

track: $(TRACKOBJ)
	$(LINK.c) -o track $(TRACKOBJ) $(LIBS)

lint:
	$(LINT) -ha $(LINTFLAGS) $(TRACKSRC) $(LIBS)

nullmail : nullmail.o
	$(LINK.c) -o nullmail nullmail.o
calltrack : calltrack.o
	$(LINK.c) -o calltrack calltrack.o $(LIBS)
trackd : trackd.o track.h
	$(LINK.c) -o trackd trackd.o $(LIBS)
sleeprand : sleeprand.c
	$(LINK.c) -o sleeprand sleeprand.c

y.tab.o: track.h regexp.h stash.h libc.h lex.yy.c
y.tab.c : sub_gram.y 
	yacc sub_gram.y
lex.yy.c : input.l
	@@echo IGNORE THE 6 WARNINGS ABOUT NON-PORTABLE CHARACTER CLASSES --
	lex input.l
calltrack.o: libc.h
comm.o: track.h regexp.h stash.h libc.h
copyfile.o: track.h regexp.h stash.h libc.h pgcache.h
except.o: track.h regexp.h stash.h libc.h
files.o: track.h regexp.h stash.h libc.h
find.o: libc.h
getfqdn.o: libc.h
lex.yy.o: stdio.h
lock.o: libc.h
misc.o: track.h regexp.h stash.h libc.h
opentmp.o: libc.h
pgcache.o: libc.h pgcache.h
regexp.o: regexp.h regmagic.h
stamp.o: track.h regexp.h stash.h libc.h pgcache.h
stash.o: stash.h libc.h
sub_gram.y: track.h regexp.h stash.h libc.h lex.yy.c
track.o: track.h regexp.h stash.h libc.h lock.h
trackd.o: track.h regexp.h stash.h libc.h fd-set.h

runtrack: runtrack.sh
	cp runtrack.sh runtrack

install: $(PROGS)
	-mkdir $(LIB_DIR) $(LIB_DIR)/bin
	install -c -o root -m  755 track $(LIB_DIR)/bin/track
	install -c -o root -m  755 nullmail $(LIB_DIR)/bin/nullmail
	install -c -o root -m 755 calltrack $(LIB_DIR)/bin/calltrack
	install -c -o root -m  755 trackd $(LIB_DIR)/bin/trackd
	install -c -o root -m 644 ../man/track.1 $(MAN1_DIR)/track.1
	install -c -o root -m 644 ../man/permissions.5 $(MAN5_DIR)/permissions.5
	install -c -o root -m 644 ../man/statfile.5 $(MAN5_DIR)/statfile.5
	install -c -o root -m 644 ../man/slist.5 $(MAN5_DIR)/slist.5
	install -c -o root -m 644 ../man/calltrack.1 $(MAN5_DIR)/calltrack.1
	install -c -o root -m 644 ../man/trackd.8 $(MAN5_DIR)/trackd.8
	-mkdir $(DEF_ROOT) $(DEF_ROOT)/slists $(DEF_ROOT)/stats
	-cd $(DEF_ROOT); ln -s /tmp locks
	rm -f $(BIN_DIR)/track
	-ln -s $(LIB_DIR)/bin/track $(BIN_DIR)/track
	@@echo 'Remember to make the entries in /etc/services for "track"'
	@@echo 'and inetd.conf|servers|/etc/rc.local for the trackd'
	@@echo 'if you intend running track VIA_TCP'

tags: ID
	ctags *.[chly]

ID: ALWAYS
	mkid -v -S.l=c *.[chly]

ALWAYS:

clean:
	-rm -f $(PROGS) dregexp.c
	-rm -f *.o \#* *~ a.out core
	-rm -f y.tab.c
	-rm -f lex.yy.c

tg: tg.o pgcache.o
	cc -o $@@ -g tg.o pgcache.o

tr: tr.o dregexp.o regerror.o error.o
	cc -o $@@ -g tr.o dregexp.o regerror.o error.o
dregexp.o: dregexp.c
	cc -c -g -DDEBUG dregexp.c
dregexp.c: regexp.c
	rm -f dregexp.c
	cp regexp.c dregexp.c
@


1.13
log
@changed RCS Header to Id to avoid long pathnames
@
text
@d1 1
a1 1
# based on:  $Id: Makefile,v 1.12 91/04/23 12:05:40 root Exp $
d43 3
d52 1
a52 1
DEFINES=-DDEF_ADM=\"track\" -DBSDSOCKOPT -DHAVE_BCOPY
d57 3
@


1.12
log
@cleaned up signal handling, made it more portable
@
text
@d1 1
a1 1
# based on:  $Header: /cs/src/track/src/RCS/Makefile,v 1.11 91/02/17 03:06:36 root Exp $
@


1.11
log
@updated dependencies, chk fix for RS6000
@
text
@d1 1
a1 1
# based on:  $Header: /nfs/neat/cs/src/track/src/RCS/Makefile,v 1.10 91/02/07 00:17:04 root Exp $
d37 5
@


1.10
log
@install has -c option, few more config definies
@
text
@d1 1
a1 1
# based on:  $Header: /nfs/neat/cs/src/track/src/RCS/Makefile,v 1.9 90/09/04 23:06:26 moraes Exp $
d35 3
d84 1
a84 1
y.tab.o : y.tab.c lex.yy.c track.h
d90 18
a107 8
track.o : track.c track.h
misc.o : misc.c track.h
files.o : files.c track.h
stamp.o : stamp.c track.h
except.o : except.c track.h
copyfile.o : copyfile.c track.h
comm.o : comm.c track.h
regexp.o: regexp.c regexp.h regmagic.h
@


1.9
log
@more precise message about lex warnings
@
text
@d1 1
a1 1
# based on:  $Header: /nfs/neat/cs/src/track/src/RCS/Makefile,v 1.8 90/09/01 00:28:29 moraes Exp $
a2 4
# add -DBIN_FIND if you want it to use /usr/bin/find to expand the slists
# when generating stat files; otherwise it uses a fast internal find routine.
# we don't know why you'd want to ever use /usr/bin/find, but.... - drb

d19 5
d28 7
a35 1
#DEFINES=-DBSDSOCKOPT -DDEBUG -DSRCDIR=\"$(SRCDIR)\"
d41 1
a41 1
DEFINES=-DDEF_ROOT=\"$(DEF_ROOT)\" -DDEF_ADM=\"track\" -DBSDSOCKOPT
a43 2
CFLAGS=$(CDEBUGFLAGS) $(DEFINES) $(INCLUDES)
LINTFLAGS=$(DEFINES) $(INCLUDES)
d46 7
d58 2
a59 1
	   regexp.o regerror.o stash.o error.o lock.o
d67 1
a67 1
	$(LINK.c) -o track $(TRACKOBJ) -ll $(LIBS)
d101 11
a111 12
	install -o root -m  755 track $(LIB_DIR)/bin/track
	install -o root -m  755 nullmail.sh $(LIB_DIR)/bin/nullmail
	install -o root -m 755 calltrack $(LIB_DIR)/bin/calltrack
	install -o root -m  755 trackd $(LIB_DIR)/bin/trackd
	install -o root -m 644 ../man/track.1 $(MAN1_DIR)/track.1
	install -o root -m 644 ../man/permissions.5 $(MAN5_DIR)/permissions.5
	install -o root -m 644 ../man/statfile.5 $(MAN5_DIR)/statfile.5
	install -o root -m 644 ../man/slist.5 $(MAN5_DIR)/slist.5
	install -o root -m 644 ../man/calltrack.1 $(MAN5_DIR)/calltrack.1
	install -o root -m 644 ../man/trackd.8 $(MAN5_DIR)/trackd.8
	-mkdir $(DEF_ROOT) $(DEF_ROOT)/slists $(DEF_ROOT)/stats \
		$(DEF_ROOT)/stamps
@


1.8
log
@major changes, including cb, lint and more careful checking of buffer bounds
@
text
@d1 1
a1 1
# based on:  $Header: /cs/src/track/src/RCS/Makefile,v 1.7 90/08/29 04:00:20 root Exp $
d72 1
a72 1
	echo IGNORE THE WARNINGS ABOUT NON-PORTABLE CHARACTER CLASSES --
@


1.7
log
@added stash.[ch], no SPEED option needed anymore, documented SYS_DIR
need on SunOS3.5 and BSD4.[23] machines.
@
text
@d1 1
a1 1
# based on:  $Header: /nfs/neat/cs/src/track/src/RCS/Makefile,v 1.6 90/07/28 05:30:29 root Exp $
d45 2
a46 2
	   mapname.o except.o copyfile.o comm.o find.o pgcache.o error.o \
	   regexp.o regerror.o stash.o
d48 3
d55 4
d72 1
a72 1
	echo IGNORE THE WARNINGS --
d77 1
a77 2
stamp.o : stamp.c
mapname.o : mapname.c
d81 1
@


1.6
log
@soem improvements - moraes
@
text
@d1 1
a1 1
# based on:  $Header: makefile,v 1.5 88/05/20 02:45:31 moraes Exp $
d19 4
d28 1
a28 1
#DEFINES=-DSPEED -DBSDSOCKOPT -DDEBUG -DSRCDIR=\"$(SRCDIR)\"
d34 1
a34 1
DEFINES=-DDEF_ROOT=\"$(DEF_ROOT)\" -DDEF_ADM=\"track\" -DSPEED -DBSDSOCKOPT
d43 1
a43 1
PROGS= track nullmail calltrack trackd runtrack sleeprand
d45 2
a46 1
	   mapname.o except.o copyfile.o comm.o find.o pgcache.o error.o
a47 1

d82 1
a82 1
	install -o root -m  755 nullmail $(LIB_DIR)/bin/nullmail
a84 2
	install -o root -m  755 runtrack $(LIB_DIR)/bin/runtrack
	install -o root -m  755 sleeprand $(LIB_DIR)/bin/sleeprand
d88 7
a94 4
	install -o root -m 644 ../man/subscriptionlist.5 \
			$(MAN5_DIR)/subscriptionlist.5
	-mkdir $(DEF_ROOT) $(DEF_ROOT)/slists $(DEF_ROOT)/stats
	-cd $(DEF_ROOT); ln -s $(LIB_DIR)/root .; ln -s /tmp locks
d96 12
a107 1
	
d109 1
a109 1
	-rm -f $(PROGS)
d114 10
a123 2
a.out: tg.o pgcache.o
	cc -g tg.o pgcache.o
@


1.5
log
@defining DEBUG now puts proper debugging support so the tester need no
lose sanity. It will use the version of calltrack, trackd, and track in
the source directory.
@
text
@d1 1
a1 1
# based on:  $Header: makefile,v 1.4 88/04/27 21:09:15 moraes Exp $
d17 1
a17 4
SRCDIR=/csri/src/local/track/src
CFLAGS= -g -DSPEED -DDEBUG -DSRCDIR=\"$(SRCDIR)\"
#CFLAGS=-O -DSPEED
CC= cc
d19 20
a38 1
DESTDIR=/usr/local/lib/track/bin
d40 2
d46 2
a47 4
track: track.o misc.o files.o y.tab.o stamp.o \
		mapname.o except.o copyfile.o comm.o find.o
	$(CC) $(CFLAGS) -o track track.o misc.o files.o y.tab.o stamp.o \
		mapname.o except.o copyfile.o comm.o find.o -ll
d49 1
a49 1
	$(CC) $(CFLAGS) -o nullmail nullmail.o
d51 1
a51 1
	$(CC) $(CFLAGS) -o calltrack calltrack.o
d53 1
a53 1
	$(CC) $(CFLAGS) -o trackd trackd.o
d55 1
a55 1
	$(CC) $(CFLAGS) -o sleeprand sleeprand.c
d76 10
a85 9
	install -o root -m  755 track $(DESTDIR)/track
	install -o root -m  755 nullmail $(DESTDIR)/nullmail
	install -o root -m 4755 calltrack $(DESTDIR)/calltrack
	install -o root -m  755 trackd $(DESTDIR)/trackd
	install -o root -m  755 runtrack $(DESTDIR)/runtrack
	install -o root -m  755 sleeprand $(DESTDIR)/sleeprand
	install -o root -m 644 ../man/track.l /usr/man/manl/track.l
	install -o root -m 644 ../man/permissions.5 /usr/man/man5/permissions.5
	install -o root -m 644 ../man/statfile.5 /usr/man/man5/statfile.5
d87 4
a90 1
			/usr/man/man5/subscriptionlist.5
d94 1
a94 1
	-rm -f *.o
d97 3
@


1.4
log
@Updated
@
text
@d1 1
a1 1
# based on:  $Header: makefile,v 1.3 87/02/16 11:41:25 root Exp $
d5 1
d7 13
a19 2
#CFLAGS= -g
CFLAGS=-O -DSPEED
@


1.3
log
@made cleaner
@
text
@d1 7
a7 2
# based on:  $Header: makefile,v 1.1 87/01/17 00:25:52 rayan Exp $
CFLAGS= -g
d11 1
a11 1
PROGS= track nullmail calltrack trackd
d17 1
a17 1
		mapname.o except.o copyfile.o comm.o
d19 1
a19 1
		mapname.o except.o copyfile.o comm.o -ll
d26 2
d44 3
d48 11
a58 4
	install -s -o root -m  755 track $(DESTDIR)/track
	install -s -o root -m  755 nullmail $(DESTDIR)/nullmail
	install -s -o root -m 4755 calltrack $(DESTDIR)/calltrack
	install -s -o root -m  755 trackd $(DESTDIR)/trackd
@


1.2
log
@Change a couple of ../bin's to $(INSDIR).
@
text
@d2 2
d5 2
a6 3
INSDIR=/usr/local
OLDDIR=../ofiles
PROGS= $(INSDIR)/track $(INSDIR)/nullmail $(INSDIR)/calltrack $(INSDIR)/trackd
d11 10
a20 4
$(INSDIR)/track: track.o misc.o files.o y.tab.o  stamp.o mapname.o except.o copyfile.o comm.o
	$(CC) -o track track.o misc.o files.o y.tab.o stamp.o mapname.o except.o copyfile.o comm.o -ll
	-mv  $(INSDIR)/track $(OLDDIR)
	 mv track $(INSDIR)
a22 1
	cc -c y.tab.c
a28 1
	$(CC) -c track.c
a29 1
	$(CC) -c misc.c
a30 1
	$(CC) -c files.c
a31 1
	$(CC) -c stamp.c
a32 1
	$(CC) -c mapname.c
a33 1
	$(CC) -c except.c
a34 1
	$(CC) -c copyfile.c
a35 1
	$(CC) -c comm.c
d37 5
a41 4
$(INSDIR)/nullmail : nullmail.c
	$(CC) -o nullmail nullmail.c
	-mv $(INSDIR)/nullmail $(OLDDIR)
	mv nullmail $(INSDIR)
a42 11
$(INSDIR)/trackd : trackd.c track.h
	$(CC) -o trackd trackd.c 
	-mv -f $(INSDIR)/trackd ../ofiles
	-mv -f trackd $(INSDIR)
$(INSDIR)/calltrack : calltrack.c
	$(CC) -o calltrack calltrack.c
	chmod go-w calltrack
	chmod u+s calltrack
	-mv -f $(INSDIR)/calltrack ../ofiles
	-mv -f calltrack $(INSDIR)

d44 1
a47 3
clobber:
	-rm -f $(INSDIR)/track
	-rm -f $(INSDIR)/nullmail
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
# based on:  $Header: makefile,v 4.0 86/11/05 14:37:07 daniel Rel $
d3 1
a3 1
INSDIR=../bin
d46 2
a47 2
	-mv -f ../bin/trackd ../ofiles
	-mv -f trackd ../bin
d52 2
a53 2
	-mv -f ../bin/calltrack ../ofiles
	-mv -f calltrack ../bin
@
