make clean will indeed clean your compilation directory.
My advice would be to:
- clean the compilation directory, NOT the install dir
- recompile with zlib support
- install in another dir
- change the currently installed non zlib haproxy to another path
which translates in bash to
make clean
make TARGET=linux26 USE_OPENSSL=1 USE_ZLIB=1 ADDLIB=-lz
make PREFIX=/usr/local/haproxy-zlibed install
mv /usr/local/haproxy /usr/local/haproxy-not-zlibed
ln -s /usr/local/haproxy-not-zlibed /usr/local/haproxy
At this point you're in the exact same situation as you were before.
then use symbolic links to switch from your current haproxy to the other:
use the current haproxy (without zlib)
rm -fr /usr/local/haproxy
ln -s /usr/local/haproxy-not-zlibed /usr/local/haproxy
and restart haproxy your usual way
or, to use the haproxy with zlib support
rm -fr /usr/local/haproxy
ln -s /usr/local/haproxy-zlibed /usr/local/haproxy
and restart haproxy your usual way
That way you can test your new zlibd haproxy and rollback if necessary