diff --git a/TARGETS b/TARGETS index 001bf7cb2..1bafb01ca 100644 --- a/TARGETS +++ b/TARGETS @@ -1,4 +1,8 @@ -REPO_PATH = "internal_repo_rocksdb/repo/" + +import os + +TARGETS_PATH = os.path.dirname(__file__) +REPO_PATH = TARGETS_PATH[(TARGETS_PATH.find('fbcode/') + len('fbcode/')):] + "/" BUCK_BINS = "buck-out/gen/" + REPO_PATH TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh" rocksdb_compiler_flags = [ diff --git a/buckifier/targets_cfg.py b/buckifier/targets_cfg.py index de504e4d9..079b892a7 100644 --- a/buckifier/targets_cfg.py +++ b/buckifier/targets_cfg.py @@ -2,7 +2,11 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals -rocksdb_target_header = """REPO_PATH = "internal_repo_rocksdb/repo/" +rocksdb_target_header = """ +import os + +TARGETS_PATH = os.path.dirname(__file__) +REPO_PATH = TARGETS_PATH[(TARGETS_PATH.find('fbcode/') + len('fbcode/')):] + "/" BUCK_BINS = "buck-out/gen/" + REPO_PATH TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh" rocksdb_compiler_flags = [