# Generated automatically from Makefile.in by configure.
# FileName	[ Makefile.in ]
#
# PackageName	[ aSMV ]
#
# Synopsis	[ Package-wide Makefile ]
#
# Description	[ This file requires GNU's make program.
#		  Run "configure" to generate the Makefile, or use
#		  "config.status" (created by configure) to regenerate the
#		  Makefile after modifying this file. ]
#
# SeeAlso	[configure.in]
#
# Author	[Marco Roveri]
#
# Copyright	[Copyright (c) 1998 by ITC-IRST and Carnegie Mellon University.
# 	All Rights Reserved.  This software is for educational purposes only.
# 	Permission is given to use, copy, modify, and distribute this software
# 	and its documentation provided that this introductory message is not
# 	removed and no monies are exchanged. No guarantee is expressed or
# 	implied by the distribution of this code. 
# 	Send bug-reports and/or questions to: nusmv@irst.itc.it]
#
#
# Revision	[$Id:$]

# Default target:

default : all

#----------------------------------------------------------------------
# The list of packages to compile -- change this if you're not compiling
# all of aSMV
#----------------------------------------------------------------------
PKGS = parser utils node dd cmd sm opt compile mc ltl img debug abs

#----------------------------------------------------------------------
# More package stuff
#----------------------------------------------------------------------

ALL_PKGS = parser utils node dd cmd sm opt compile mc ltl img debug

# Generate the list of all packages NOT in the PKGS list

MISSING_PKGS = $(filter-out $(PKGS), $(ALL_PKGS))

#----------------------------------------------------------------------
# Packages Documented
#----------------------------------------------------------------------

DOC_PKGS = parser node dd cmd sm opt compile mc ltl img debug abs

#----------------------------------------------------------------------
# For disabling echoing of commands
#----------------------------------------------------------------------
.SILENT:

#----------------------------------------------------------------------
# For safety
#----------------------------------------------------------------------

SHELL = /bin/sh
.SUFFIXES:

#----------------------------------------------------------------------
# The name of the product and its version
#----------------------------------------------------------------------

PRODUCT = aSMV
VERSION = 1.0.1

# Compile and version information printed by the compiler
#
# CUR_DATE and CUR_VER are strings surrounded by double quotes that contain
# spaces, e.g., "aSMV release 1.0"

VERDATE = -DCUR_DATE="\"$(shell date)\"" -DCUR_VER="\"$(PRODUCT) release $(VERSION)\""

#----------------------------------------------------------------------
# Directories for everything
#----------------------------------------------------------------------

# Directory in which to install architecture-independent files
# Set by ./configure --prefix=...
prefix =	/usr/local

# Directory in which to install architecture-dependent files
# Set by ./configure --exec-prefix=...
exec_prefix =	${prefix}

# Directory where master source files reside (used with MISSING_PKGS)
# Defaults to srcdir, but may be overridden with
# ./configure --srcdir=
master_srcdir =	.

# Directory where local source files (for editing) reside (used with PKGS)
# Set by ./configure --with-local-srcdir=
local_srcdir =	.

# Directory where local source files reside for RCS purposes
aSMV_USER_DIR =	$(HOME)/src/nusmv/common

# Directory in which to install binaries
bindir =	$(exec_prefix)/bin

# Directory in which to install man pages
mandir =	$(exec_prefix)/man

# Directory in which to install libraries
libdir =	$(exec_prefix)/lib

# Directory in which to install headers
includedir =	$(prefix)/include

# Directory in which to install architecture-independent library files
datadir = 	$(prefix)/share/nusmv

# Directory where object (and other generated) files will be placed
# during the build
objectdir =	obj

# Directory where documentation will be placed during the build
docdir =	$(master_srcdir)/doc
htmldocdir =	$(docdir)/html
helpdir =	$(master_srcdir)/share/help
usrmandir =     $(docdir)/user-man

# Directories to search for aSMV library files
# Set by ./configure --with-nusmv-libdir=
nusmvlibdir =	.

# Name of the library to create
LIBRARY =	$(objectdir)/lib$(PRODUCT).a

# Directories to search for cudd .h files (space-separated)
cuddlibdir =	../cudd-2.2.0.1/lib

# Directories to search for cudd .h files (space-separated)
cuddincdir =	../cudd-2.2.0.1/include

#----------------------------------------------------------------------
# The following are set by the configure script
#----------------------------------------------------------------------

AC_FLAGS =	-DSOLARIS=1  -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_LIBBSD=1 -DHAVE_LIBREADLINE=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_TERMIOS_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_SYS_SIGNAL_H=1 -DHAVE_BSD_SGTTY_H=1 -DIOCTL_WITH_TERMIOS=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DRETSIGTYPE=void -DHAVE_GETTIMEOFDAY=1 -DHAVE_STRCHR=1 -DHAVE_STRSTR=1 -DHAVE_SETVBUF=1 -DHAVE_GETENV=1 -DHAVE_UNLINK=1 
LIBDIRS =	
RANLIB =	ranlib
CC =		gcc
LINKER =	gcc
#
# Define the linker for the executable with "memory_profile" activated
#
PLINKER =       
CFLAGS =	-g
CUDDLIBS =	-lcudd -lmtr -lst -lutil
LIBS =		-lm -lbsd  -lreadline -ltermcap #-lfl
YACC =		bison -y
LEX =		flex
NAWK =		gawk
INSTALL =	/usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA =	${INSTALL} -m 644

#----------------------------------------------------------------------
# List of all examples to include in the distribution
#----------------------------------------------------------------------
EXAMPLES = abp example_irst prod-cons tcas guidance production-cell \
	   brp queue deadlock p-queue reactor example_cmu pci smv-dist

#----------------------------------------------------------------------
# List of all files in the doc directory
#----------------------------------------------------------------------

DOCUMENTATION = man user-man html

#----------------------------------------------------------------------
# List of all files in the share directory
#----------------------------------------------------------------------

SHAREFILES = master.nusmvrc

HELPFILES = $(notdir $(wildcard $(helpdir)/*))

#----------------------------------------------------------------------
# Include the make templates from all the packages
#
# Each of these templates (e.g., array/array.make) should contains lines
# of the form
#
# CSRC += source1.c source2.c
# HEADERS += header1.h header2.h
# LEXSRC += file1.l
# YACCSRC += file2.y
# GENERATEDCSRC += ctlpLex.c ctlpRead.c
#----------------------------------------------------------------------

MAKEINCLUDES = $(foreach package, $(PKGS), \
	$(local_srcdir)/src/$(package)/$(package).make)

include $(MAKEINCLUDES)

OBJECTS = $(addprefix $(objectdir)/,$(CSRC:.c=.o) $(GENERATEDCSRC:.c=.o))

#----------------------------------------------------------------------
# Include the dependencies in each of the packages directories. The include
# directive does not produce an error if the dependency file does not
# exists
#
#----------------------------------------------------------------------

DEPENDENCIES = $(foreach package, $(PKGS), \
	$(local_srcdir)/src/$(package)/$(package).d)

-include $(DEPENDENCIES)

#----------------------------------------------------------------------
# Include and library paths
#
# INCLUDEDIRS looks like " -I/projects/smv/ ..."
# LIBRARYDIRS looks like " -L/projects/smv/ ..."
#----------------------------------------------------------------------

INCLUDEDIRS =  $(addprefix -I,$(cuddincdir))\
		$(foreach package, $(PKGS), -I$(local_srcdir)/src/$(package)) \
		$(foreach package, $(MISSING_PKGS), \
		-I$(master_srcdir)/src/$(package)) \
		-I$(objectdir)

LIBRARYDIRS = $(addprefix -L,$(nusmvlibdir)) $(addprefix -L,$(objectdir)) \
		$(addprefix -L,$(cuddlibdir)) $(LIBDIRS)

#----------------------------------------------------------------------
# Build VPATH so make looks for source and object files in each of the PKG
# directories as well as the object directory
#
# VPATH looks like /projects/smv:/projects/cudd/: ...
#----------------------------------------------------------------------

VPATH = $(local_srcdir):$(master_srcdir):$(addprefix :$(local_srcdir)/src/,$(PKGS)) \
	:$(addprefix :$(master_srcdir)/src/,$(MISSING_PKGS)):$(objectdir) \
	:$(local_srcdir)/share

#----------------------------------------------------------------------
# Implicit rules
#----------------------------------------------------------------------

# For compiling a source file into the object directory

$(objectdir)/%.o : %.c
	@echo Compiling file $< into $@
	umask 2 ; $(CC) -c $(CFLAGS) $(AC_FLAGS) $(VERDATE) \
		-DNAWK=\"$(NAWK)\" -DLIBRARY=\"$(datadir)\" \
		$(INCLUDEDIRS) \
	-o $@  $<

#----------------------------------------------------------------------
# Rule to produce the function map for the memory_profile command
#----------------------------------------------------------------------

FMAPFILE = .fmap
functionmap: $(CSRC)
	$(aSMV)/common/share/createfunctionmap $^ >$(FMAPFILE)

#----------------------------------------------------------------------
# Rule to produce/delete the dependency file for every package
#----------------------------------------------------------------------
AUXVAR = $(VPATH)
dependencies:
	@for pkg in $(PKGS) ; do \
		$(MAKE) --no-print-directory \
			-f $(master_srcdir)/helpers/dependency.make \
			YACC="$(YACC)" LEX="$(LEX)" \
			CFLAGS="$(CFLAGS)" AC_FLAGS="$(AC_FLAGS)" \
			INCLUDEDIRS="$(INCLUDEDIRS)" objectdir=$(objectdir) \
			PKGNAME=$(local_srcdir)/src/$$pkg/$$pkg \
			vpath="$(AUXVAR)" \
			$(local_srcdir)/src/$$pkg/$$pkg.d ; \
	done

cleandependencies:
	rm -f $(local_srcdir)/src/*/*.d	

#----------------------------------------------------------------------
# Main rules:
#----------------------------------------------------------------------

all : $(objectdir) src/ltl/ltl2smv/ltls2sm $(PRODUCT) 

ifdef PLINKER
$(PRODUCT)-mp : $(LIBRARY)
	umask 2 ; $(PLINKER) -o $(PRODUCT)-mp $(OBJECTS) \
		`purify -printhomedir`/libpurify_stubs.a \
		$(LIBRARYDIRS) -l$(PRODUCT) $(CUDDLIBS) $(LIBS)

exe-mp : $(objectdir) $(OBJECTS)
	$(PLINKER) -o $(PRODUCT)-mp $(OBJECTS) \
		`purify -printhomedir`/libpurify_stubs.a \
		$(LIBRARYDIRS) -l$(PRODUCT) $(CUDDLIBS) $(LIBS)
endif

$(PRODUCT) : $(objectdir) $(LIBRARY) 
	echo Creating $(PRODUCT)
	umask 2 ; $(LINKER) -o $(PRODUCT) ./obj/debug.o \
		$(LIBRARYDIRS) -l$(PRODUCT) $(CUDDLIBS) $(LIBS)


exe : $(objectdir) $(OBJECTS)
	$(LINKER) -o $(PRODUCT) $(OBJECTS) \
		$(LIBRARYDIRS) $(CUDDLIBS) $(LIBS)

$(LIBRARY): $(objectdir) $(OBJECTS)
	@echo Creating library archive $(LIBRARY)
	rm -f $(LIBRARY)
	umask 2 ; ar cr $(LIBRARY) $(OBJECTS)
	$(RANLIB) $(LIBRARY)
# originally it was: umask 2 ; ar cq $(LIBRARY) $(OBJECTS)
src/ltl/ltl2smv/ltls2sm:
	@echo Compiling the LTL2SMV utility
	@cd src/ltl/ltl2smv && $(MAKE) --no-print-directory

$(objectdir) :
	- umask 2 ; mkdir $(objectdir)


#----------------------------------------------------------------------
# Rules for installation
#----------------------------------------------------------------------

install : $(LIBRARY) $(PRODUCT) installdirs
	@echo Installing $(PRODUCT) into $(bindir)/$(PRODUCT)
	$(INSTALL_PROGRAM) $(PRODUCT) $(bindir)/$(PRODUCT)
	@echo Installing ./src/ltl/ltl2smv/ltl2smv into $(bindir)/ltl2smv
	$(INSTALL_PROGRAM) ./src/ltl/ltl2smv/ltl2smv $(bindir)/ltl2smv
	@echo Installing gui/xaSMV into $(bindir)/xaSMV
	$(INSTALL_PROGRAM) gui/xaSMV $(bindir)/xaSMV
	@echo Installing $(LIBRARY) into $(libdir)/$(LIBRARY)
	$(INSTALL_DATA) $(LIBRARY) $(libdir)/$(LIBRARY)
	@echo Installing sharefiles....
	@for file in $(SHAREFILES) ; do \
		echo "Installing $(datadir)/$$file"; \
		$(INSTALL_DATA) $(master_srcdir)/share/$$file \
			$(datadir)/$$file; \
	done
	@echo Installing man page
	$(INSTALL_DATA) $(master_srcdir)/doc/man/nusmv.1 $(mandir)/nusmv.1
	@echo Installing helpfiles...
	@for file in $(HELPFILES) ; do \
	echo "Installing $(datadir)/help/$$file"; \
		$(INSTALL_DATA) $(master_srcdir)/share/help/$$file \
			$(datadir)/help/$$file; \
	done
	@echo Installing header files
	@for header in $(HEADERS); do \
		echo "Installing $(includedir)/$$header"; \
		$(INSTALL_DATA) $(master_srcdir)/src/*/$$header \
			$(includedir)/$$header; \
	done

uninstall :
	@echo Removing $(bindir)/$(PRODUCT)
	rm -f $(bindir)/$(PRODUCT)
	@echo Removing $(bindir)/ltl2smv
	rm -f  $(bindir)/ltl2smv
	@echo Removing $(libdir)/$(LIBRARY)
	@echo removing $(bindir)/xaSMV
	rm -f $(bindir)/xaSMV
	@echo Removing $(libdir)/$(LIBRARY)
	rm -f $(libdir)/$(LIBRARY)
	@echo Removing Sharefiles
	@for file in $(SHAREFILES) ; do \
		echo "Removing $(datadir)/$$file"; \
		rm -f $(datadir)/$$file; \
	done
	@echo Removing man page
	rm -f $(mandir)/nusmv.1
	@echo Removing Helpfiles
	@for file in $(HELPFILES) ; do \
		echo "Removing $(datadir)/help/$$file"; \
		rm -f $(datadir)/help/$$file; \
	done
	@echo Removing header files
	@for header in $(HEADERS); do \
		echo "Removing $(includedir)/$$header"; \
		rm -f $(includedir)/$$header; \
	done

installdirs :
	$(master_srcdir)/helpers/mkinstalldirs $(bindir) $(libdir) \
	$(mandir) $(includedir) $(datadir) $(datadir)/help

#----------------------------------------------------------------------
# Perform regression test on the examples 
#----------------------------------------------------------------------

check : $(PRODUCT)
	$(master_srcdir)/helpers/regression_test $(master_srcdir) examples/smv-dist

rcheck : $(PRODUCT)
	$(master_srcdir)/helpers/regression_test $(master_srcdir) examples

#----------------------------------------------------------------------
# Distribution-related definitions
#----------------------------------------------------------------------

DISTRIBUTION = $(PRODUCT)-$(VERSION)

# Directories to include in the distribution file
DISTDIRS = src share helpers share/help obj doc examples gui\
	$(addprefix doc/,$(DOCUMENTATION)) \
	$(addprefix examples/,$(EXAMPLES)) $(addprefix src/,$(PKGS)) \
	src/ltl/ltl2smv src/ltl/ltl2smv/examples

# Build/install helper files
HELPERS = $(addprefix helpers/, \
	install-sh mkinstalldirs dependency.make regression_test)
DISTFILES = README INSTALL \
	configure configure.in Makefile.in $(HELPERS) \
	$(CSRC) $(HEADERS) $(LEXSRC) $(YACCSRC) $(MAKEINCLUDES) \
	$(foreach example, $(EXAMPLES), $(wildcard examples/$(example)/*)) \
	$(foreach doc_d, $(filter-out user-man, $(DOCUMENTATION)), $(wildcard doc/$(doc_d)/*)) \
	doc/user-man/nusmv.ps \
	gui/xaSMV \
	$(addprefix share/,$(SHAREFILES)) \
	$(addprefix share/help/,$(HELPFILES)) \
	$(wildcard src/ltl/ltl2smv/*.c) \
	$(wildcard src/ltl/ltl2smv/*.h) \
	$(wildcard src/ltl/ltl2smv/*.l) \
	$(wildcard src/ltl/ltl2smv/*.y) \
	$(wildcard src/ltl/ltl2smv/Makefile) \
	$(wildcard src/ltl/ltl2smv/examples/*)

#----------------------------------------------------------------------
# Rules for making a distribution file
#----------------------------------------------------------------------

dist : $(DISTRIBUTION).tar.gz

$(DISTRIBUTION).tar.gz : $(filter-out %/CVS,$(DISTFILES))
	rm -rf $(DISTRIBUTION)
	umask 2 ; mkdir $(DISTRIBUTION)
	for dir in $(DISTDIRS); do \
	  umask 2 ; mkdir $(DISTRIBUTION)/$$dir; \
	done
	@echo "Copying distribution files"
	@for file in $^; do \
	  echo "  $$file"; \
	  cp -p $(master_srcdir)/$$file $(DISTRIBUTION)/$$file; \
	done
	- chmod -R a+r $(DISTRIBUTION)
	- chmod -R u+w $(DISTRIBUTION)
	mv $(DISTRIBUTION) nusmv-$(VERSION)
	tar cf - nusmv-$(VERSION) | gzip > $(DISTRIBUTION).tar.gz
	rm -rf nusmv-$(VERSION)

#----------------------------------------------------------------------
# Rules for rebuilding the configure file and Makefile
#----------------------------------------------------------------------

${master_srcdir}/configure : configure.in
	cd ${master_srcdir} && autoconf

config.status : configure
	./config.status --recheck

Makefile : Makefile.in config.status
	@echo "The master Makefile.in has been changed:"
	@echo "run config.status"
	@echo "Warning: This will overwrite any local Makefile modifications"

#----------------------------------------------------------------------
# Rules for cleaning
#----------------------------------------------------------------------

clean mostlyclean :
	echo Cleaning directories
	rm -rf examples/*/result examples/*/result_diff \
		obj/* $(LIBRARY) $(PRODUCT) include \
		$(foreach bddpkg, $(BDDPKGS), $(PRODUCT)-$(bddpkg))
	- cd src/ltl/ltl2smv && $(MAKE) clean

distclean : clean
	echo Cleaning distribution
	rm -f Makefile config.status config.cache config.log

#----------------------------------------------------------------------
# Rule for performing a lint-like check on the source code
#----------------------------------------------------------------------

check_code : $(CSRC)
	@rm -f *.o_checkcode
	@for file in $^; do \
	  echo "------------------------ Checking $$file"; \
	  gcc -c $(CFLAGS) $(AC_FLAGS) $(VERDATE) $(INCLUDEDIRS) \
		-Wall -Wno-comment -o obj/checkcode_output.o $$file; \
	  rm -f obj/checkcode_output.o; \
	done
	@rm -f *.o_checkcode

#----------------------------------------------------------------------
# Rules for generating the documentation and command help files
# for all the packages
#----------------------------------------------------------------------

allDoc : cleandoc doc indices commandText userMan

doc : $(htmldocdir)
	for pkg in $(DOC_PKGS); do \
		umask 2 ; extdoc --html=$(htmldocdir) $(local_srcdir)/src/$$pkg/$$pkg; \
	done

indices : $(htmldocdir)
	echo Creating documentation index
	umask 2 ; extindex $(htmldocdir)

commandText : $(helpdir)
	for file in $(htmldocdir)/*Cmd.html ; do \
		echo Converting $$file ; \
		umask 2 ; lynx -dump $$file > $(helpdir)/`basename $$file .html`.txt ; \
	done

userMan : $(usrmandir)
	@cd $(usrmandir) && $(MAKE) --no-print-directory

cleandoc :
	echo Cleaning doc/html directory
	-rm -f $(htmldocdir)/*.html
	echo Cleaning share/help directory
	-rm -f $(helpdir)/*Cmd.txt
	@cd $(usrmandir) && $(MAKE) clean

$(usrmandir) :
	- umask 2 ; mkdir $(usrmandir)

$(htmldocdir) :
	- umask 2 ; mkdir $(htmldocdir)

$(helpdir) :
	- umask 2 ; mkdir $(helpdir)

#----------------------------------------------------------------------
# RCS rules
#----------------------------------------------------------------------
aSMV             = /afrodite1/modelli/roveri/nusmv/nusmv
RCSFILES        = $(CSRC) $(HEADERS) $(LEXSRC) $(YACCSRC) $(MAKEINCLUDES)
RCSDIR          = $(aSMV)/../rcsRoot/common
aSMV_SRC_DIR     = $(aSMV)/common

# check in user modified files (co -u puts an updated copy in central area)
rcs_ci: $(RCSFILES)
	@for file in $^; do\
		(ci -u $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                   $(RCSDIR)/$$file,v;\
                 co -u $(aSMV_SRC_DIR)/$$file $(RCSDIR)/$$file,v)\
	done

# check out files for modification
rcs_co: $(RCSFILES)
	@for file in $^; do\
		(co -l $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                   $(RCSDIR)/$$file,v) \
	done

# diff between the latest RCS versions and the user modified files	
rcs_diff: $(RCSFILES)
	for file in $^; do\
		(rcsdiff $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                     $(RCSDIR)/$$file,v) \
	done

# search for RCS identifier fields in latest RCS versions
rcs_ident: $(RCSFILES)
	@for file in $^; do\
		(ident $(RCSFLAGS) $(aSMV_SRC_DIR)/$$file) \
	done

# determine who has files of this package checked out
rcs_status: $(RCSFILES)
	@for file in $^; do\
		(rlog -L -h $(RCSFLAGS) $(RCSDIR)/$$file,v) \
	done

#----------------------------------------------------------------------
# RCS rules for common/share
#----------------------------------------------------------------------
#aSMV             = /projects/smv/smv-devel
RCSSHAREFILES        = $(SHAREFILES)
#RCSDIR          = $(aSMV)/../rcsRoot/common
#aSMV_SRC_DIR     = $(aSMV)/common

# check in user modified files (co -u puts an updated copy in central area)
rcs_ci_share: $(RCSSHAREFILES)
	@for file in $^; do\
		(ci -u $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                   $(RCSDIR)/$$file,v;\
                 co -u $(aSMV_SRC_DIR)/$$file $(RCSDIR)/$$file,v)\
	done

# check out files for modification
rcs_co_share: $(RCSSHAREFILES)
	@for file in $^; do\
		(co -l $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                   $(RCSDIR)/$$file,v) \
	done

# diff between the latest RCS versions and the user modified files	
rcs_diff_share: $(RCSSHAREFILES)
	for file in $^; do\
		(rcsdiff $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                     $(RCSDIR)/$$file,v) \
	done

# search for RCS identifier fields in latest RCS versions
rcs_ident_share: $(RCSSHAREFILES)
	@for file in $^; do\
		(ident $(RCSFLAGS) $(aSMV_SRC_DIR)/$$file) \
	done

# determine who has files of this package checked out
rcs_status_share: $(RCSSHAREFILES)
	@for file in $^; do\
		(rlog -L -h $(RCSFLAGS) $(RCSDIR)/$$file,v) \
	done

#----------------------------------------------------------------------
# RCS rules for common/{Makefile.in, configure.in, localconfigure, 
# masterconfigure, mkinstalldirs, install-sh}
#----------------------------------------------------------------------
RCSMISCFILES      = Makefile.in configure.in localconfigure \
	masterconfigure mkinstalldirs install-sh

# check in user modified files (co -u puts an updated copy in central area)
rcs_ci_misc: 
	        @for file in $(RCSMISCFILES); do\
                (ci -u $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                   $(RCSDIR)/$$file,v;\
                 co -u $(aSMV_SRC_DIR)/$$file $(RCSDIR)/$$file,v)\
        done

# check out files for modification
rcs_co_misc: 
	        @for file in $(RCSMISCFILES); do\
                (co -l $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                   $(RCSDIR)/$$file,v) \
        done

# diff between the latest RCS versions and the user modified files
rcs_diff_misc: $(RCSMISCFILES)
	        for file in $^; do\
                (rcsdiff $(RCSFLAGS) $(aSMV_USER_DIR)/$$file \
                                     $(RCSDIR)/$$file,v) \
        done

# search for RCS identifier fields in latest RCS versions
rcs_ident_misc: $(RCSMISCFILES)
	        @for file in $^; do\
                (ident $(RCSFLAGS) $(aSMV_SRC_DIR)/$$file) \
        done

# determine who has files of this package checked out
rcs_status_misc: $(RCSMISCFILES)
	        @for file in $^; do\
                (rlog -L -h $(RCSFLAGS) $(RCSDIR)/$$file,v) \
        done

#----------------------------------------------------------------------
# Rules for debugging the Makefile
#----------------------------------------------------------------------

DEBUG_VARS = 	ALL_PKGS \
		PKGS \
		MISSING_PKGS \
		VPATH \
		INCLUDEDIRS \
		CSRC \
		OBJECTS \
		HEADERS \
		MAKEINCLUDES \
		CFLAGS \
		AC_FLAGS \
		master_srcdir \
		local_srcdir \
		RCSFILES \
		RCSDIR \
		DISTRIBUTION \
		DISTFILES

debug_make:
	@$(foreach var, $(DEBUG_VARS), echo $(var)=$($(var)) ; )
