
${PACKAGE}_tag = $(tag)

all :: config

csh :: $(${PACKAGE}_tag).csh
	@/bin/echo $(${PACKAGE}_tag).csh ok

$(${PACKAGE}_tag).csh : cmt_path.make requirements ${use_requirements}
	@if test "$(nocheck)" = ""; then \
	  /bin/echo "Rebuilding $@"; \
	  $(cmtexe) setup -tag=$(${PACKAGE}_tag) | sed -e 's#`${CMTROOT}/mgr/cmt system`#$(${PACKAGE}_tag)#' >$(${PACKAGE}_tag).csh; \
	fi

sh :: $(${PACKAGE}_tag).sh
	@/bin/echo $(${PACKAGE}_tag).sh ok

$(${PACKAGE}_tag).sh : cmt_path.make requirements ${use_requirements}
	@if test "$(nocheck)" = ""; then \
	  /bin/echo "Rebuilding $@"; \
	  $(cmtexe) setup -sh -tag=$(${PACKAGE}_tag) | sed -e 's#`${CMTROOT}/mgr/cmt system`#$(${PACKAGE}_tag)#' >$(${PACKAGE}_tag).csh; \
	fi

config :: checkuses ##$(${PACKAGE}_tag).make
	@/bin/echo $(${PACKAGE}_tag).make ok

env.make ::
	@printenv >env.make.tmp; $(cmtexe) check files env.make.tmp env.make

$(${PACKAGE}_tag).make : requirements $(use_requirements)
	@if test ! -d $(bin) ; then $(mkdir) -p $(bin); fi
	@if test -f $(${PACKAGE}_tag).make; then /bin/rm -f $(${PACKAGE}_tag).make; fi
	@$(cmtexe) -quiet build tag_makefile -tag=$(${PACKAGE}_tag) >t$$$$; mv t$$$$ $(${PACKAGE}_tag).make

-include $(${PACKAGE}_tag).make

configclean ::
	/bin/rm -f *.make*


