[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.6, Sun Mar 24 21:09:21 2019 UTC (3 years, 10 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, HEAD
Changes since 1.5: +3 -3 lines

regress/buildlink-libtool: fix failing test

The comment above that test was a copy-and-paste error. It got almost 15
years old.

# $NetBSD: Makefile,v 1.6 2019/03/24 21:09:21 rillig Exp $

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

MAINTAINER=	pkgsrc-users@NetBSD.org
COMMENT=	test buildlink libtool

USE_LIBTOOL=	yes
NO_CONFIGURE=	yes
NO_INSTALL=	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 libregress2.lai links with libregress1.lai.
do-regress: test2
test2:
	@cd ${WRKSRC};							\
	. .libs/libregress2.lai;					\
	test="$$dependency_libs";					\
	expected="${PREFIX}/lib/libregress1.la";			\
	${TEST_RESULT}

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