/* --------------------------------------------------------------- */
/* -- Copyright (c) 1994, 1995 Computer Sciences Department,    -- */
/* -- University of Wisconsin-Madison, subject to the terms     -- */
/* -- and conditions given in the file COPYRIGHT.  All Rights   -- */
/* -- Reserved.                                                 -- */
/* --------------------------------------------------------------- */

/*
 * $Header: /p/shore/shore_cvs/src/examples/Imakefile,v 1.14 1995/05/03 18:09:24 nhall Exp $
 */

SUBDIR_LOCAL = shls stree vas unixfile pscan 

SRC.cvs = \
	Makefile.template Imakefile \
	README README.makefiles \
	local.rules local.tmpl

#ifdef GNU_MAKE

HOLDSPACE =
COMMANDS_MINUS_DEPEND = $(SUBDIRCOMMANDS:$(HOLDSPACE) depend= )
COMMANDS_MINUS_ALL = $(COMMANDS_MINUS_DEPEND:$(HOLDSPACE) tags= )
do_subdirs($(COMMANDS_MINUS_ALL), $(SUBDIR_LOCAL))
SUBDIRCOMMANDS=
SUBDIR=

#else

SUBDIR=$(SUBDIR_LOCAL)
depend := SUBDIR = 
tags := SUBDIR = 

#endif /* GNU_MAKE */

SRCS=

all_local:
	gcc -v

install_copy(examples, README)


runtests:
	@for i in `echo $(SUBDIR)`; do \
		echo "test subdir " $$i; \
		if(test -d $$i -a -f $$i/testscript) then \
			cd $$i;\
			echo "cwd=" `pwd`;\
			make -f Makefile.template clean; \
			make -f Makefile.template INSTALL_DIR=/p/shore/installed.new/nodebug;\
			echo "NODEBUG" `pwd`;\
			testscript;\
			make -f Makefile.template clean; \
			make -f Makefile.template INSTALL_DIR=/p/shore/installed.new/debug;\
			echo "DEBUG" `pwd`;\
			testscript;\
			cd ..;\
		fi;\
	done

