Make TARGETS file portable

Summary:
Instead of hard coding the path of the internal repo.
Make TARGETS file work anywhere in fbcode
Closes https://github.com/facebook/rocksdb/pull/2586

Differential Revision: D5428122

Pulled By: IslamAbdelRahman

fbshipit-source-id: 21adec82bfbff14ea93532bee789b5f5bbee5b01
main
Islam AbdelRahman 8 years ago committed by Facebook Github Bot
parent ccf5f08f88
commit 132013366d
  1. 6
      TARGETS
  2. 6
      buckifier/targets_cfg.py

@ -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 BUCK_BINS = "buck-out/gen/" + REPO_PATH
TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh" TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh"
rocksdb_compiler_flags = [ rocksdb_compiler_flags = [

@ -2,7 +2,11 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
from __future__ import unicode_literals 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 BUCK_BINS = "buck-out/gen/" + REPO_PATH
TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh" TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh"
rocksdb_compiler_flags = [ rocksdb_compiler_flags = [

Loading…
Cancel
Save