DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T m

⟦2324ae870⟧ TextFile

    Length: 3836 (0xefc)
    Types: TextFile
    Names: »make.v8«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec8/pathalias/make.v8« 

TextFile

#!/bin/make -f
# pathalias -- by steve bellovin, as told to peter honeyman

# if you can't or don't intend to use dbm files, don't bother with makedb
DBM = -ldbm
# or if you roll your own ...
# DBM = dbm.o

CC = cc -g -p
CFLAGS = 
LDFLAGS =
YFLAGS = -d

OBJ = addlink.o addnode.o extern.o local.o main.o mapit.o mapaux.o mem.o parse.o printit.o
HDRS = def.h config.h
CSRC = addlink.c addnode.c extern.c local.c main.c mapit.c mapaux.c mem.c printit.c
SRC = $(CSRC) parse.y
LSRC = $(CSRC) parse.c

pathalias: & $(OBJ)
	$(CC) $(LDFLAGS) $(OBJ) -o pathalias

all: pathalias makedb

$(OBJ):	def.h

# if touch had a proper exit status, this would work...
def.h: config.h
	-touch -c def.h
	get -s sccs/s.def.h

parse.c: parse.y def.h
	$(YACC) $(YFLAGS) parse.y
	mv y.tab.c parse.c

makedb: makedb.o
	$(CC) makedb.o $(DBM) -o makedb

makedb.o: config.h

clean:
	rm -f *.o y.tab.? parse.c

tags: $(SRC) $(HDRS) makedb.c
	ctags -w $^

bundle: README CHANGES pathalias.1 Makefile ${HDRS} ${SRC} makedb.c make.v8
	@bundle $^

bundle1: README CHANGES pathalias.1 Makefile def.h config.h addlink.c
	@bundle $^

bundle2: addnode.c extern.c local.c main.c mapit.c
	@bundle $^

bundle3: mapaux.c mem.c printit.c parse.y makedb.c make.v8
	@bundle $^

make.v8: makefile
	@cp makefile make.v8

lint:	$(LSRC)
	lint $(CFLAGS) $(LSRC)
	lint makedb.c

# v8 make rules for sccs
%: & sccs/s.%
	get -s sccs/s.$%

# the remainder is site specific and can be deleted.  it doesn't have
# to be this complicated, but a makefile tends to swell after three or
# four years.

# hosts running delivermail
DELIVERMAIL = tilt

# hosts running sendmail
SENDMAIL = quirky flakey yoyo panic

# all neighbors
NEIGHBORS = princeton ${DELIVERMAIL} ${SENDMAIL}

# including me
SITES = down ${NEIGHBORS}

PATHFILES = paths/[^.]* paths.bell/[^.]* paths.internet/[^.]* path.map/[^.]*

# from observation and rumor.  avoid like the plague
DEADHOSTS = -d tucc -d netword -d harvard -d whuxlb -d conejo -d shasta -d su-shasta -d caip

# -d philabs!prlb2 to force the seismo transatlantic link
DEADLINKS = -d siemens!uiucdcs -d allegra!rcalabs -d amdcad!chi -d allegra!olympus -d cbosgd!genrad -d philabs!prlb2 -d ubbs!ncoast -d .edu!arizona

DEADNETS = -d internet

DEAD = ${DEADHOSTS} ${DEADLINKS} ${DEADNETS}

# map output (input, really) to lower case.  dead links.
ARGS = -i

paths:	${SITES}

down:	paths/princeton paths/local
	time -v pathalias -v ${ARGS} -l down $(DEAD) $(PATHFILES) 2>ERRORS > down.new
	sort -o down down.new

# DELIVERMAIL and SENDMAIL have exactly the same links as down, so turn
#	down	%s
#	up	up!%s
# into
#	up	%s
#	down	down!%s

${DELIVERMAIL}:	down
	sed -e 's/^down	%s$$/$@	%s/' \
	    -e 's/^$@	$@!%s$$/down	down!%s/'\
	    -e 's/^/0	/' down | sort > $@
	
# reorder the output and generate phoney costs for sendmail neighbors
${SENDMAIL}: down
	sed -e 's/^down	%s$$/$@	%s/' \
	    -e 's/$@	$@!%s$$/down	down!%s/' \
	    -e 's/	/	0	/' down | sort > $@

# install everywhere
shipit: ${NEIGHBORS}
	for i in ${SENDMAIL} princeton; do cp $$i /n/$$i/usr/local/lib/pathaliases; done
	for i in ${DELIVERMAIL}; do cp $$i /n/$$i/usr/local/lib/pathaliases; $$i newaliases done
	touch shipit

# reorder the output for princeton/sendmail/uubang and generate phoney costs.
# handle one or two special cases.
princeton: down
	sed -e 's/	princeton!/	/' \
	    -e 's/^princeton	%s$$/down	down!%s/' \
   	    -e 's/^down	%s$$/princeton	%s/' \
	    -e 's/^asburypark	/&down!/' \
	    -e 's/^puts	/&down!/' \
	    -e 's/	/	0	/' down |sort > princeton

# desperation debugging -- examine the costs.
costs:
	pathalias -vci ${DEAD} -l down $(PATHFILES) > down.costs 2>ERRORS

# make one BIG file.  a BIG bad idea.
cat:
	cat $(PATHFILES) > CAT

# make a pathparse database.  -g flag is undocumented.
edges: down
	pathalias -i -g edges $(PATHFILES) >/dev/null
	makedb edges down