From 993b4c92b035987e4c7c7e318dc8f345e58b09b6 Mon Sep 17 00:00:00 2001 From: Kill Your TV Date: Sat, 20 Dec 2014 20:11:55 +0000 Subject: [PATCH] slightly stricter use of mkdir/rm -rf --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d8de173a..9b3056da 100644 --- a/Makefile +++ b/Makefile @@ -34,9 +34,11 @@ api: $(SHLIB) # weaker rule for building files without headers obj/%.o : %.cpp + @test -d obj || mkdir obj $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< obj/%.o : %.cpp %.h + @test -d obj || mkdir obj $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< $(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) @@ -48,7 +50,8 @@ ifneq ($(USE_STATIC),yes) endif clean: - rm -fr obj $(I2PD) $(SHLIB) + test -d obj && $(RM) -rf obj + $(RM) -f $(I2PD) $(SHLIB) LATEST_TAG=$(shell git describe --tags --abbrev=0 master) dist: