From 0610683d5e7565f997057afb74aef5cb941d04a0 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 6 Jul 2016 12:56:43 +0200 Subject: [PATCH] Makefile: don't build dependencies file for clean, distclean. --- src/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Makefile b/src/Makefile index 5c2ef9f2..480ebef6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,6 +16,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh') uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') OPTIMIZATION?=-O2 DEPENDENCY_TARGETS=hiredis linenoise lua geohash-int +NODEPS:=clean distclean # Default settings STD=-std=c99 -pedantic -DREDIS_STATIC='' @@ -145,7 +146,9 @@ all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCH Makefile.dep: -$(REDIS_CC) -MM *.c > Makefile.dep 2> /dev/null || true +ifeq (0, $(words $(findstring $(MAKECMDGOALS), $(NODEPS)))) -include Makefile.dep +endif .PHONY: all