On Fri, Jul 31, 2020 at 01:01:49PM +0500, ???? ??????? wrote: > From 2fd7431ed6e94fb48332e57ae569f194e38c1b11 Mon Sep 17 00:00:00 2001 > From: Ilya Shipitsin <chipits...@gmail.com> > Date: Fri, 31 Jul 2020 12:57:33 +0500 > Subject: [PATCH] BUILD: simplify usage of env defined variables > > if SLZ_INC, SLZ_LIB, ZLIB_INC, ZLIB_LIB, ADDLIB, ADDINC are defined > as environment variables they might be picked from Makefile easy.
No, please don't inherit environment variables in makefiles, this is a disaster and must never ever be done. This is one of the main problems causing builds to randomly fail at various places and is the reason why some tools have to perform preliminary checks to force you to unset some variables to avoid this risk. The variables in the makefile were purposely defined as empty so that they are not accidently inherited from the environment. If anyone wants to use them from environment, it's trivial enough to pass SSL_LIB=$SSL_LIB SSL_INC=$SSL_INC etc. > The same way SSL_LIB, SSL_INC are used. I'd rather take a patch so that SSL_LIB and SSL_INC are purposely pre-initialized to empty values for the same reason, and to ensure consistency! I think the only reason why it's not the case is that given they are conditionally used we didn't notice. Thanks! Willy