Sync Mk with ports
[dports.git] / Mk / bsd.apache.mk
1 # $FreeBSD$
2 #
3 # bsd.apache.mk - Apache related macros.
4 # Author: Clement Laforet <clement@FreeBSD.org>
5 # Author: Olli Hauer <ohauer@FreeBSD.org>
6 #
7 # Please view me with 4 column tabs!
8
9 # =========================================================================
10 # Parameter APACHE_PORT (user controlled):
11 #
12 # The parameter APACHE_PORT can be used in /etc/make.conf to
13 # overwrite the default apache port.
14 #
15 # This parameter should never be used in the Makefile of a port!
16 #
17 # Example entry in /etc/make.conf:
18 #  APACHE_PORT= www/apache22
19 #
20 # To get a list of "possible" valid values execute the command:
21 #  $> egrep 'apache[12]' ports/www/Makefile | awk '{print "www/" $3}'
22 #
23 # =========================================================================
24 #
25 # This script will be included if one of the following parameter
26 # is defined in the Makefile of the port
27 #
28 # USE_APACHE         - Set apache and apxs as build and run dependency
29 # USE_APACHE_BUILD   - Set apache and apxs as build dependency
30 # USE_APACHE_RUN     - Set apache and apxs as run dependency
31 #
32 # The following example is representative of all three possible
33 # parameters to use.
34 #
35 # Examples:
36 #  USE_APACHE= 22       # specify exact version
37 #  USE_APACHE= 22+      # specify [min] version, no [max] version
38 #  USE_APACHE= 22-24    # specify [min]-[max] range
39 #  USE_APACHE= -22      # specify [max] version, no [min] version
40 #
41 # Note:
42 #  - If "+" is specified and no apache is installed, then
43 #    ${DEFAULT_APACHE_VERSION} will be used.
44 #
45 #  - Valid version numbers are specified in the variable
46 #    APACHE_SUPPORTED_VERSION below
47 #
48 #  - The following values for USE_APACHE are reserverd and only valid
49 #    in apache-server ports!
50 #      USE_APACHE= common22
51 #
52 #
53 # The following variables can be used (ro) in ports Makefile
54 # =========================================================================
55 #  - APACHE_VERSION
56 #  - APACHEETCDIR
57 #  - APACHEINCLUDEDIR
58 #  - APACHEMODDIR
59 #  - DEFAULT_APACHE_VERSION
60 #
61 #
62 # Parameters for building third party apache modules:
63 # =========================================================================
64 #  - AP_FAST_BUILD      # automatic module build
65 #
66 #  - AP_GENPLIST        # automatic PLIST generation plus add
67 #                       # the module disabled into httpd.conf
68 #                       # (only if no pkg-plist exist)
69 #
70 #  - MODULENAME         # default: ${PORTNAME}
71 #  - SHORTMODNAME       # default: ${MODULENAME:S/mod_//}
72 #  - SRC_FILE           # default: ${MODULENAME}.c
73 #
74 #
75
76 .if !defined(Apache_Pre_Include)
77
78 Apache_Pre_Include=             bsd.apache.mk
79
80 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
81
82 .if defined(DEFAULT_APACHE_VER)
83 WARNING+=       "DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS=apache=${DEFAULT_APACHE_VER} instead"
84 .endif
85
86 DEFAULT_APACHE_VERSION?=        ${APACHE_DEFAULT:S/.//}
87 APACHE_SUPPORTED_VERSION=       24 22 # preferred version first
88
89 # Print warnings
90 _ERROR_MSG=     : Error from bsd.apache.mk.
91
92 # Important Note:
93 #  Keep apache version in ascending order!
94 #  The "+" sign is only valid as last sign, not between
95 #  two versions or in combination with range!
96 .if defined(USE_APACHE) && !empty(USE_APACHE)
97 .       if ${USE_APACHE:Mcommon*} != ""
98 AP_PORT_IS_SERVER=      yes
99 .       elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == ""
100 AP_PORT_IS_MODULE=      yes
101 .               if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+"
102 AP_PLUS=        yes
103 .               endif
104 .       else
105 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
106 .       endif
107 # Catch unknown apache versions and silly USE_APACHE constructs
108 .       if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE)
109 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
110 .       endif
111 # Catch USE_APACHE [min]-[max]+
112 .       if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-"
113 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
114 .       endif
115 .elif defined(USE_APACHE)
116 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified )
117 .endif # defined(USE_APACHE)
118
119 # ===============================================================
120 .if defined(AP_PORT_IS_SERVER)
121 # MFC TODO: remove this check
122 # used only by www/cakephp* ports
123 .if defined(SLAVE_PORT_MODULES)
124 DEFAULT_MODULES_CATEGORIES+=    SLAVE_PORT
125 ALL_MODULES_CATEGORIES+=        SLAVE_PORT
126 .endif
127
128 # Module selection
129 .for category in ${DEFAULT_MODULES_CATEGORIES}
130 DEFAULT_MODULES+=       ${${category}_MODULES}
131 .endfor
132
133 .for category in ${ALL_MODULES_CATEGORIES}
134 AVAILABLE_MODULES+=     ${${category}_MODULES}
135 .endfor
136
137 # detect invalid lowercase params in make.conf
138 # keep this check until end of 2012
139 .if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*}
140 IGNORE=         lowercase WITH_STATIC_MODULES="${WITH_STATIC_MODULES}"\
141                 detected (make.conf), they shoud be UPPERCASE
142 .endif
143
144 # Setting "@comment " as default.
145 .for module in ${AVAILABLE_MODULES:O}
146 ${module}_PLIST_SUB=    "@comment "
147 _DISABLE_MODULES+=      --disable-${module:tl}
148 .endfor
149
150 # Configure
151 # dirty hacks to make sure all modules are disabled before we select them
152 .if ${USE_APACHE:Mcommon2*}
153 CONFIGURE_ARGS+=        ${_DISABLE_MODULES:O:u}
154 .endif
155
156 # OPTIONS handling
157 .for module in ${AVAILABLE_MODULES}
158 .       if ${PORT_OPTIONS:M${module}}
159 _APACHE_MODULES+=       ${module}
160 .       else
161 WITHOUT_MODULES+=       ${module}
162 .       endif
163 .endfor
164
165 .if !defined(WITH_STATIC_APACHE)
166 # FYI
167 #DYNAMIC_MODULES=       so
168 CONFIGURE_ARGS+=        --enable-so
169 .else
170 CONFIGURE_ARGS+=        --disable-so
171 WITH_ALL_STATIC_MODULES=        yes
172 .endif
173
174 .if ${PORT_OPTIONS:MSUEXEC}
175 _APACHE_MODULES+=       ${SUEXEC_MODULES}
176 SUEXEC_CONFARGS=        with-suexec
177
178 # SUEXEC_DOCROOT should exist
179 SUEXEC_DOCROOT?=        ${PREFIX}/www/data
180 #SUEXEC_DOCROOT?=       ${WWWDIR}
181 SUEXEC_USERDIR?=        public_html
182 # avoid duplicate search paths
183 .if ${LOCALBASE} == ${PREFIX}
184 SUEXEC_SAFEPATH?=       ${LOCALBASE}/bin:/usr/bin:/bin
185 .else   
186 SUEXEC_SAFEPATH?=       ${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin
187 .endif  
188 SUEXEC_LOGFILE?=        /var/log/httpd-suexec.log
189 SUEXEC_UIDMIN?=         1000
190 SUEXEC_GIDMIN?=         1000
191 SUEXEC_CALLER?=         ${WWWOWN}
192 CONFIGURE_ARGS+=        --${SUEXEC_CONFARGS}-caller=${SUEXEC_CALLER} \
193                         --${SUEXEC_CONFARGS}-uidmin=${SUEXEC_UIDMIN} \
194                         --${SUEXEC_CONFARGS}-gidmin=${SUEXEC_GIDMIN} \
195                         --${SUEXEC_CONFARGS}-userdir="${SUEXEC_USERDIR}" \
196                         --${SUEXEC_CONFARGS}-docroot="${SUEXEC_DOCROOT}" \
197                         --${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \
198                         --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" \
199                         --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec"
200
201 .       if defined(WITH_SUEXEC_UMASK)
202 CONFIGURE_ARGS+=        --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK}
203 .       endif
204 .endif
205
206 .if !defined(WITHOUT_MODULES)
207 APACHE_MODULES=         ${_APACHE_MODULES}
208 .else
209 .for module in ${_APACHE_MODULES:O:u}
210 .       if !${WITHOUT_MODULES:M${module}}
211 APACHE_MODULES+=        ${module}
212 .       endif
213 .endfor
214 .endif
215
216 .if defined(WITH_STATIC_MODULES)
217 .  for module in ${APACHE_MODULES}
218 .    if ${WITH_STATIC_MODULES:M${module}}
219 _CONFIGURE_ARGS+=       --enable-${module:tl}
220 .    else
221 _CONFIGURE_ARGS+=       --enable-${module:tl}=shared
222 .    endif
223 .  endfor
224 CONFIGURE_ARGS+=        ${_CONFIGURE_ARGS:O}
225 .elif defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES)
226 WITH_STATIC_MODULES=    ${APACHE_MODULES}
227 CONFIGURE_ARGS+=        --enable-modules="${APACHE_MODULES:O:tl}"
228 .else
229 CONFIGURE_ARGS+=        --enable-mods-shared="${APACHE_MODULES:O:tl}"
230 .endif
231
232 # ====================================
233 # start pkg-plist adjustments
234 .if defined(WITH_STATIC_MODULES)
235 .for module in ${APACHE_MODULES}
236 .       if !${WITH_STATIC_MODULES:M${module}}
237 _SHARED_MODULES+=       ${module}
238 .       endif
239 .endfor
240
241 SHARED_MODULES=         ${_SHARED_MODULES}
242 .elif !defined(WITH_ALL_STATIC_MODULES)
243 SHARED_MODULES=         ${APACHE_MODULES}
244 .endif
245
246 .for module in ${SHARED_MODULES}
247 ${module}_PLIST_SUB=    ""
248 .endfor
249
250 .for module in ${AVAILABLE_MODULES:O:u}
251 PLIST_SUB+=     MOD_${module}=${${module}_PLIST_SUB}
252 .endfor
253
254 # pkg-plist workaround STATIC support
255 .if ${PORT_OPTIONS:MSUEXEC}
256 PLIST_SUB+=     SUEXEC=""
257 .else
258 PLIST_SUB+=     SUEXEC="@comment "
259 .endif
260
261 .if ${PORT_OPTIONS:MLOG_FORENSIC}
262 PLIST_SUB+=     FORENSIC=""
263 .else
264 PLIST_SUB+=     FORENSIC="@comment "
265 .endif
266
267 # end pkg-plist adjustments
268
269 #### End of AP_PORT_IS_SERVER ####
270
271 # ===============================================================
272 .elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD)
273 APXS?=          ${LOCALBASE}/sbin/apxs
274 HTTPD?=         ${LOCALBASE}/sbin/httpd
275
276 MODULENAME?=    ${PORTNAME}
277 SHORTMODNAME?=  ${MODULENAME:S/mod_//}
278 SRC_FILE?=      ${MODULENAME}.c
279
280 .if exists(${HTTPD})
281 _APACHE_VERSION!=       ${HTTPD} -V | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p'
282 # XXX see mod_perl-2.0.6/Changes
283 # Apache 2.4 and onwards doesn't require linking the MPM module
284 # directly in the httpd binary anymore. APXS lost the MPM_NAME query,
285 # so we can't assume a given MPM anymore.
286 .       if ${_APACHE_VERSION} <= 22
287 APACHE_MPM!=            ${APXS} -q MPM_NAME
288 .       endif
289 .elif defined(APACHE_PORT)
290 _APACHE_VERSION!=       ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p'
291 .else
292 _APACHE_VERSION:=       ${DEFAULT_APACHE_VERSION}
293 .endif
294
295 .if defined(USE_APACHE)
296 _USE_APACHE:=   ${USE_APACHE}
297 .elif defined(USE_APACHE_BUILD)
298 _USE_APACHE:=   ${USE_APACHE_BUILD}
299 .elif defined(USE_APACHE_RUN)
300 _USE_APACHE:=   ${USE_APACHE_RUN}
301 .endif
302
303 _APACHE_VERSION_CHECK:=         ${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/}
304 _APACHE_VERSION_MINIMUM_TMP:=   ${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/}
305 _APACHE_VERSION_MINIMUM:=       ${_APACHE_VERSION_MINIMUM_TMP:M[1-9][0-9]}
306 _APACHE_VERSION_MAXIMUM_TMP:=   ${_APACHE_VERSION_CHECK:C/.*-([1-9][0-9])/\1/}
307 _APACHE_VERSION_MAXIMUM:=       ${_APACHE_VERSION_MAXIMUM_TMP:M[1-9][0-9]}
308
309 .if defined(_APACHE_VERSION)
310 # Validate Apache version whether it meets USE_APACHE version restriction.
311 .       if !empty(_APACHE_VERSION_MINIMUM) && (${_APACHE_VERSION} < ${_APACHE_VERSION_MINIMUM})
312 _APACHE_VERSION_NONSUPPORTED=   ${_APACHE_VERSION_MINIMUM} at least
313 .       elif !empty(_APACHE_VERSION_MAXIMUM) && (${_APACHE_VERSION} > ${_APACHE_VERSION_MAXIMUM})
314 _APACHE_VERSION_NONSUPPORTED=   ${_APACHE_VERSION_MAXIMUM} at most
315 .       endif
316
317 .       if defined(_APACHE_VERSION_NONSUPPORTED) && !defined(AP_IGNORE_VERSION_CHECK)
318 BROKEN= ${_ERROR_MSG} apache${_APACHE_VERSION} is installed (or APACHE_PORT is defined) and port requires apache${_APACHE_VERSION_NONSUPPORTED}
319 .        endif
320 .else           # defined(_APACHE_VERSION)
321 .       for ver in ${APACHE_SUPPORTED_VERSION}
322 __VER=  ${ver}
323 .               if !defined(_APACHE_VERSION) && \
324                         !(!empty(_APACHE_VERSION_MINIMUM) && ( ${__VER} < ${_APACHE_VERSION_MINIMUM} )) && \
325                         !(!empty(_APACHE_VERSION_MAXIMUM) && ( ${__VER} > ${_APACHE_VERSION_MAXIMUM} ))
326 _APACHE_VERSION=        ${ver}
327 .               endif
328 .       endfor
329 .endif          # defined(_APACHE_VERSION)
330
331 APACHE_VERSION:=        ${_APACHE_VERSION}
332
333 .if exists(${APXS})
334 APXS_PREFIX!=   ${APXS} -q prefix 2> /dev/null || echo NULL
335 .       if ${APXS_PREFIX} == NULL
336 IGNORE= : Your apache does not support DSO modules
337 .       endif
338 .       if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX}
339 IGNORE?=        PREFIX must be equal to APXS_PREFIX.
340 .       endif
341 .endif
342
343 AP_BUILDEXT=    la
344 APACHEMODDIR=   libexec/apache${APACHE_VERSION}
345 APACHEINCLUDEDIR=include/apache${APACHE_VERSION}
346 APACHEETCDIR=   etc/apache${APACHE_VERSION}
347 APACHE_PORT?=   www/apache${APACHE_VERSION}
348
349 PLIST_SUB+=     APACHEMODDIR="${APACHEMODDIR}" \
350                 APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \
351                 APACHEETCDIR="${APACHEETCDIR}" \
352                 APACHE_VERSION="${APACHE_VERSION}"
353
354 SUB_LIST+=      APACHEMODDIR="${APACHEMODDIR}" \
355                 APACHEETCDIR="${APACHEETCDIR}" \
356                 APACHE_VERSION="${APACHE_VERSION}"
357
358 APACHE_PKGNAMEPREFIX=   ap${APACHE_VERSION}-
359
360 .if defined(AP_FAST_BUILD)
361 PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX}
362 .endif
363
364 .if defined(USE_APACHE) || defined(USE_APACHE_BUILD)
365 BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT}
366 .endif
367
368 .if defined(USE_APACHE) || defined(USE_APACHE_RUN)
369 RUN_DEPENDS+=   ${APXS}:${PORTSDIR}/${APACHE_PORT}
370 .endif
371
372 PLIST_SUB+=     AP_NAME="${SHORTMODNAME}"
373 PLIST_SUB+=     AP_MODULE="${MODULENAME}.so"
374
375 .if defined(AP_GENPLIST)
376 PLIST?=         ${WRKDIR}/ap-plist
377 .endif
378
379 .if defined(AP_INC)
380 AP_EXTRAS+=     -I ${AP_INC}
381 .endif
382 .if defined(AP_LIB)
383 AP_EXTRAS+=     -L ${AP_LIB}
384 .endif
385
386 .endif # End of AP_PORT_IS_SERVER   / AP_PORT_IS_MOULE
387 .endif # End of !Apache_Pre_Include
388
389 # ===============================================================
390 .if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)
391 Apache_Post_Include=    bsd.apache.mk
392
393 .if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN)
394 .       if ${USE_APACHE_RUN:C/\-//:S/^22//:S/^24//:C/\+$//} != ""
395 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( ${USE_APACHE_RUN} )
396 .       endif
397 .elif defined(USE_APACHE_RUN)
398 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( no valid version specified )
399 .endif
400
401 .if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD)
402 .       if ${USE_APACHE_BUILD:C/\-//:S/^22//:S/^24//:C/\+$//} != ""
403 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( ${USE_APACHE_BUILD} )
404 .       endif
405 .elif defined(USE_APACHE_BUILD)
406 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( no valid version specified )
407 .endif
408
409 # Check if USE_APACHE(_BUILD|_RUN) are mixed together
410 .if defined(USE_APACHE) && ( defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) )
411 IGNORE= ${_ERROR_MSG} specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN
412 .elif defined(USE_APACHE_BUILD) && defined(USE_APACHE_RUN)
413 IGNORE= ${_ERROR_MSG} use USE_APACHE instead of USE_APACHE_BUILD and USE_APACHE_RUN together
414 .endif
415
416 .if defined(NO_BUILD) && defined(USE_APACHE)
417 BROKEN= If NO_BUILD is used, then USE_APACHE_RUN is sufficient. Please fix your Makefile
418 .endif
419
420 .if defined(AP_PORT_IS_SERVER)
421 .if !target(print-closest-mirrors)
422 print-closest-mirrors:
423         @${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2
424         @MIRRORS=`${FETCH_CMD} -T 30 -qo - http://www.apache.org/dyn/closer.cgi/httpd/ 2> /dev/null\
425         | ${GREP} /httpd/ | ${SED} 's/.*href="\(.*\)"><str.*/\1/g' | \
426         ${HEAD} -7 | ${TAIL} -6` ; \
427         ${ECHO_MSG} done >&2; if [ "x$$MIRRORS" != "x" ]; then \
428         ${ECHO_MSG} -n "MASTER_SITE_APACHE_HTTPD?= ";\
429         ${ECHO_MSG} $$MIRRORS; else \
430         ${ECHO_MSG} "No mirrors found!">&2 ; fi
431 .endif
432
433 .if !target(show-modules)
434 show-modules:
435 .if !empty(APACHE_MODULES)
436 .for module in ${AVAILABLE_MODULES}
437         @${PRINTF} "%-20s : " ${module}
438 .       if ${APACHE_MODULES:M${module}}
439                 @${ECHO} -n "enabled "
440 .               if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}}
441                         @${ECHO_CMD} " (static)"
442 .               else
443                         @${ECHO_CMD} "(shared)"
444 .               endif
445 .       else
446                 @${ECHO_CMD} disabled
447 .       endif
448 .endfor
449 .else
450 .for module in ${AVAILABLE_MODULES}
451         @${PRINTF} "%-20s : disabled\n" ${module}
452 .endfor
453 .endif
454 .endif
455
456 .elif defined(AP_PORT_IS_MODULE)
457
458 .if defined(AP_MODENABLE)
459 AP_MOD_EN=      -a
460 .else
461 AP_MOD_EN=      -A
462 .endif
463 PLIST_SUB+=     AP_MOD_EN="${AP_MOD_EN}"
464
465 .if defined(AP_FAST_BUILD)
466 .if !target(ap-gen-plist)
467 ap-gen-plist:
468 .if defined(AP_GENPLIST)
469 .       if !exists(${PLIST})
470         @${ECHO} "===>  Generating apache plist"
471         @${ECHO} "@unexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST}
472         @${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
473         @${ECHO} "@exec %D/sbin/apxs -e ${AP_MOD_EN} -n %%AP_NAME%% %D/%F" >> ${PLIST}
474         @${ECHO} "@unexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST}
475 .       endif
476 .else
477         @${DO_NADA}
478 .endif
479 .endif
480
481 .if !target(do-build)
482 do-build: ap-gen-plist
483         @cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.${AP_BUILDEXT} ${SRC_FILE}
484 .endif
485
486 .if !target(do-install)
487 do-install:
488 . if defined(NO_STAGE)
489         @${APXS} -i ${AP_MOD_EN} -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT}
490 . else
491         @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}
492         @${APXS} -S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR} -i -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT}
493 .       if !defined(DEBUG)      
494                 @${ECHO_MSG} "===> strip ${APACHEMODDIR}/${MODULENAME}.so"
495                 @[ -e ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so ] && ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so
496 .       else
497                 @${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so"
498 .       endif
499 . endif
500 .endif
501
502 .endif          # defined(AP_FAST_BUILD)
503 .endif          # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE)
504 .endif          # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)