summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham.Dumpleton <devnull@localhost>2007-07-31 12:13:08 +0000
committerGraham.Dumpleton <devnull@localhost>2007-07-31 12:13:08 +0000
commit38b0ab4445794885bea8778719eb11e182ae7aa4 (patch)
tree80c36f22391b3c8dcfc40a867f1e6f48cf3153f3
parent98eea4702fd9c7fff258ec42a1f90f95cc591633 (diff)
downloadmod_wsgi-38b0ab4445794885bea8778719eb11e182ae7aa4.tar.gz
Add support in makefiles for setting DESTDIR on installation so as to install
in fake root for packaging.
-rw-r--r--Makefile-1.X.in14
-rw-r--r--Makefile-2.X.in14
-rwxr-xr-xconfigure6
-rw-r--r--configure.ac3
4 files changed, 28 insertions, 9 deletions
diff --git a/Makefile-1.X.in b/Makefile-1.X.in
index 2fc01ac..f305971 100644
--- a/Makefile-1.X.in
+++ b/Makefile-1.X.in
@@ -12,8 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-APXS=@APXS@
-PYTHON=@PYTHON@
+APXS = @APXS@
+PYTHON = @PYTHON@
+
+DESTDIR =
+LIBEXECDIR = @LIBEXECDIR@
CPPFLAGS = @CPPFLAGS@
CFLAGS =
@@ -25,8 +28,11 @@ all : mod_wsgi.so
mod_wsgi.so : mod_wsgi.c
$(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS)
-install : all
- $(APXS) -i -n 'mod_wsgi' mod_wsgi.so
+$(DESTDIR)$(LIBEXECDIR) :
+ mkdir -p $@
+
+install : all $(DESTDIR)$(LIBEXECDIR)
+ $(APXS) -i -S LIBEXECDIR=$(DESTDIR)$(LIBEXECDIR) -n 'mod_wsgi' mod_wsgi.so
clean :
-rm -f mod_wsgi.o mod_wsgi.so
diff --git a/Makefile-2.X.in b/Makefile-2.X.in
index 34f014c..dc42ce9 100644
--- a/Makefile-2.X.in
+++ b/Makefile-2.X.in
@@ -12,8 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-APXS=@APXS@
-PYTHON=@PYTHON@
+APXS = @APXS@
+PYTHON = @PYTHON@
+
+DESTDIR =
+LIBEXECDIR = @LIBEXECDIR@
CPPFLAGS = @CPPFLAGS@
CFLAGS =
@@ -25,8 +28,11 @@ all : mod_wsgi.la
mod_wsgi.la : mod_wsgi.c
$(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS)
-install : all
- $(APXS) -i -n 'mod_wsgi' mod_wsgi.la
+$(DESTDIR)$(LIBEXECDIR) :
+ mkdir -p $@
+
+install : all $(DESTDIR)$(LIBEXECDIR)
+ $(APXS) -i -S LIBEXECDIR=$(DESTDIR)$(LIBEXECDIR) -n 'mod_wsgi' mod_wsgi.la
clean :
-rm -rf .libs
diff --git a/configure b/configure
index 024d1b3..ed43096 100755
--- a/configure
+++ b/configure
@@ -272,7 +272,7 @@ PACKAGE_STRING=
PACKAGE_BUGREPORT=
ac_unique_file="mod_wsgi.c"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS APXS PYTHON CPPFLAGS LDFLAGS LDLIBS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS APXS PYTHON CPPFLAGS LDFLAGS LDLIBS LIBEXECDIR LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1392,6 +1392,9 @@ HTTPD_VERSION=`$HTTPD -v | awk '/version/ {print $3}' | awk -F/ '{print $2}'`
echo "$as_me:$LINENO: result: $HTTPD_VERSION" >&5
echo "${ECHO_T}$HTTPD_VERSION" >&6
+LIBEXECDIR="`${APXS} -q LIBEXECDIR`"
+
+
HTTPD_MAJOR_VERSION=`echo ${HTTPD_VERSION} | sed -e 's/\..*//'`
rm -f Makefile.in
@@ -2037,6 +2040,7 @@ s,@PYTHON@,$PYTHON,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@LDLIBS@,$LDLIBS,;t t
+s,@LIBEXECDIR@,$LIBEXECDIR,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
diff --git a/configure.ac b/configure.ac
index 270fb03..e9f80cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,9 @@ HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
HTTPD_VERSION=`$HTTPD -v | awk '/version/ {print $3}' | awk -F/ '{print $2}'`
AC_MSG_RESULT($HTTPD_VERSION)
+LIBEXECDIR="`${APXS} -q LIBEXECDIR`"
+AC_SUBST(LIBEXECDIR)
+
HTTPD_MAJOR_VERSION=`echo ${HTTPD_VERSION} | sed -e 's/\..*//'`
rm -f Makefile.in