1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

Makefile: mkdir .depends only when needed

Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
Kai Krakow 2018-11-08 02:52:47 +01:00
parent d4535901a5
commit f2dec480a6
No known key found for this signature in database
GPG Key ID: 046FAC3028D76321
3 changed files with 12 additions and 6 deletions

View File

@ -25,8 +25,10 @@ include ../Defines.mk
configure.h: configure.h.in configure.h: configure.h.in
$(TEMPLATE_COMPILER) $(TEMPLATE_COMPILER)
.depends/%.dep: %.cc configure.h Makefile .depends:
@mkdir -p .depends mkdir -p $@
.depends/%.dep: %.cc configure.h Makefile | .depends
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $< $(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep) depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep)

View File

@ -23,8 +23,10 @@ bees-version.c: bees.h $(BEES_OBJS:.o=.cc) Makefile
echo "const char *BEES_VERSION = \"$(BEES_VERSION)\";" > bees-version.new.c echo "const char *BEES_VERSION = \"$(BEES_VERSION)\";" > bees-version.new.c
mv -f bees-version.new.c bees-version.c mv -f bees-version.new.c bees-version.c
.depends/%.dep: %.cc Makefile .depends:
@mkdir -p .depends mkdir -p $@
.depends/%.dep: %.cc Makefile | .depends
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $< $(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
depends.mk: $(BEES_OBJS:%.o=.depends/%.dep) depends.mk: $(BEES_OBJS:%.o=.depends/%.dep)

View File

@ -18,8 +18,10 @@ include ../makeflags
LIBS = -lcrucible -lpthread LIBS = -lcrucible -lpthread
LDFLAGS = -L../lib -Wl,-rpath=$(shell realpath ../lib) LDFLAGS = -L../lib -Wl,-rpath=$(shell realpath ../lib)
.depends/%.dep: %.cc tests.h Makefile .depends:
@mkdir -p .depends mkdir -p $@
.depends/%.dep: %.cc tests.h Makefile | .depends
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $< $(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
depends.mk: $(PROGRAMS:%=.depends/%.dep) depends.mk: $(PROGRAMS:%=.depends/%.dep)