# GNU Makefile
# to copy new files to staging directory
# and touch appropriate files 
#
# 12/05/97 C. Ludescher
#  
#
allfiles = $(filter-out %~,$(filter-out %CVS,$(filter-out %orig,$(shell echo $(SRC)/*))))
files1 = $(notdir $(allfiles))
files = $(filter-out Make%, $(filter-out Xtc,$(filter-out vaxport%, $(files1))))
 
all: chkdir copy     
# create marker and vaxport directories
chkdir:
	@echo FILES : $(files)
	@if test ! -d $(MARK); then \
		mkdir $(MARK); fi
	@if test ! -d $(DEST); then \
		mkdir $(DEST); fi    

# copy / touch "newer" files
copy: $(foreach file,$(files),$(MARK)/$(file))
$(MARK)/%: $(SRC)/%
	@cp $< $(DEST)/$(shell  echo $* | tr 'A-Z' 'a-z')
	@touch $@


