Annotation of pkgsrc/lang/ruby/modules.mk, revision 1.3
1.3 ! taca 1: # $NetBSD: modules.mk,v 1.2 2004/12/03 15:15:01 wiz Exp $
1.1 taca 2:
3: .if !defined(_RUBY_MODULE_MK)
4: _RUBY_MODULE_MK= # defined
5:
6: .include "../../lang/ruby/rubyversion.mk"
7: .if empty(USE_BUILDLINK3:M[nN][oO])
8: .include "../../lang/ruby/buildlink3.mk"
9: .elif !empty(RUBY_NOVERSION:M[nN][oO])
10: DEPENDS+= ruby${RUBY_VER}>=${RUBY_REQD}:../../lang/ruby${RUBY_VER}
11: .endif
12:
13: CONFIGURE_ENV+= RUBY=${RUBY} RDOC=${RDOC}
14:
15: #
16: # make ruby module package to common DIST_SUBDIR
17: #
1.3 ! taca 18: .if defined(RUBY_DIST_SUBDIR) && !empty(RUBY_DIST_SUBDIR)
1.1 taca 19: DIST_SUBDIR?= ${RUBY_DIST_SUBDIR}
1.3 ! taca 20: .endif
1.1 taca 21:
22: #
23: # extconf.rb support
24: #
25: # RUBY_EXTCONF specify extconf script name (default: extconf.rb).
26: # RUBY_EXTCONF_CHECK make sure to check existence of Makefile after
27: # executing extconf script (default: yes).
28: # RUBY_EXTCONF_MAKEFILE name of Makefile checked by RUBY_EXTCONF_CHECK
29: # (default: Makefile)
30: #
31: .if defined(USE_RUBY_EXTCONF) && empty(USE_RUBY_EXTCONF:M[nN][oO])
32:
33: RUBY_EXTCONF?= extconf.rb
34: INSTALL_TARGET?= site-install
35: CONFIGURE_ARGS+= --with-opt-dir="${LOCALBASE}"
36: RUBY_EXTCONF_CHECK?= yes
37: RUBY_EXTCONF_MAKEFILE?= Makefile
38:
39: do-configure: ruby-extconf-configure
40:
41: .if defined(RUBY_EXTCONF_SUBDIRS)
42: ruby-extconf-configure:
43: .for d in ${RUBY_EXTCONF_SUBDIRS}
44: @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure"
45: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; \
46: ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
47: .if empty(RUBY_EXTCONF_CHECK:M[nN][oO])
48: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; \
49: ${TEST} -f ${RUBY_EXTCONF_MAKEFILE}
50: .endif
51: .endfor
52:
53: .if !target(do-build)
54: do-build: ruby-extconf-build
55:
56: ruby-extconf-build:
57: .for d in ${RUBY_EXTCONF_SUBDIRS}
58: @${ECHO_MSG} "===> Building ${d}"
1.2 wiz 59: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; ${SETENV} ${MAKE_ENV} ${MAKE} ${BUILD_TARGET}
1.1 taca 60: .endfor
61: .endif
62:
63: .if !target(do-install)
64: do-install: ruby-extconf-install
65:
66: ruby-extconf-install:
67: .for d in ${RUBY_EXTCONF_SUBDIRS}
68: @${ECHO_MSG} "===> Installing ${d}"
69: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET}
70: .endfor
71: .endif
72:
73: .else
74: ruby-extconf-configure:
75: @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure"
76: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
77: ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
78: .if empty(RUBY_EXTCONF_CHECK:M[nN][oO])
79: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; \
80: ${TEST} -f ${RUBY_EXTCONF_MAKEFILE}
81: .endif
82: .endif
83:
84: #
85: # setup.rb support
86: #
87: # RUBY_SETUP specify setup script name (default: setup.rb).
88: #
89: .elif defined(USE_RUBY_SETUP) && empty(USE_RUBY_SETUP:M[nN][oO])
90:
91: RUBY_SETUP?= setup.rb
92:
93: .if !target(do-configure)
94: do-configure: ruby-setup-configure
95:
96: ruby-setup-configure:
97: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to configure"
98: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
99: ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_SETUP} config ${CONFIGURE_ARGS}
100: .endif
101:
102: .if !target(do-build)
103: do-build: ruby-setup-build
104:
105: ruby-setup-build:
106: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to build"
107: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
108: ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SETUP} setup
109: .endif
110:
111: .if !target(do-install)
112: do-install: ruby-setup-install
113:
114: ruby-setup-install:
115: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to ${INSTALL_TARGET}"
116: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
117: ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SETUP} ${INSTALL_TARGET}
118: .endif
119:
120: #
121: # install.rb support
122: #
123: # USE_RUBY_INSTALL use simple install.rb script to install
124: # (default: undefined)
125: # RUBY_SIMPLE_INSTALL name of simple install.rb script (default: install.rb)
126: #
127: .elif defined(USE_RUBY_INSTALL) && empty(USE_RUBY_INSTALL:M[nN][oO])
128:
129: RUBY_SIMPLE_INSTALL?= install.rb
130: INSTALL_TARGET?= # empty
131:
132: .if !target(do-install)
133: do-install: ruby-simple-install
134:
135: ruby-simple-install:
136: @${ECHO_MSG} "===> Running ${RUBY_SIMPLE_INSTALL} to ${INSTALL_TARGET}"
137: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
138: ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SIMPLE_INSTALL} ${INSTALL_TARGET}
139: .endif
140: .endif # USE_RUBY_INSTALL
141:
142: .include "replace.mk"
143:
144: .endif
CVSweb <webmaster@jp.NetBSD.org>