summaryrefslogtreecommitdiff
path: root/www/apache/module.mk
blob: 639d16970da82ee72f7135bf6b21423a36b5dfc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# $NetBSD: module.mk,v 1.2 2003/02/17 17:47:52 grant Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install apache modules.
#
# The following targets are provided by this file:
#
# do-build		builds the module using APXS.
#
# do-install		installs the module using APXS.
#
# The following variables may be set prior to including this file:
#
# APACHE_MODULE_NAME	the name of this module, including the .so suffix.
#
# APACHE_MODULE_SRCDIR	the location of the source files for this module,
#			defaults to WRKSRC.
#
# APACHE_MODULE_SRC	the source files to be compiled for this module.
#

.if !defined(_APACHE_MODULE_MK)
_APACHE_MODULE_MK=	# defined
APACHE_MODULE=		# defined

.include "../../www/apache/buildlink2.mk"

APACHE_MODULE_SRCDIR?=	${WRKSRC}

apache-module-build:
	${_PKG_SILENT}${_PKG_DEBUG}					\
	cd ${APACHE_MODULE_SRCDIR} && ${APXS} -c -o			\
		${APACHE_MODULE_NAME} ${APACHE_MODULE_SRC}

do-build: apache-module-build
	${_PKG_SILENT}${_PKG_DEBUG}${DO_NADA}

apache-module-install:
	${_PKG_SILENT}${PKG_DEBUG}					\
	cd ${APACHE_MODULE_SRCDIR} && ${APXS} -i ${APACHE_MODULE_NAME}

do-install: apache-module-install
	${_PKG_SILENT}${_PKG_DEBUG}${DO_NADA}

.endif	# _APACHE_MODULE_MK