summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2023-07-05 22:42:46 +0000
committerriastradh <riastradh@NetBSD.org>2023-07-05 22:42:46 +0000
commitde50cbf6aea57f5b2137debdf64112e4bf9ce2a0 (patch)
tree8ab8bc754d6626de4a1c37aae6fd5b558fde6b5f /tests
parent5b7fb2cc0bc1e6d8ed360dca3fac918bee6f189f (diff)
tests/libexec/ld.elf_so: Fix helper library makefiles.
1. Consolidate logic into a single helper.mk to reduce duplication. 2. Set NO* variables, not MK* variables which are reserved for user. 3. Avoid eager X!= in favour of lazy ${X:sh}. 4. Mark _g.a set list entries obsolete. Never should've been built! PR misc/57462
Diffstat (limited to 'tests')
-rw-r--r--tests/libexec/ld.elf_so/helper.mk18
-rw-r--r--tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile20
-rw-r--r--tests/libexec/ld.elf_so/helper_abuse_static/Makefile20
-rw-r--r--tests/libexec/ld.elf_so/helper_def_dynamic/Makefile17
-rw-r--r--tests/libexec/ld.elf_so/helper_def_static/Makefile17
-rw-r--r--tests/libexec/ld.elf_so/helper_dso1/Makefile21
-rw-r--r--tests/libexec/ld.elf_so/helper_dso2/Makefile24
-rw-r--r--tests/libexec/ld.elf_so/helper_dso3/Makefile21
-rw-r--r--tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile21
-rw-r--r--tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile20
-rw-r--r--tests/libexec/ld.elf_so/helper_onlydef/Makefile17
-rw-r--r--tests/libexec/ld.elf_so/helper_onlydef_static/Makefile17
-rw-r--r--tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile20
-rw-r--r--tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile20
-rw-r--r--tests/libexec/ld.elf_so/helper_symver_dso0/Makefile13
-rw-r--r--tests/libexec/ld.elf_so/helper_symver_dso1/Makefile13
-rw-r--r--tests/libexec/ld.elf_so/helper_symver_dso2/Makefile13
-rw-r--r--tests/libexec/ld.elf_so/helper_use_dynamic/Makefile20
-rw-r--r--tests/libexec/ld.elf_so/helper_use_static/Makefile20
19 files changed, 78 insertions, 274 deletions
diff --git a/tests/libexec/ld.elf_so/helper.mk b/tests/libexec/ld.elf_so/helper.mk
new file mode 100644
index 00000000000..34d6bb8e469
--- /dev/null
+++ b/tests/libexec/ld.elf_so/helper.mk
@@ -0,0 +1,18 @@
+# $NetBSD: helper.mk,v 1.1 2023/07/05 22:42:46 riastradh Exp $
+
+# Makefile fragment for building a helper library used by ld.elf_so
+# tests. All we need to install is lib${LIB}.so and lib${LIB}.so.1.
+# No man page, no lint library, no static libraries of any sort.
+
+LIBDIR?= ${TESTSBASE}/libexec/ld.elf_so
+SHLIBDIR?= ${TESTSBASE}/libexec/ld.elf_so
+SHLIB_MAJOR?= 1
+
+NODEBUGLIB= # defined
+NOLINT= # defined
+NOMAN= # defined
+NOPICINSTALL= # defined
+NOPROFILE= # defined
+NOSTATICLIB= # defined
+
+.include <bsd.lib.mk>
diff --git a/tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile b/tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile
index 0aea0e924fa..4ccd6dd5f84 100644
--- a/tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile
+++ b/tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2023/06/01 22:26:40 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:46 riastradh Exp $
LIB= h_abuse_dynamic
SRCS= h_abuse_dynamic.c
-DEF_DIR!= cd ${.CURDIR}/../helper_def_dynamic && ${PRINTOBJDIR}
+DEF_DIR_cmd= cd ${.CURDIR}/../helper_def_dynamic && ${PRINTOBJDIR}
+DEF_DIR= ${DEF_DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DEF_DIR} -lh_def_dynamic
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_abuse_static/Makefile b/tests/libexec/ld.elf_so/helper_abuse_static/Makefile
index 673c7a7a404..60877173c6c 100644
--- a/tests/libexec/ld.elf_so/helper_abuse_static/Makefile
+++ b/tests/libexec/ld.elf_so/helper_abuse_static/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2023/06/01 22:26:40 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:46 riastradh Exp $
LIB= h_abuse_static
SRCS= h_abuse_static.c
-DEF_DIR!= cd ${.CURDIR}/../helper_def_static && ${PRINTOBJDIR}
+DEF_DIR_cmd= cd ${.CURDIR}/../helper_def_static && ${PRINTOBJDIR}
+DEF_DIR= ${DEF_DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DEF_DIR} -lh_def_static
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_def_dynamic/Makefile b/tests/libexec/ld.elf_so/helper_def_dynamic/Makefile
index f01c22ee5ea..4868153827b 100644
--- a/tests/libexec/ld.elf_so/helper_def_dynamic/Makefile
+++ b/tests/libexec/ld.elf_so/helper_def_dynamic/Makefile
@@ -1,19 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2023/06/01 20:50:18 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:46 riastradh Exp $
LIB= h_def_dynamic
SRCS= h_def_dynamic.c
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_def_static/Makefile b/tests/libexec/ld.elf_so/helper_def_static/Makefile
index fccd464e59c..7393b939c66 100644
--- a/tests/libexec/ld.elf_so/helper_def_static/Makefile
+++ b/tests/libexec/ld.elf_so/helper_def_static/Makefile
@@ -1,19 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2023/05/31 00:18:44 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:46 riastradh Exp $
LIB= h_def_static
SRCS= h_def_static.c
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_dso1/Makefile b/tests/libexec/ld.elf_so/helper_dso1/Makefile
index b7c14073eea..0658ff41170 100644
--- a/tests/libexec/ld.elf_so/helper_dso1/Makefile
+++ b/tests/libexec/ld.elf_so/helper_dso1/Makefile
@@ -1,19 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2011/03/31 23:34:48 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:46 riastradh Exp $
-.include <bsd.own.mk>
+LIB= h_helper_dso1
+SRCS= h_helper_dso1.c
-LIB= h_helper_dso1
-SRCS= h_helper_dso1.c
-
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_dso2/Makefile b/tests/libexec/ld.elf_so/helper_dso2/Makefile
index a7b7bc359be..78bc115ced1 100644
--- a/tests/libexec/ld.elf_so/helper_dso2/Makefile
+++ b/tests/libexec/ld.elf_so/helper_dso2/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2011/03/31 23:34:48 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
-.include <bsd.own.mk>
+LIB= h_helper_dso2
+SRCS= h_helper_dso2.c
-LIB= h_helper_dso2
-SRCS= h_helper_dso2.c
-
-DSO1DIR!= cd ${.CURDIR}/../helper_dso1 && ${PRINTOBJDIR}
+DSO1DIR_cmd= cd ${.CURDIR}/../helper_dso1 && ${PRINTOBJDIR}
+DSO1DIR= ${DSO1DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DSO1DIR} -lh_helper_dso1
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_dso3/Makefile b/tests/libexec/ld.elf_so/helper_dso3/Makefile
index fb13279e67e..2070c3c18e8 100644
--- a/tests/libexec/ld.elf_so/helper_dso3/Makefile
+++ b/tests/libexec/ld.elf_so/helper_dso3/Makefile
@@ -1,22 +1,9 @@
-# $NetBSD: Makefile,v 1.1 2017/07/11 15:21:36 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
-.include <bsd.own.mk>
-
-LIB= h_helper_dso3
+LIB= h_helper_dso3
LIBISCXX= yes
-SRCS= h_helper_dso3.cpp
-
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
+SRCS= h_helper_dso3.cpp
CXXFLAGS+= -std=c++11
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile b/tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile
index 5bbe52f9ac2..ccf7545d7da 100644
--- a/tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile
+++ b/tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile
@@ -1,19 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2014/08/25 20:40:53 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
-.include <bsd.own.mk>
+LIB= h_helper_ifunc_dso
+SRCS= h_helper_ifunc.c
-LIB= h_helper_ifunc_dso
-SRCS= h_helper_ifunc.c
-
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile b/tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile
index df7cd1f07f8..2d871ab7465 100644
--- a/tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile
+++ b/tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2023/06/02 19:09:11 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
LIB= h_onlyctor_dynamic
SRCS= h_onlyctor_dynamic.c
-DEF_DIR!= cd ${.CURDIR}/../helper_onlydef && ${PRINTOBJDIR}
+DEF_DIR_cmd= cd ${.CURDIR}/../helper_onlydef && ${PRINTOBJDIR}
+DEF_DIR= ${DEF_DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DEF_DIR} -lh_onlydef
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_onlydef/Makefile b/tests/libexec/ld.elf_so/helper_onlydef/Makefile
index a91b62f8a47..a7a62c798d7 100644
--- a/tests/libexec/ld.elf_so/helper_onlydef/Makefile
+++ b/tests/libexec/ld.elf_so/helper_onlydef/Makefile
@@ -1,19 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2023/06/02 19:08:49 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
LIB= h_onlydef
SRCS= h_onlydef.c
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_onlydef_static/Makefile b/tests/libexec/ld.elf_so/helper_onlydef_static/Makefile
index e232c4d0818..f06ed4084d7 100644
--- a/tests/libexec/ld.elf_so/helper_onlydef_static/Makefile
+++ b/tests/libexec/ld.elf_so/helper_onlydef_static/Makefile
@@ -1,19 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2023/06/02 19:08:49 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
LIB= h_onlydef_static
SRCS= h_onlydef_static.c
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile b/tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile
index 6a551b27fd7..59bb3721d4b 100644
--- a/tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile
+++ b/tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2023/06/02 19:08:49 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
LIB= h_onlyuse_dynamic
SRCS= h_onlyuse_dynamic.c
-DEF_DIR!= cd ${.CURDIR}/../helper_onlydef && ${PRINTOBJDIR}
+DEF_DIR_cmd= cd ${.CURDIR}/../helper_onlydef && ${PRINTOBJDIR}
+DEF_DIR= ${DEF_DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DEF_DIR} -lh_onlydef
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile b/tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile
index 57e0fc34f7b..ec3b6299a86 100644
--- a/tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile
+++ b/tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2023/06/02 19:08:49 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
LIB= h_onlyuse_static
SRCS= h_onlyuse_static.c
-DEF_DIR!= cd ${.CURDIR}/../helper_onlydef && ${PRINTOBJDIR}
+DEF_DIR_cmd= cd ${.CURDIR}/../helper_onlydef && ${PRINTOBJDIR}
+DEF_DIR= ${DEF_DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DEF_DIR} -lh_onlydef
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_symver_dso0/Makefile b/tests/libexec/ld.elf_so/helper_symver_dso0/Makefile
index 3cd32c5a608..68135d88487 100644
--- a/tests/libexec/ld.elf_so/helper_symver_dso0/Makefile
+++ b/tests/libexec/ld.elf_so/helper_symver_dso0/Makefile
@@ -1,6 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/06/25 05:45:13 nonaka Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:47 riastradh Exp $
LIB= h_helper_symver_dso
SRCS= h_helper_symver_dso0.c
@@ -9,13 +7,6 @@ LIBDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso0
SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso0
SHLIB_MAJOR= 1
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
FILESDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso0
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile b/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
index 1307fbc7d7e..0a1aad4d79f 100644
--- a/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
+++ b/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
@@ -1,6 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2014/02/14 20:33:32 joerg Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.4 2023/07/05 22:42:48 riastradh Exp $
LIB= h_helper_symver_dso
SRCS= h_helper_symver_dso1.c
@@ -9,16 +7,9 @@ LIBDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso1
SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso1
SHLIB_MAJOR= 1
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
FILESDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso1
LDFLAGS.lib${LIB} += -Wl,--version-script=${.CURDIR}/h_helper_symver_dso1.map
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile b/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile
index 51207522919..39223a2e37b 100644
--- a/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile
+++ b/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile
@@ -1,6 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2014/02/14 20:33:32 joerg Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.4 2023/07/05 22:42:48 riastradh Exp $
LIB= h_helper_symver_dso
SRCS= h_helper_symver_dso2.c
@@ -9,15 +7,8 @@ LIBDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso2
SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso2
SHLIB_MAJOR= 1
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
FILESDIR= ${TESTSBASE}/libexec/ld.elf_so/h_helper_symver_dso2
LDFLAGS.lib${LIB} += -Wl,--version-script=${.CURDIR}/h_helper_symver_dso2.map
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_use_dynamic/Makefile b/tests/libexec/ld.elf_so/helper_use_dynamic/Makefile
index e7815dee077..646693dc868 100644
--- a/tests/libexec/ld.elf_so/helper_use_dynamic/Makefile
+++ b/tests/libexec/ld.elf_so/helper_use_dynamic/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2023/06/01 20:50:19 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2023/07/05 22:42:48 riastradh Exp $
LIB= h_use_dynamic
SRCS= h_use_dynamic.c
-DEF_DIR!= cd ${.CURDIR}/../helper_def_dynamic && ${PRINTOBJDIR}
+DEF_DIR_cmd= cd ${.CURDIR}/../helper_def_dynamic && ${PRINTOBJDIR}
+DEF_DIR= ${DEF_DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DEF_DIR} -lh_def_dynamic
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"
diff --git a/tests/libexec/ld.elf_so/helper_use_static/Makefile b/tests/libexec/ld.elf_so/helper_use_static/Makefile
index b3d9cbe1a3f..5f21765c768 100644
--- a/tests/libexec/ld.elf_so/helper_use_static/Makefile
+++ b/tests/libexec/ld.elf_so/helper_use_static/Makefile
@@ -1,22 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2023/05/31 00:46:11 riastradh Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.3 2023/07/05 22:42:48 riastradh Exp $
LIB= h_use_static
SRCS= h_use_static.c
-DEF_DIR!= cd ${.CURDIR}/../helper_def_static && ${PRINTOBJDIR}
+DEF_DIR_cmd= cd ${.CURDIR}/../helper_def_static && ${PRINTOBJDIR}
+DEF_DIR= ${DEF_DIR_cmd:sh}
LDADD+= -Wl,-rpath,${TESTSDIR} -L${DEF_DIR} -lh_def_static
-LIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIBDIR= ${TESTSBASE}/libexec/ld.elf_so
-SHLIB_MAJOR= 1
-
-MKSTATICLIB= no
-MKPROFILE= no
-MKPICINSTALL= no
-MKLINT= no
-
-NOMAN= # defined
-
-.include <bsd.lib.mk>
+.include "../helper.mk"