Skip to content

Commit

Permalink
Rename src/obj/test to src/obj-test to workaround bug in older GNU Make
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Jan 23, 2012
1 parent ca9afa8 commit 34c6903
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ all: bitcoind

# auto-generated dependencies:
-include obj/*.P
-include obj/test/*.P
-include obj-test/*.P

obj/%.o: %.cpp
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
Expand All @@ -123,9 +123,9 @@ obj/%.o: %.cpp
bitcoind: $(OBJS:obj/%=obj/%)
$(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)

TESTOBJS := $(patsubst test/%.cpp,obj/test/%.o,$(wildcard test/*.cpp))
TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))

obj/test/%.o: test/%.cpp
obj-test/%.o: test/%.cpp
$(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
Expand All @@ -138,6 +138,6 @@ test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
clean:
-rm -f bitcoind test_bitcoin
-rm -f obj/*.o
-rm -f obj/test/*.o
-rm -f obj-test/*.o
-rm -f obj/*.P
-rm -f obj/test/*.P
-rm -f obj-test/*.P
2 changes: 2 additions & 0 deletions src/obj-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore

0 comments on commit 34c6903

Please sign in to comment.