# rcsid $Id: Makefile,v 1.2 1995/08/30 23:22:41 smp Exp smp $

# makefile for remote control utility functions

PACKAGE = util
DIR = util
SUBDIRS = misc/

FILES = \
	Makefile \
	README \
	COPYRIGHT \
	TODO

EXECS = 


.PHONY: $(SUBDIRS)


.PHONY : all
all :
	@$(foreach d,$(SUBDIRS),cd $(dir $(d)); $(MAKE); cd ..;)


.PHONY : install
install :
	@$(foreach d,$(SUBDIRS),cd $(dir $(d)); $(MAKE) install; cd ..;)


.PHONY : clean
clean :
	rm -f $(PACKAGE).tarlist $(PACKAGE).tar
	$(foreach d,$(SUBDIRS),cd $(dir $(d)); $(MAKE) clean; cd ..;)

.PHONY : ci
ci :
	ci -l Makefile README

.PHONY : ciall
ciall :
	@$(MAKE) ci
	$(foreach d,$(SUBDIRS),cd $(dir $(d)); $(MAKE) ci; cd ..;)

.PHONY : list
list :
	@$(foreach f,$(FILES),echo $(PPATH)$(f);)

.PHONY : tarlist
tarlist :
	@$(MAKE) -s PPATH="util/" list > $(PACKAGE).tarlist
	@$(foreach d,$(SUBDIRS),cd $(dir $(d));\
		$(MAKE) -s PPATH="util/" list >> ../$(PACKAGE).tarlist; cd ..;)

.PHONY : tar
tar :
	@$(MAKE) -s tarlist
	@cd ..;tar -cvf $(DIR)/$(PACKAGE).tar `cat $(DIR)/$(PACKAGE).tarlist`

.PHONY : setup
setup :
	@echo "no setup necessary for utils"
