summaryrefslogtreecommitdiff
path: root/lang/perl5
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-11-25 17:45:56 +0000
committerjlam <jlam@pkgsrc.org>2003-11-25 17:45:56 +0000
commitca776b5a14e6953fe04cfc9b57b3bf726d0f11ec (patch)
tree9bea0115acc0d909014e0aeb489b03afb0bf7fdc /lang/perl5
parent2e4720e482a8374397ca3dde9a936b0921b4aab3 (diff)
downloadpkgsrc-ca776b5a14e6953fe04cfc9b57b3bf726d0f11ec.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.