Skip to content

Commit 2dd0046

Browse files
committed
Add buildconf option to force (rather than suppress) regeneration of
the ap_expr parser. Add a Travis job which uses this, so a patch which changes the parser sources is tested appropriately (e.g PR#72). * buildconf: Add --with-regen-expr to force ap_expr regeneration. * .travis.yml, test/travis_run_linux.sh: Pass BUILDCONF to buildconf and add job which uses the new option. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869697 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7994f49 commit 2dd0046

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ matrix:
6262
- libnghttp2-dev
6363
- libjansson-dev
6464
# -------------------------------------------------------------------------
65+
- name: Linux Ubuntu, Regenerate ap_expr
66+
os: linux
67+
env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror"
68+
BUILDCONFIG="--with-regen-expr"
69+
# -------------------------------------------------------------------------
6570
- if: branch != 2.4.x
6671
name: Linux Ubuntu, APR trunk
6772
env: APR_VERSION=trunk APR_CONFIG="--with-crypto"

buildconf

+24-8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ esac
3737
apr_src_dir="srclib/apr ../apr"
3838
apu_src_dir=""
3939

40+
# By default, touch the checked-in sources to suppress regeneration of
41+
# the ap_expr parser.
42+
regen_expr=no
43+
4044
while test $# -gt 0
4145
do
4246
# Normalize
@@ -54,6 +58,10 @@ do
5458
apu_src_dir=$optarg
5559
;;
5660

61+
--with-regen-expr)
62+
regen_expr=yes
63+
;;
64+
5765
-h|--help)
5866
cat <<EOF
5967
buildconf: generates the files needed to configure httpd.
@@ -74,6 +82,9 @@ Configuration:
7482
"apr" replaced with "apr-util" or "aprutil". Ignored
7583
in APR-Config Mode.
7684
85+
--with-regen-expr suppress the timestamp adjustment which prevents the
86+
rebuild of the ap_expr expression parser
87+
7788
APR-Config Mode:
7889
7990
When passing an apr-config executable to --with-apr, buildconf will attempt to
@@ -316,13 +327,18 @@ if [ -f `which cut` ]; then
316327
> httpd.spec )
317328
fi
318329

319-
# ensure that the ap_expr expression parser sources are never regenerated
320-
# when running make
321-
echo fixing timestamps for ap_expr sources
322-
cd server
323-
touch util_expr_parse.y util_expr_scan.l
324-
sleep 1
325-
touch util_expr_parse.c util_expr_parse.h util_expr_scan.c
326-
cd ..
330+
if [ x$regen_expr = xno ]; then
331+
# ensure that the ap_expr expression parser sources are never regenerated
332+
# when running make
333+
echo buildconf: Fixing timestamps for ap_expr sources to prevent regeneration
334+
cd server
335+
touch util_expr_parse.y util_expr_scan.l
336+
sleep 1
337+
touch util_expr_parse.c util_expr_parse.h util_expr_scan.c
338+
cd ..
339+
else
340+
echo buildconf: Fixing timestamps for ap_expr sources to ensure regeneration
341+
touch server/util_expr_parse.[yl]
342+
fi
327343

328344
exit 0

test/travis_run_linux.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -ex
22
### Installed apr/apr-util don't include the *.m4 files but the
33
### Debian packages helpfully install them, so use the system APR to buildconf
4-
./buildconf --with-apr=/usr/bin/apr-1-config
4+
./buildconf --with-apr=/usr/bin/apr-1-config ${BUILDCONFIG}
55
# For trunk, "make check" is sufficient to run the test suite.
66
# For 2.4.x, the test suite must be run manually
77
if test ! -v SKIP_TESTING; then

0 commit comments

Comments
 (0)