#-- start of java_header ------

${CONSTITUENT}javadirs ::
	@if test ! -d $(javabin)/${CONSTITUENT} ; then $(mkdir) -p $(javabin)${CONSTITUENT} ; fi

${CONSTITUENT} :: ${CONSTITUENT}javadirs $(javabin)${CONSTITUENT}.jar
	@/bin/echo "------> ${CONSTITUENT} ok"

$(javabin)${CONSTITUENT}.jar :: ${OBJS}
	$(java_echo) $@
	$(java_silent)cd $(javabin)${CONSTITUENT}; \
	  echo "Main-Class: ${CONSTITUENT}" >| ${CONSTITUENT}.jmf; \
	  jar -cmvf ${CONSTITUENT}.jmf ../${CONSTITUENT}.jar *

install_dir = ${CMTINSTALLAREA}/share/bin
${CONSTITUENT}installname = ${CONSTITUENT}.jar

${CONSTITUENT} :: ${CONSTITUENT}install

install :: ${CONSTITUENT}install

${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname)
	@if test ! "${CMTINSTALLAREA}" = ""; then\
	  echo "installation done"; \
	fi

$(install_dir)/$(${CONSTITUENT}installname) :: $(javabin)$(${CONSTITUENT}installname)
	@if test ! "${CMTINSTALLAREA}" = ""; then \
	  $(cmt_install_action) \
	    -source "$(PACKAGE_ROOT)/classes" \
	    -name "$(${CONSTITUENT}installname)" \
	    -out "$(install_dir)" \
	    -cmd "$(cmt_installarea_command)" \
	    -cmtpath "$($(package)_cmtpath)" ; \
	fi

##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall

uninstall :: ${CONSTITUENT}uninstall

${CONSTITUENT}uninstall ::
	@if test ! "${CMTINSTALLAREA}" = ""; then \
	  $(cmt_uninstall_action) \
	    -source "$(PACKAGE_ROOT)/classes" \
	    -name "$(${CONSTITUENT}installname)" \
	    -out "$(install_dir)" \
	    -cmtpath "$($(package)_cmtpath)" ; \
	fi

${CONSTITUENT}clean ::
	/bin/rm -rf $(javabin)/${CONSTITUENT}
	/bin/rm -f $(javabin)/${CONSTITUENT}.jar

#-- end of java_header ------
