#####
#	Steps to bitnet.transport
#	1) Should make old copies of data files (make copy)
#	2) Get the latest CADOMAIN.NAMES and XMAILER.NAMES
#	          files and make sure that toronto.names is correct.
#	3) Make sure that mastermunge.exception.sh is up to date.
#	4) Run 'make' and voila bitnet.transport file.
#	5) Make sure that there are no major errors reported from the 'make'.
#
#####
#  make - default is 'all' which is  bitnet.transport and consistcheck.
#	make bitnet.transport - runs mastermunge.sh which makes
#			 bitnet.transport file.
#	make consistcheck - runs mastercheck.sh which does some consistency
#			 check. Will make bitnet.transport if it is not
#			 up to date.
#	make copy - runs mastercopy.sh that agelog data files.
#	make clean - remove some temporary files.
#	
#
#  Some shell scripts that are used by scripts listed above:
#  checksysnames.sh - list multiple node entries in SYSNAMES
#  comparetransportvssysnames.sh - list undefined routes that are need for nodes
#			in bitnet.transport
#  format.sh* - used for formatting output for transport files
#  mastermunge.exception.sh* - contains common exception list
#  munge.sh* - generic script for munging *.NAMES files
#
#		
#		johncw 8908
#
#---------------------------------------
#
#to listserv@bitnic get xmailer names
#to netserv@canada01 get xmailer names
#to netserv@canada01 get cadomain names
#####
DIR=.

all: bitnet.transport consistcheck

##### bitnet.transport
bitnet.transport: XMAILER.NAMES CADOMAIN.NAMES toronto.names
	@mastermunge.sh

#XMAILER.NAMES: $(DIR)/XMAILER.NAMES
#	rm -f $@.Z
#	compress $@
#	cp $(DIR)/$@ .

#CADOMAIN.NAMES: $(DIR)/CADOMAIN.NAMES
#	rm -f $@.Z
#	compress $@
#	cp $(DIR)/$@ .

toronto.names:
	@echo -n "Missing file " $@

##### consistcheck
consistcheck: .mastercheck

.mastercheck: bitnet.transport
	@mastercheck.sh
	@touch $@

##### copy
copy: .mastercopy

.mastercopy:
	@mastercopy.sh
	@touch $@

##### clean
clean:
	rm -f xmailer.names.out cadomain.names.out make.log make.out
