## Copyright (C) 1993 by the author(s).
# 
# This software is published in the hope that it will be useful, but
# WITHOUT ANY WARRANTY for any part of this software to work correctly
# or as described in the manuals. See the ShapeTools Public License
# for details.
#
# Permission is granted to use, copy, modify, or distribute any part of
# this software but only under the conditions described in the ShapeTools 
# Public License. A copy of this license is supposed to have been given
# to you along with ShapeTools in a file named LICENSE. Among other
# things, this copyright notice and the Public License must be
# preserved on all copies.

#
# shape_CM environment -- stdrules
#
# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de)
#          Axel Mahler (Axel.Mahler@cs.tu-berlin.de)
#
# Redesigned by: Karl-Heinz Koester (Karl-Heinz.Koester@sietec.de)
#
# $__Header$
#

#
# Standard version selection rules to be activated by setting the
# "VERSIONS" macro in the Shapefile.
#

most_recent:-
	*.[cg], attr (state,busy),
	   msg (Using busy version of $_af_unixname$.);
	*.c[im], attr (state,busy),
	   msg (Using busy version of $_af_unixname$.);
	*, attr (state, busy);
	*.[cg], attrge (state, saved), attrmax (version),
	   msg (Using $_af_bound$.);
	*.c[im], attrge (state, saved), attrmax (version),
	   msg (Using $_af_bound$.);
	*, attrge (state, saved), attrmax (version).

last_proposed:-
	*.[cg], attrge (state,proposed), attrmax (version),
	   msg (Using $_af_bound$.);
	*.c[im], attrge (state,proposed), attrmax (version),
	   msg(Using $_af_bound$.);
	*, attrge (state,proposed), attrmax(version);
	$(LOCALINCLUDEPATH)/*, attr(state, busy);
	$(LOCALLIBPATH)/*, attr(state, busy).

last_prereleased:-
	*, attr (__SymbolicName__, $(LASTNODEPRERELEASE)),
	   msg (Using $_af_unixname$ from release $(LASTNODEPRERELEASE));
	$(LOCALINCLUDEPATH)/*, attr (state, busy),
	   msg (Using Unix include file $_af_unixname$);
	$(LOCALLIBPATH)/*, attr (state, busy),
	   msg (Using Unix archive file $_af_unixname$).

last_released:-
	*, attr (__SymbolicName__, $(LASTNODERELEASE)),
	   msg(Using $_af_unixname$ from release $(LASTNODERELEASE));
	$(LOCALINCLUDEPATH)/*, attr(state, busy),
	   msg(Using Unix include file $_af_unixname$);
	$(LOCALLIBPATH)/*, attr(state, busy),
	   msg(Using Unix archive file $_af_unixname$).

from_release:-
	*.[cg], attr (__SymbolicName__, $(RELEASENAME)),
	   msg (Using $_af_unixname$ from release $(RELEASENAME));
	*.c[im], attr (__SymbolicName__, $(RELEASENAME)),
	   msg (Using $_af_unixname$ from release $(RELEASENAME));
	*, attr (__SymbolicName__, $(RELEASENAME));
	$(LOCALINCLUDEPATH)/*, attr (state, busy);
	$(LOCALLIBPATH)/*, attr (state, busy).

extern:-
	*, attr(state, busy),
	   msg(Using regular file for $_af_unixname$).

check_releasable:-
	*, attrnot (state, busy), attrmax (version), 
	   attr (locker, $(USERATDOMAIN)),
	   msg ($_af_unixname$ locked by us);
	*, attrnot (state, busy), attrmax (version), attrnot (locker, ), 
	   msg ($_af_unixname$ locked by somebody else -- STOP), -;
	*, attrnot (state, busy), attrmax(version),
	   msg ($_af_unixname$ is available);
	*, attr (state, busy),
	   msg ($_af_unixname$ is a new busy version -- lock assumed).

most_recently_prereleased:-
	*, attr (__SymbolicName__, $(LASTNODEPRERELEASE));
	*, attr (__SymbolicName__, $(LASTNODERELEASE)).

most_recently_released:-
	*, attr (__SymbolicName__, $(LASTNODERELEASE)).

