From 243386ccc292a99906bff5d0ecbde673b36754d0 Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Sun, 15 Sep 2013 21:48:15 +0200 Subject: [PATCH] rpcgen: Generate regress.gen.[c,h] in build rather than src dir Currently an out-of-tree build will either write to the src dir or reuse the existing regress.gen.[c,h]. But if building from a read-only git tree (or if the git dir is cleaned), these files will not exist and the build fails. So write the files to the build dir. If the system does not have python, the regress.gen.[c,h] will be used from the src dir if they exist. --- test/include.am | 2 +- test/rpcgen_wrapper.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/include.am b/test/include.am index 1648dcc3..930d8422 100644 --- a/test/include.am +++ b/test/include.am @@ -107,7 +107,7 @@ test_regress_SOURCES += test/regress_iocp.c endif test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la $(PTHREAD_LIBS) $(ZLIB_LIBS) -test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS) +test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS) -Itest test_regress_LDFLAGS = $(PTHREAD_CFLAGS) if OPENSSL diff --git a/test/rpcgen_wrapper.sh b/test/rpcgen_wrapper.sh index 0ba5d4f4..aaa03031 100755 --- a/test/rpcgen_wrapper.sh +++ b/test/rpcgen_wrapper.sh @@ -37,7 +37,8 @@ fi srcdir=$1 srcdir=${srcdir:-.} -${PYTHON2} ${srcdir}/../event_rpcgen.py --quiet ${srcdir}/regress.rpc +${PYTHON2} ${srcdir}/../event_rpcgen.py --quiet ${srcdir}/regress.rpc \ + test/regress.gen.h test/regress.gen.c case "$?" in 0)