pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/regress/make-env-phases regress/make-env-phases: fix t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4e7017d0f127
branches: trunk
changeset: 419418:4e7017d0f127
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Dec 17 16:01:28 2019 +0000
description:
regress/make-env-phases: fix test by ignoring changes to *FLAGS
The CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS differ between the build phase
and the install phase. It's only a minor difference but may still
influence packages that use these flags at install time, even though they
shouldn't.
For now just document that the flags differ.
diffstat:
regress/make-env-phases/DESCR | 1 +
regress/make-env-phases/Makefile | 29 +++++++++++++++++++++--------
regress/make-env-phases/spec | 4 ++--
3 files changed, 24 insertions(+), 10 deletions(-)
diffs (70 lines):
diff -r 48546c43dec2 -r 4e7017d0f127 regress/make-env-phases/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/make-env-phases/DESCR Tue Dec 17 16:01:28 2019 +0000
@@ -0,0 +1,1 @@
+Dummy description file, necessary to run bmake install.
diff -r 48546c43dec2 -r 4e7017d0f127 regress/make-env-phases/Makefile
--- a/regress/make-env-phases/Makefile Tue Dec 17 15:38:53 2019 +0000
+++ b/regress/make-env-phases/Makefile Tue Dec 17 16:01:28 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2009/04/09 00:47:12 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2019/12/17 16:01:28 rillig Exp $
#
-DISTNAME= make-env-phases-1.0
+DISTNAME= make-env-phases-19.3
CATEGORIES= regress
MASTER_SITES= # none
DISTFILES= # none
@@ -11,16 +11,29 @@
NO_CONFIGURE= yes
WRKSRC= ${WRKDIR}
+USE_TOOLS= diff grep printf
+
+# XXX: Why do these differ between do-build and do-install?
+#
+# In do-install, the -I/usr/include is not there in CFLAGS and CPPFLAGS.
+#
+# In do-install, the -L and -Wl,-R options for /usr/lib and $PREFIX/lib
+# are not there.
+#
+MAY_DIFFER_VARS= CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+MAY_DIFFER_GREP_ARGS= ${MAY_DIFFER_VARS:@var@-e \^${var:Q}@}
do-build:
- @cd ${WRKDIR} && \
- echo "${MAKE_ENV}" >build-make-env.txt
+ ${RUN} cd ${WRKDIR} \
+ && printf '%s\n' ${MAKE_ENV} \
+ | grep -v ${MAY_DIFFER_GREP_ARGS} >build-make-env.txt
do-install:
- @cd ${WRKDIR} && \
- echo "${MAKE_ENV}" >install-make-env.txt && \
- ${CMP} build-make-env.txt install-make-env.txt >/dev/null && \
- echo "The variable MAKE_ENV remains unchanged."
+ ${RUN} cd ${WRKDIR} \
+ && printf '%s\n' ${MAKE_ENV} \
+ | grep -v ${MAY_DIFFER_GREP_ARGS} >install-make-env.txt \
+ && diff -u build-make-env.txt install-make-env.txt \
+ && echo "The variable MAKE_ENV remains unchanged (ignoring ${MAY_DIFFER_VARS})." \
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 48546c43dec2 -r 4e7017d0f127 regress/make-env-phases/spec
--- a/regress/make-env-phases/spec Tue Dec 17 15:38:53 2019 +0000
+++ b/regress/make-env-phases/spec Tue Dec 17 16:01:28 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: spec,v 1.1.1.1 2006/09/06 03:37:14 ben Exp $
+# $NetBSD: spec,v 1.2 2019/12/17 16:01:28 rillig Exp $
#
do_test() {
@@ -10,5 +10,5 @@
}
check_result() {
- output_require "^The variable MAKE_ENV remains unchanged\\.\$"
+ output_require '^The variable MAKE_ENV remains unchanged.*$'
}
Home |
Main Index |
Thread Index |
Old Index