diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2014-05-09 09:07:50 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-05-13 09:42:03 -0400 |
commit | 6ded56c9f9664b5c47b2b2899b1eb6db92e2d815 (patch) | |
tree | f7237777876c5da0b5c73417c234e8b72c1a7a48 /meta-openstack/recipes-support/mod-wsgi | |
parent | c7185e4dfe4c49c6bbe0b3533257cd8bf8135f7c (diff) | |
download | meta-cloud-services-6ded56c9f9664b5c47b2b2899b1eb6db92e2d815.tar.gz |
mod-wsgi: allow builds with separated src/build dirs
Unfortunately the use of apxs, which isn't that friendly with
separated src/build dirs, makes things tricky to acheive src/build
separation. With the use of a symlink and a few other minor tweaks we
are able to get this working.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-support/mod-wsgi')
-rw-r--r-- | meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch | 70 | ||||
-rw-r--r-- | meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb | 1 |
2 files changed, 71 insertions, 0 deletions
diff --git a/meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch b/meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch new file mode 100644 index 0000000..69be4b4 --- /dev/null +++ b/meta-openstack/recipes-support/mod-wsgi/files/build-fix-builds-that-have-separated-build-dir.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 38da2cc5292b3287dd12727faa4bfaedd31e170d Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 1 May 2014 09:04:36 -0400 | ||
4 | Subject: [PATCH] build: fix builds that have separated build dir | ||
5 | |||
6 | Setting up the link to the Makefile.in fails since it assumes | ||
7 | the build is happening in the src directory. As well the Makefile.in | ||
8 | doesn't make use of VPATH to allow for builds out of the src dir. | ||
9 | |||
10 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
11 | --- | ||
12 | configure.ac | 6 +++++- | ||
13 | posix-ap2X.mk.in | 10 ++++++---- | ||
14 | 2 files changed, 11 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index eecaee2..40b263d 100644 | ||
18 | --- a/configure.ac | ||
19 | +++ b/configure.ac | ||
20 | @@ -209,6 +209,10 @@ AC_SUBST(LIBEXECDIR) | ||
21 | HTTPD_MAJOR_VERSION=`echo ${HTTPD_VERSION} | sed -e 's/\..*//'` | ||
22 | |||
23 | rm -f Makefile.in | ||
24 | -ln -s posix-ap${HTTPD_MAJOR_VERSION}X.mk.in Makefile.in | ||
25 | +ln -s ${srcdir}/posix-ap${HTTPD_MAJOR_VERSION}X.mk.in Makefile.in | ||
26 | + | ||
27 | +dnl apxs creates artifacts where the .c file lives, so to get build separation we need to use a link | ||
28 | +rm -f mod_wsgi.c | ||
29 | +ln -s ${srcdir}/mod_wsgi.c mod_wsgi.c | ||
30 | |||
31 | AC_OUTPUT(Makefile) | ||
32 | diff --git a/posix-ap2X.mk.in b/posix-ap2X.mk.in | ||
33 | index 195cdea..de28f8a 100644 | ||
34 | --- a/posix-ap2X.mk.in | ||
35 | +++ b/posix-ap2X.mk.in | ||
36 | @@ -15,6 +15,8 @@ | ||
37 | APXS = @APXS@ | ||
38 | PYTHON = @PYTHON@ | ||
39 | |||
40 | +VPATH = @srcdir@ | ||
41 | + | ||
42 | DESTDIR = | ||
43 | LIBEXECDIR = @LIBEXECDIR@ | ||
44 | |||
45 | @@ -26,7 +28,7 @@ LDLIBS = @LDLIBS@ | ||
46 | all : mod_wsgi.la | ||
47 | |||
48 | mod_wsgi.la : mod_wsgi.c | ||
49 | - $(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS) | ||
50 | + $(APXS) -c $(CPPFLAGS) $(CFLAGS) $< $(LDFLAGS) $(LDLIBS) -o $@ | ||
51 | |||
52 | $(DESTDIR)$(LIBEXECDIR) : | ||
53 | mkdir -p $@ | ||
54 | @@ -38,10 +40,10 @@ clean : | ||
55 | -rm -rf .libs | ||
56 | -rm -f mod_wsgi.o mod_wsgi.la mod_wsgi.lo mod_wsgi.slo mod_wsgi.loT | ||
57 | -rm -f config.log config.status | ||
58 | - -rm -rf autom4te.cache | ||
59 | + -rm -rf @srcdir@/autom4te.cache | ||
60 | |||
61 | distclean : clean | ||
62 | - -rm -f Makefile Makefile.in | ||
63 | + -rm -f Makefile Makefile.in mod_wsgi.c | ||
64 | |||
65 | realclean : distclean | ||
66 | - -rm -f configure | ||
67 | + -rm -f @srcdir@/configure @srcdir@/config.guess @srcdir@/config.sub | ||
68 | -- | ||
69 | 1.8.3.2 | ||
70 | |||
diff --git a/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb b/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb index 650a3d5..c221b6b 100644 --- a/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb +++ b/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb | |||
@@ -13,6 +13,7 @@ SRCNAME = "mod_wsgi" | |||
13 | SRC_URI = "\ | 13 | SRC_URI = "\ |
14 | http://modwsgi.googlecode.com/files/${SRCNAME}-${PV}.tar.gz \ | 14 | http://modwsgi.googlecode.com/files/${SRCNAME}-${PV}.tar.gz \ |
15 | file://configure_var.patch \ | 15 | file://configure_var.patch \ |
16 | file://build-fix-builds-that-have-separated-build-dir.patch \ | ||
16 | " | 17 | " |
17 | 18 | ||
18 | S = "${WORKDIR}/${SRCNAME}-${PV}" | 19 | S = "${WORKDIR}/${SRCNAME}-${PV}" |