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.
This commit is contained in:
Ross Lagerwall 2013-09-15 21:48:15 +02:00
parent 197abd8bf3
commit 243386ccc2
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)