Re: [PATCH] Makefile: add NO_CLOCK_GETTIME check
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 3, 2014, 20:58 UTC
- Message-ID
- <xmqqsik8whdy.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqwq9kwkrg.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
>> +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.cthat does not have -DHAVE_CLOCK_GETTIME on the command line, no?