From 26c74f61f666d1c65dff52111fb372ee954bcf38 Mon Sep 17 00:00:00 2001 From: Nicolas Favre-Felix Date: Sat, 24 Jul 2021 13:08:35 -0700 Subject: [PATCH] Clean "*.d" dependency files in "make clean" --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 54295c5..dda94be 100644 --- a/Makefile +++ b/Makefile @@ -55,9 +55,9 @@ DEPS=$(FORMAT_OBJS) $(HIREDIS_OBJ) $(JANSSON_OBJ) $(HTTP_PARSER_OBJS) $(B64_OBJS OBJS=src/webdis.o src/cmd.o src/worker.o src/slog.o src/server.o src/acl.o src/md5/md5.o src/sha1/sha1.o src/http.o src/client.o src/websocket.o src/pool.o src/conf.o $(DEPS) - PREFIX ?= /usr/local CONFDIR ?= $(DESTDIR)/etc +SELF_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) INSTALL_DIRS = $(DESTDIR)$(PREFIX) \ $(DESTDIR)$(PREFIX)/bin \ @@ -79,6 +79,7 @@ $(INSTALL_DIRS): clean: rm -f $(OBJS) $(OUT) $(OBJS_DEPS) + find "$(SELF_DIR)" -name '*.d' -delete install: $(OUT) $(INSTALL_DIRS) cp $(OUT) $(DESTDIR)$(PREFIX)/bin