From 14d0bb4767cba22b826eae03a6e5cfa4c1cd4287 Mon Sep 17 00:00:00 2001 From: gdh1995 Date: Wed, 13 Jan 2016 18:20:41 +0800 Subject: [PATCH] use relative paths on making build/tools/ links The old uses `abspath`, which I think is so harmful: * If I `cp -a` the whole project, `build/tools/caffe` still refer to the old file, until `make clean`, making debugging very hard * For `tar` and `scp`, the soft links can not work unless the target project folder has the same path --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 787b0e8d036..76d51ad8bd0 100644 --- a/Makefile +++ b/Makefile @@ -601,7 +601,7 @@ $(TEST_CXX_BINS): $(TEST_BIN_DIR)/%.testbin: $(TEST_CXX_BUILD_DIR)/%.o \ # Target for extension-less symlinks to tool binaries with extension '*.bin'. $(TOOL_BUILD_DIR)/%: $(TOOL_BUILD_DIR)/%.bin | $(TOOL_BUILD_DIR) @ $(RM) $@ - @ ln -s $(abspath $<) $@ + @ ln -s $(notdir $<) $@ $(TOOL_BINS): %.bin : %.o | $(DYNAMIC_NAME) @ echo CXX/LD -o $@