Browse Source

[2225_xfrout] setting SPECFILE_LOCATION is more simplified

Naoki Kambe 12 years ago
parent
commit
35c6e4a1b1
1 changed files with 6 additions and 8 deletions
  1. 6 8
      src/bin/xfrin/xfrin.py.in

+ 6 - 8
src/bin/xfrin/xfrin.py.in

@@ -57,16 +57,14 @@ isc.util.process.rename()
 # If B10_FROM_BUILD or B10_FROM_SOURCE is set in the environment, we
 # use data files from a directory relative to that, otherwise we use
 # the ones installed on the system
-PREFIX = "@prefix@"
-DATAROOTDIR = "@datarootdir@"
-if "B10_FROM_BUILD" in os.environ:
-    AUTH_SPECFILE_PATH = os.environ["B10_FROM_BUILD"] + "/src/bin/auth"
-else:
-    AUTH_SPECFILE_PATH = "@datadir@/@PACKAGE@".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX)
+SPECFILE_PATH = "@datadir@/@PACKAGE@"\
+    .replace("${datarootdir}", "@datarootdir@")\
+    .replace("${prefix}", "@prefix@")
+AUTH_SPECFILE_PATH = SPECFILE_PATH
 if "B10_FROM_SOURCE" in os.environ:
     SPECFILE_PATH = os.environ["B10_FROM_SOURCE"] + "/src/bin/xfrin"
-else:
-    SPECFILE_PATH = "@datadir@/@PACKAGE@".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX)
+if "B10_FROM_BUILD" in os.environ:
+    AUTH_SPECFILE_PATH = os.environ["B10_FROM_BUILD"] + "/src/bin/auth"
 SPECFILE_LOCATION = SPECFILE_PATH + "/xfrin.spec"
 AUTH_SPECFILE_LOCATION = AUTH_SPECFILE_PATH + "/auth.spec"