Subject: [enhancement] Next try: make target "get-status"
To: None <tech-pkg@netbsd.org>
From: Roland Illig <roland.illig@gmx.de>
List: tech-pkg
Date: 02/08/2004 17:39:54
This is a multi-part message in MIME format.
--------------030906040200020503090303
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

now that I have been working some time with pkgsrc, I modified my 
contribution for the make target "get-status".

The first try:
http://mail-index.netbsd.org/tech-pkg/2004/01/21/0027.html

The second try:
(see attachment)

Roland

--------------030906040200020503090303
Content-Type: text/plain;
 name="status.mk"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="status.mk"

.if !defined(_GET_STATUS_MK)
_GET_STATUS_MK=	# defined

get-status:
	@							\
	if test ! -d "${WRKDIR}"; then				\
	  echo "clean" ;					\
	elif test ! -f "${EXTRACT_COOKIE}"; then		\
	  echo "not extracted";					\
	elif test ! -f "${PATCH_COOKIE}"; then			\
	  echo "extracted";					\
	elif test ! -f "${TOOLS_COOKIE}"; then			\
	  echo "patched";					\
	elif test ! -f "${CONFIGURE_COOKIE}"; then		\
	  echo "created tools";					\
	elif test ! -f "${BUILD_COOKIE}"; then			\
	  echo "configured";					\
	elif test ! -f "${BUILDLINK_COOKIE}"; then		\
	  echo "built";						\
	elif test ! -f "${INSTALL_COOKIE}"; then		\
	  echo "buildlinked";					\
	elif test ! -f "${PACKAGE_COOKIE}"; then		\
	  if ${PKG_INFO_CMD} -qe ${PKGNAME}; then		\
	    echo "installed";					\
	  else							\
	    echo "marked as installed but not installed";	\
	  fi;							\
	else echo "packaged";					\
	fi

.endif

--------------030906040200020503090303--