From: Junio C Hamano Date: Wed, 03 Sep 2014 20:58:33 GMT Subject: Re: [PATCH] Makefile: add NO_CLOCK_GETTIME check Message-ID: In-Reply-To: Junio C Hamano writes: >> +ifndef NO_CLOCK_GETTIME >> ifdef HAVE_CLOCK_GETTIME >> BASIC_CFLAGS += -DHAVE_CLOCK_GETTIME >> EXTLIBS += -lrt >> endif >> +endif > > I am not sure why you even need this change. Wouldn't you get > exactly the same result if you did not define HAVE_CLOCK_GETTIME > when building? That is, doing something like: $ make HAVE_CLOCK_GETTIME= V=1 would show lines like: cc -o credential-store.o -c -MF ./.depend/credential-store.o.d -MQ credential-store.o -MMD -MP -O2 -Wall -Wvla -Wdeclaration-after-statement -Wno-format-zero-length -g -I. -DHAVE_ALLOCA_H -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DSHA1_HEADER='"block-sha1/sha1.h"' -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"' credential-store.c that does not have -DHAVE_CLOCK_GETTIME on the command line, no?