summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorgrant <grant>2003-02-17 17:32:08 +0000
committergrant <grant>2003-02-17 17:32:08 +0000
commit6c3c83ccf1289b18e2cc3630e1a8c97f08c7a02d (patch)
tree97803fa7e2bb5588d1c334bd0742d243bd988339 /www
parent830237a803e52eb0cf9265793602c3e3de7e3ff9 (diff)
downloadpkgsrc-6c3c83ccf1289b18e2cc3630e1a8c97f08c7a02d.tar.gz
add makefile fragment for Apache modules.
This provides a build and install target to simplify the writing of Apache module Makefiles. ok'd by wiz.
Diffstat (limited to 'www')
-rw-r--r--www/apache/module.mk47
1 files changed, 47 insertions, 0 deletions
diff --git a/www/apache/module.mk b/www/apache/module.mk
new file mode 100644
index 00000000000..c0995b4fba4
--- /dev/null
+++ b/www/apache/module.mk
@@ -0,0 +1,47 @@
+# $NetBSD: module.mk,v 1.1 2003/02/17 17:32:08 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"
+
+# for APXS
+USE_PERL5= build
+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