Skip to content

Commit ceb486a

Browse files
committed
Remove "$/" shortcut in makefiles
1 parent dac34e7 commit ceb486a

File tree

5 files changed

+16
-22
lines changed

5 files changed

+16
-22
lines changed

mk/main.mk

+5-11
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
.PHONY: default-goal
1010
default-goal: real-default-goal
1111

12-
# $/ is a shorthand for $(TOP)/, without the leading ./
13-
/ := $(patsubst ./%,%,$(TOP)/)
14-
1512
# check-env.mk provides check-env-start and check-env-check
1613
include $(TOP)/mk/check-env.mk
1714

@@ -30,28 +27,25 @@ include $(TOP)/mk/paths.mk
3027
# Download and build internal tools like v8 and gperf
3128
include $(TOP)/mk/support/build.mk
3229

33-
ifeq (Windows,$(OS))
34-
3530
# make install
3631
include $(TOP)/mk/install.mk
3732

33+
ifeq (Windows,$(OS))
34+
3835
# Windows build
39-
include $/mk/windows.mk
36+
include $(TOP)/mk/windows.mk
4037

4138
# Python driver
42-
include $/drivers/python/build.mk
39+
include $(TOP)/drivers/python/build.mk
4340

4441
# JavaScript driver
45-
include $/drivers/javascript/build.mk
42+
include $(TOP)/drivers/javascript/build.mk
4643

4744
# Build the web assets
4845
include $(TOP)/admin/build.mk
4946

5047
else # Windows
5148

52-
# make install
53-
include $(TOP)/mk/install.mk
54-
5549
# Clients drivers
5650
include $(TOP)/drivers/build.mk
5751

mk/packaging.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ DEB_CONTROL_ROOT := $(DEB_PACKAGE_DIR)/DEBIAN
1515
DIST_FILE_LIST_REL := admin demos drivers mk packaging scripts src test
1616
DIST_FILE_LIST_REL += configure COPYRIGHT Makefile NOTES.md README.md
1717

18-
DIST_FILE_LIST := $(foreach x,$(DIST_FILE_LIST_REL),$/$x)
18+
DIST_FILE_LIST := $(foreach x,$(DIST_FILE_LIST_REL),$(TOP)/$x)
1919

2020
RETHINKDB_VERSION_DEB := $(subst -,+,$(RETHINKDB_VERSION))~$(PACKAGE_BUILD_NUMBER)$(UBUNTU_RELEASE)$(DEB_RELEASE)
2121

mk/support/build.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ifeq (Windows,$(OS))
3131
PKG_SCRIPT_VARIABLES += DEBUG PLATFORM MSBUILD VCVARSALL CMAKE
3232
endif
3333

34-
PKG_SCRIPT = $(foreach v, $(PKG_SCRIPT_VARIABLES), $v='$($v)') MAKEFLAGS='$(PKG_MAKEFLAGS)' $/mk/support/pkg/pkg.sh
34+
PKG_SCRIPT = $(foreach v, $(PKG_SCRIPT_VARIABLES), $v='$($v)') MAKEFLAGS='$(PKG_MAKEFLAGS)' $(TOP)/mk/support/pkg/pkg.sh
3535
PKG_SCRIPT_TRACE = TRACE=1 $(PKG_SCRIPT)
3636
PKG_RECURSIVE_MARKER := $(if $(findstring 0,$(JUST_SCAN_MAKEFILES)),$(if $(DRY_RUN),,+))
3737

mk/windows.mk

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ else
66
CONFIGURATION := Release
77
endif
88

9-
$/rethinkdb.vcxproj.xml:
10-
test -e $@ || sed "s/RETHINKDB_VERSION/`$/scripts/gen-version.sh`/" < $/mk/rethinkdb.vcxproj.xml > $@
9+
$(TOP)/rethinkdb.vcxproj.xml:
10+
test -e $@ || sed "s/RETHINKDB_VERSION/`$(TOP)/scripts/gen-version.sh`/" < $(TOP)/mk/rethinkdb.vcxproj.xml > $@
1111

12-
$/%.vcxproj $/%-unittest.vcxproj: $/%.vcxproj.xml $/mk/%.vcxproj.xsl
12+
$(TOP)/%.vcxproj $(TOP)/%-unittest.vcxproj: $(TOP)/%.vcxproj.xml $(TOP)/mk/%.vcxproj.xsl
1313
$P GEN
14-
cscript /nologo $/mk/gen-vs-project.js
14+
cscript /nologo $(TOP)/mk/gen-vs-project.js
1515

1616
.PHONY: windows-all
17-
windows-all: $/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb.exe
17+
windows-all: $(TOP)/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb.exe
1818
ifeq (1,$(DEBUG))
19-
windows-all: $/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb-unittest.exe
19+
windows-all: $(TOP)/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb-unittest.exe
2020
endif
2121

2222
SOURCES := $(shell find $(SOURCE_DIR) \( -name '*.cc' -or -name '*.hpp' -or -name '*.tcc' \) -and -not -name '\.*')
@@ -35,11 +35,11 @@ ifneq (1,$(VERBOSE))
3535
MSBUILD_FLAGS += /verbosity:minimal
3636
endif
3737

38-
$/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb.exe: $/rethinkdb.vcxproj $(SOURCES_NOUNIT) $(LIB_DEPS) $(PROTO_DEPS)
38+
$(TOP)/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb.exe: $(TOP)/rethinkdb.vcxproj $(SOURCES_NOUNIT) $(LIB_DEPS) $(PROTO_DEPS)
3939
$P MSBUILD
4040
"$(MSBUILD)" $(MSBUILD_FLAGS) $<
4141

42-
$/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb-unittest.exe: $/rethinkdb-unittest.vcxproj $(SOURCES) $(LIB_DEPS) $(PROTO_DEPS)
42+
$(TOP)/build/$(CONFIGURATION)_$(PLATFORM)/rethinkdb-unittest.exe: $(TOP)/rethinkdb-unittest.vcxproj $(SOURCES) $(LIB_DEPS) $(PROTO_DEPS)
4343
$P MSBUILD
4444
"$(MSBUILD)" $(MSBUILD_FLAGS) $<
4545

test/build.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test-deps: $(BUILD_DIR)/rethinkdb $(BUILD_DIR)/rethinkdb-unittest web-assets rb-
55
.PHONY: test
66
test: test-deps
77
$P RUN-TESTS $(TEST)
8-
MAKEFLAGS= $/test/run $(RUN_TEST_ARGS) -b $(BUILD_DIR) $(TEST)
8+
MAKEFLAGS= $(TOP)/test/run $(RUN_TEST_ARGS) -b $(BUILD_DIR) $(TEST)
99

1010
.PHONY: full-test
1111
full-test: TEST = all

0 commit comments

Comments
 (0)