####################################################################
#   Copyright (c) 1996 NPACT Working Group. You may copy,          #
#   distribute, and modify it freely as long as you preserve this  #
#   copyright and permission notice.                               #
#                                                                  #
#   NPACT Working Group is a joint force of                        #
#      NPAC at Syracuse University,                                #
#      PACT at Harbin Institute of Technology, and                 #
#      PACT at Peking University                                   #   
####################################################################

SHELL=/bin/sh

VERSION = @VERSION@

srcdir      = @srcdir@
top_srcdir  = @top_srcdir@

SUBDIR = examples syntax semantics

VPATH = .:${srcdir}

all: stamp	

stamp:
	@echo "Making stamp"
	@echo "Package verion number: "$(VERSION) > stamp
	@echo "Package making time: "`date` >> stamp
	@echo "Package configure cache information: " >> stamp
	@sed '/^#.*$$/d' ../config.cache >> stamp

check:
	@echo "Comparing current package information with recorded one"
	diff ${srcdir}/stamp.rec stamp
	@echo "Recursively checking subdir:"${SUBDIR}
	@for i in ${SUBDIR}; \
	do (cd $$i; $(MAKE) "MAKE=$(MAKE)" -i check); done

clean:
	@for i in ${SUBDIR}; \
	do (cd $$i; $(MAKE) "MAKE=$(MAKE)" clean); done
	rm -f stamp

record:
	@for i in ${SUBDIR}; \
	do (cd $$i; $(MAKE) "MAKE=$(MAKE)" record); done
	cp stamp stamp.rec

