#
#	$RCSfile: makefile.dist,v $
#	$Revision: 0.16 $
#	$Author: tony $
#	$Date: 1993/12/17 13:13:59 $
#
# This make file will unpack various tools into subdirectories and
# make them according to TOP.config.
#
####################################################################
# DO NOT EDIT ANYTHING IN HERE
####################################################################

DIST=		prcheck.shar prtraceroute.shar prpath.shar
SRC=		prtraceroute prcheck prpath
CONTRIB=	ciscot


all:;
	@echo "What do you want to make ?"; \
	echo "Type \"make unpack\" to unpack tools"; \
        echo "Type \"make tools\" to make tools"; \
	echo "Type \"make other-unpack\" to unpack other useful things"; \
	echo "Type \"make other\" to make other useful things"

unpack:;	-@for i in $(DIST); \
			do (j="`echo $$i | sed -e "s/\.shar//"`"; \
			    echo "mkdir $$j"; \
			    mkdir $$j; \
			    echo "cp $$i $$j"; \
			    cp $$i $$j; \
			    echo "cd $$j";\
			    cd $$j;\
			    echo "sh $$i -c"; \
			    sh $$i -c; \
			    echo "rm $$i"; \
			    rm $$i); \
			done

clean: clean-shar clean-up

clean-shar:;
		@for i in $(DIST); \
			do (echo "rm -rf $$i";\
			rm -rf $$i);\
		done

clean-up:;	
		@for j in $(SRC); \
			do (echo "cd $$j; make  clean"; \
			cd $$j; make clean); \
                done

test:	
	-@for i in $(SRC); \
		do ($$i/$$i); \
	done

tools: TOP.config
		-@for i in $(SRC); \
                    do (cd $$i; \
                    /bin/sh ../topmake $(MFLAGS) DEP=../TOP.config ); \
		done

other-unpack: contrib
		-mkdir contrib
		-(cd contrib ; tar xvf ../contrib.tar ; make unpack)
			

other: TOP.config
		-@for i in $(CONTRIB); \
		do (cd contrib/$$i; \
		/bin/sh ../../topmake.1 $(MFLAGS) DEP=../../TOP.config ); \
		done

other-install:;
		-@for i in $(CONTRIB); \
		do (cd contrib/$$i; \
                /bin/sh ../../topmake.1 $(MFLAGS) DEP=../../TOP.config install); \
                done

other-clean:;
		-@for i in $(CONTRIB); \
			do (cd contrib/$$i; make clean); \
		done

install:;	@for i in $(SRC); \
			do (echo "cd $$i; /bin/sh ../topmake install"; \
			cd $$i; /bin/sh ../topmake DEP=../TOP.config install); \
		done

contrib: 	

