[Dovecot] Re: Dovecot 1.0beta3 - make fails without sql
The problem seems to be in src/lib-sql/Makefile[.in]
When there are no sql drivers to build, the shell-script for making sql-drivers-register.c fails.
I've managed to get it to build by just having
#include "lib.h" #include "sql-api.h" void sql_drivers_register_all(void) { }
as sql-drivers-register.c
Best Wishes, Chris
P.S. I meant to send the message below to the whole list rather than just Timo. Sorry!
Chris Wakelin wrote:
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
Timo Sirainen wrote:
Darn! Solaris still doesn't like it (and it appears to be using bash as the shell)
make sql-drivers-register.c
rm -f sql-drivers-register.c echo '/* this file automatically generated by Makefile */'
How about :-
sql-drivers-register.c: Makefile
rm -f $@
echo '/* this file automatically generated by Makefile */' >$@
echo '#include "lib.h"' >>$@
echo '#include "sql-api.h"' >>$@
for i in $(sql_drivers) null ; do
if [ "$${i}" != "null" ]; then
echo "extern struct sql_db driver_$${i}_db;" >>$@ ;
fi
done
echo 'void sql_drivers_register_all(void) {' >>$@
for i in $(sql_drivers) null ; do
if [ "$${i}" != "null" ]; then
echo "sql_driver_register(&driver_$${i}_db);" >>$@ ;
fi
done
echo '}' >>$@
I'm not too good at Makefiles (what needs escaping etc.) but it seems to work, at least on Solaris when $(sql_drivers) is empty ...
Best Wishes, Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
participants (2)
-
Chris Wakelin
-
Timo Sirainen