#	This is the makefile supports the 
#	targets: it, install, clean, bare and depend.  
#
TARGETS = it install clean bare depend

# Support for all the targets
# ls and awk is used to generate the list of directories

$(TARGETS) :
	@-X=`ls -rF | grep -v libsecure |\
	awk '(substr($$1, length($$1), 1) == "/")\
		{printf "%s ", substr($$1, 0, length($$1)-1);}'`;\
	for i in libsecure $$X; do\
		if [ -f $$i/Makefile ]; then \
			cd $$i;\
			if make $@; then\
				echo;\
			else\
				break;\
			fi;\
			cd ..;\
			echo;\
		fi;\
	done

# When baring clean out the current directory as well
bare	: reset
reset	:
	@echo baring `pwd`
	rm -f *% *~ *.bak
	@echo
