]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
Makefile: simplify silent cleaning
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 23 Mar 2020 06:06:24 +0000 (00:06 -0600)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 23 Mar 2020 06:06:24 +0000 (00:06 -0600)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/Makefile

index ec5d3a6041616e89e3c3c523a07790d97b2791da..341a90e1ef08ed3459927a8d6d929fc565315f69 100644 (file)
@@ -67,18 +67,14 @@ LINK.o += $(BUILT_IN_LINK.o)
 BUILT_IN_COMPILE.c := $(COMPILE.c)
 COMPILE.c = @echo "  CC      $@";
 COMPILE.c += $(BUILT_IN_COMPILE.c)
+BUILT_IN_RM := $(RM)
+RM := @a() { echo "  CLEAN   $$@"; $(BUILT_IN_RM) "$$@"; }; a
 endif
 
 wg: $(sort $(patsubst %.c,%.o,$(wildcard *.c)))
 
-ifneq ($(V),1)
-clean:
-       @echo "  CLEAN   {wg,*.o,*.d}"
-       @$(RM) wg *.o *.d
-else
 clean:
        $(RM) wg *.o *.d
-endif
 
 install: wg
        @install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 wg "$(DESTDIR)$(BINDIR)/wg"