#!/bin/csh -f
#
# _doMFL <directory>Makefile.<makeFileSuffix> <makeFileSuffix>
#
# 	Go to the directory specifed and link the makefile with
# the given suffix to Makefile, and then make an Objects directory,
# and put in that a link to the sources, makefile, and config file.
# 
# PS: pardon the funny params to this function but having a hard time
# doing reasobable things with find...
#
#

cd `dirname $1`

set targName = `pwd`
set targName = `basename $targName`

#OLD ln -s Makefile$2 Makefile
BuildMakeFileIndirect Makefile $targName Makefile Objects

# only bother to make the directory if there is a Sources directory also...
if (-d Sources) then
	# make and enter the Objects directory
	mkdir Objects
	cd Objects

	# link to sources
	foreach i (../Sources/*)
		if ("$i" != "RCS") then
			ln -s $i `basename $i`
		endif
	end

	# link makefile and config file
#OLD	ln -s ../Makefile Makefile
	BuildMakeFileIndirect Makefile ../$targName ../Makefile$2
	ln -s ../Config Config
endif



