[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / regress / buildlink-libtool

File: [cvs.NetBSD.org] / pkgsrc / regress / buildlink-libtool / Makefile (download)

Revision 1.3, Sat Dec 17 05:20:23 2005 UTC (17 years, 1 month ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkgsrc-2008Q1-base, pkgsrc-2008Q1, pkgsrc-2007Q4-base, pkgsrc-2007Q4, pkgsrc-2007Q3-base, pkgsrc-2007Q3, pkgsrc-2007Q2-base, pkgsrc-2007Q2, pkgsrc-2007Q1-base, pkgsrc-2007Q1, pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3, pkgsrc-2006Q2-base, pkgsrc-2006Q2, pkgsrc-2006Q1-base, pkgsrc-2006Q1, pkgsrc-2005Q4-base, pkgsrc-2005Q4, cwrapper, cube-native-xorg-base, cube-native-xorg
Changes since 1.2: +2 -2 lines

Change my MAINTAINER email address to the one I've been using for
pkgsrc work.

# $NetBSD: Makefile,v 1.3 2005/12/17 05:20:23 jlam Exp $

DISTNAME=	regress-buildlink-libtool-0.0
CATEGORIES=	regress
MASTER_SITES=	# empty
DISTFILES=	# empty

MAINTAINER=	jlam@pkgsrc.org
COMMENT=	test buildlink libtool

USE_LIBTOOL=	yes
EXTRACT_ONLY=	# empty
NO_CONFIGURE=	yes
NO_INSTALL=	yes
NO_PACKAGE=	yes

# Remove GCC optimization options.
BUILDLINK_TRANSFORM+=	rm:-O[0-9]*

# Convert "-lreadline" into "-ledit -ltermcap -lm".
BUILDLINK_TRANSFORM+=	l:readline:edit:termcap:m

do-extract:
	${CP} -R ${FILESDIR} ${WRKSRC}

.PHONY: regress do-regress

regress: build do-regress

FAILED_TESTS=	${WRKDIR}/failed
PASSED_TESTS=	${WRKDIR}/passed

do-regress:
	@if [ -f ${FAILED_TESTS} ]; then				\
		${ECHO} "FAILED:";					\
		${CAT} ${FAILED_TESTS} | while read test; do		\
			${ECHO} "	$$test";			\
		done;							\
		exit 1;							\
	else								\
		${DO_NADA};						\
	fi

report-failed:
	@if [ -f "${FAILED_TESTS}" ]; then				\
		${ECHO} `${CAT} ${FAILED_TESTS} | ${WC} -l`;		\
	else								\
		${ECHO} "0";						\
	fi

report-passed:
	@if [ -f "${PASSED_TESTS}" ]; then				\
		ECHO} `${CAT} ${PASSED_TESTS} | ${WC} -l`;		\
	else								\
		${ECHO} "0";						\
	fi

TEST_RESULT=	${ECHO} "(${.TARGET}) got:      $$test";		\
		${ECHO} "(${.TARGET}) expected: $$expected";		\
		case $$test in						\
		$$expected)						\
			${ECHO} "(${.TARGET}) result:   PASS";		\
			${ECHO} "${.TARGET}" >> ${PASSED_TESTS};	\
			;;						\
		*)							\
			${ECHO} "(${.TARGET}) result:   FAIL";		\
			${ECHO} "${.TARGET}" >> ${FAILED_TESTS};	\
			;;						\
		esac

# Check that the dependency_libs line of libregress1.lai is empty.
do-regress: test1
test1:
	@cd ${WRKSRC};							\
	. .libs/libregress1.lai;					\
	test="$$dependency_libs";					\
	expected="";							\
	${TEST_RESULT}

# Check that the dependency_libs line of libregress2.lai is empty.
do-regress: test2
test2:
	@cd ${WRKSRC};							\
	. .libs/libregress2.lai;					\
	test="$$dependency_libs";					\
	expected="-L${PREFIX}/lib -lregress1";				\
	${TEST_RESULT}

.include "../../mk/bsd.pkg.mk"