aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.ruby.mk
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2001-04-02 12:36:09 +0800
committerknu <knu@FreeBSD.org>2001-04-02 12:36:09 +0800
commit33b7d1cea38d3d56ae4b72906a4c926c1f03b064 (patch)
treead9a7e6f6030c99c72867e9b192042b2a30cf1c8 /Mk/bsd.ruby.mk
parent27d6a4db2a5c52ee4461cfea7d6bed1c6e0baa6e (diff)
downloadfreebsd-ports-gnome-33b7d1cea38d3d56ae4b72906a4c926c1f03b064.tar.gz
freebsd-ports-gnome-33b7d1cea38d3d56ae4b72906a4c926c1f03b064.tar.zst
freebsd-ports-gnome-33b7d1cea38d3d56ae4b72906a4c926c1f03b064.zip
Invoke ruby with -d when the variable DEBUG is defined. (make -DDEBUG)
Diffstat (limited to 'Mk/bsd.ruby.mk')
-rw-r--r--Mk/bsd.ruby.mk17
1 files changed, 11 insertions, 6 deletions
diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index fc3949329ec8..62226d2cdf02 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -186,7 +186,8 @@ post-patch: ruby-shebang-patch
ruby-shebang-patch:
@for f in ${RUBY_SHEBANG_FILES}; do \
${ECHO_MSG} "===> Fixing the #! line of $$f"; \
- ${RUBY} -i -p -e 'if $$. == 1; ' \
+ ${RUBY} ${RUBY_FLAGS} -i -p \
+ -e 'if $$. == 1; ' \
-e ' if /^#!/; ' \
-e ' sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}";' \
-e ' else;' \
@@ -197,6 +198,10 @@ ruby-shebang-patch:
done
.endif
+.if defined(DEBUG)
+RUBY_FLAGS+= -d
+.endif
+
# extconf.rb
.if defined(USE_RUBY_EXTCONF)
USE_RUBY= yes
@@ -211,12 +216,12 @@ ruby-extconf-configure:
.for d in ${RUBY_EXTCONF_SUBDIRS}
@${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure"
@cd ${WRKSRC}/${d}; \
- ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
+ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
.endfor
.else
@${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure"
@cd ${WRKSRC}; \
- ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
+ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
.endif
.endif
@@ -231,21 +236,21 @@ do-configure: ruby-setup-configure
ruby-setup-configure:
@${ECHO_MSG} "===> Running ${RUBY_SETUP} to configure"
@cd ${WRKSRC}; \
- ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_SETUP} config ${CONFIGURE_ARGS}
+ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} config ${CONFIGURE_ARGS}
do-build: ruby-setup-build
ruby-setup-build:
@${ECHO_MSG} "===> Running ${RUBY_SETUP} to build"
@cd ${WRKSRC}; \
- ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SETUP} setup
+ ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} setup
do-install: ruby-setup-install
ruby-setup-install:
@${ECHO_MSG} "===> Running ${RUBY_SETUP} to install"
cd ${WRKSRC}; \
- ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SETUP} install
+ ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install
.endif
.if defined(USE_LIBRUBY)