| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: rubygem.mk,v 1.33 2008/03/27 05:29:42 jlam Exp $ | | 1 | # $NetBSD: rubygem.mk,v 1.34 2008/03/27 05:34:31 jlam Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is intended to be included by packages that build | | 3 | # This Makefile fragment is intended to be included by packages that build |
4 | # and install Ruby gems. | | 4 | # and install Ruby gems. |
5 | # | | 5 | # |
6 | # Package-settable variables: | | 6 | # Package-settable variables: |
7 | # | | 7 | # |
8 | # BUILD_TARGET | | 8 | # BUILD_TARGET |
9 | # The Rakefile target that creates a local gem if using the | | 9 | # The Rakefile target that creates a local gem if using the |
10 | # ``rake'' GEM_BUILD method. | | 10 | # ``rake'' GEM_BUILD method. |
11 | # | | 11 | # |
12 | # Default: gem | | 12 | # Default: gem |
13 | # | | 13 | # |
14 | # GEM_BUILD | | 14 | # GEM_BUILD |
| @@ -238,28 +238,28 @@ _RUBYGEM_OPTIONS+= --local ${WRKSRC}/${G | | | @@ -238,28 +238,28 @@ _RUBYGEM_OPTIONS+= --local ${WRKSRC}/${G |
238 | _RUBYGEM_OPTIONS+= -- --build-args ${CONFIGURE_ARGS} | | 238 | _RUBYGEM_OPTIONS+= -- --build-args ${CONFIGURE_ARGS} |
239 | | | 239 | |
240 | .PHONY: _gem-build-buildroot | | 240 | .PHONY: _gem-build-buildroot |
241 | _gem-build-buildroot: | | 241 | _gem-build-buildroot: |
242 | @${STEP_MSG} "Installing gem into buildroot" | | 242 | @${STEP_MSG} "Installing gem into buildroot" |
243 | ${RUN} ${SETENV} ${MAKE_ENV} ${RUBYGEM} install ${_RUBYGEM_OPTIONS} | | 243 | ${RUN} ${SETENV} ${MAKE_ENV} ${RUBYGEM} install ${_RUBYGEM_OPTIONS} |
244 | | | 244 | |
245 | # The ``gem'' command doesn't exit with a non-zero result even if the | | 245 | # The ``gem'' command doesn't exit with a non-zero result even if the |
246 | # install of the gem failed, so we do the check and return the proper exit | | 246 | # install of the gem failed, so we do the check and return the proper exit |
247 | # code ourselves. | | 247 | # code ourselves. |
248 | # | | 248 | # |
249 | .PHONY: _gem-build-buildroot-check | | 249 | .PHONY: _gem-build-buildroot-check |
250 | _gem-build-buildroot-check: | | 250 | _gem-build-buildroot-check: |
251 | ${RUN} test -f ${_RUBYGEM_BUILDROOT}${GEM_CACHE}/${GEM_NAME}.gem || \ | | 251 | ${RUN} test -f ${_RUBYGEM_BUILDROOT}${GEM_CACHEDIR}/${GEM_NAME}.gem || \ |
252 | ${FAIL_MSG} "Installing ${GEM_NAME}.gem into buildroot failed." | | 252 | ${FAIL_MSG} "Installing ${GEM_NAME}.gem into buildroot failed." |
253 | | | 253 | |
254 | .if !empty(GEM_CLEANBUILD) | | 254 | .if !empty(GEM_CLEANBUILD) |
255 | .PHONY: _gem-build-cleanbuild | | 255 | .PHONY: _gem-build-cleanbuild |
256 | _gem-build-cleanbuild: | | 256 | _gem-build-cleanbuild: |
257 | @${STEP_MSG} "Cleaning intermediate gem build files" | | 257 | @${STEP_MSG} "Cleaning intermediate gem build files" |
258 | ${RUN} cd ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR} && \ | | 258 | ${RUN} cd ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR} && \ |
259 | find . -print | sort -r | \ | | 259 | find . -print | sort -r | \ |
260 | while read file; do \ | | 260 | while read file; do \ |
261 | case $$file in \ | | 261 | case $$file in \ |
262 | ${GEM_CLEANBUILD:@.p.@./${.p.}) ;;@} \ | | 262 | ${GEM_CLEANBUILD:@.p.@./${.p.}) ;;@} \ |
263 | *) continue ;; \ | | 263 | *) continue ;; \ |
264 | esac; \ | | 264 | esac; \ |
265 | [ ! -e ${WRKSRC:Q}"/$$file" ] || continue; \ | | 265 | [ ! -e ${WRKSRC:Q}"/$$file" ] || continue; \ |