From b1459c6cdc37ae5cbe0459133cf2ea2b5444c9b1 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Wed, 14 Dec 2016 21:42:43 -0500 Subject: [PATCH] only remove src/version.hpp if git repo and git available --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1116ca2f..895615e7 100644 --- a/Makefile +++ b/Makefile @@ -132,8 +132,12 @@ obj/%.o: src/%.cpp $(CXX) $(CFLAGS) -c $< -o $@ clean: rpm-clean - $(RM) -rf obj +ifneq ($(GIT),) +ifeq ($(shell test -e .git; echo $$?),0) $(RM) -f src/version.hpp +endif +endif + $(RM) -rf obj $(RM) -f "$(TARGET)" mount.mergerfs $(FIND) . -name "*~" -delete