summaryrefslogtreecommitdiff
path: root/lang/perl5
diff options
context:
space:
mode:
authorjlam <jlam>2003-11-25 17:45:56 +0000
committerjlam <jlam>2003-11-25 17:45:56 +0000
commit88a2521f0a954256f2a9efe0b6e26bccb64358d7 (patch)
tree9bea0115acc0d909014e0aeb489b03afb0bf7fdc /lang/perl5
parent9e853aafa2ac842b2e6b14fc646ff61d61553f6f (diff)
downloadpkgsrc-88a2521f0a954256f2a9efe0b6e26bccb64358d7.tar.gz
MakeMaker provides two hooks, INC and OTHERLDFLAGS, to pass options to the
compiler and linker. Use them to pass CPPFLAGS and LDFLAGS from pkgsrc.
Diffstat (limited to 'lang/perl5')
-rw-r--r--lang/perl5/module.mk19
1 files changed, 11 insertions, 8 deletions
diff --git a/lang/perl5/module.mk b/lang/perl5/module.mk
index bfb4bd153f6..3f46f4859be 100644
--- a/lang/perl5/module.mk
+++ b/lang/perl5/module.mk
@@ -1,4 +1,4 @@
-# $NetBSD: module.mk,v 1.23 2003/11/25 15:37:35 jlam Exp $
+# $NetBSD: module.mk,v 1.24 2003/11/25 17:45:56 jlam Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install perl5 modules.
@@ -122,18 +122,21 @@ MAKE_FLAGS+= PREFIX="${PREFIX}"
DEFAULT_VIEW.${PKGBASE}= ${DEFAULT_VIEW.perl}
.endif
-# OTHERLDFLAGS is the hook provided by the perl5 MakeMaker module to allow
-# customizing the LDFLAGS passed to the compiler/linker.
-#
.if defined(PERL5_LDFLAGS) && !empty(PERL5_LDFLAGS)
FIX_RPATH+= PERL5_LDFLAGS
LDFLAGS+= ${PERL5_LDFLAGS}
-. include "../../mk/bsd.prefs.mk"
-. if ${OBJECT_FMT} == "a.out"
+.endif
+
+.include "../../mk/bsd.prefs.mk"
+
+# MakeMaker provides two hooks, INC and OTHERLDFLAGS, to customize the
+# arguments passed to the preprocessor and linker, respectively.
+#
+MAKE_FLAGS+= INC="${CPPFLAGS}"
+.if ${OBJECT_FMT} == "a.out"
MAKE_FLAGS+= OTHERLDFLAGS="${LDFLAGS:S/-Wl,//g}"
-. else
+.else
MAKE_FLAGS+= OTHERLDFLAGS="${LDFLAGS}"
-. endif
.endif
# Generate the PLIST from the files listed in PERL5_PACKLIST.