[ntpsec commit] Move platform detection code to the top.
Amar Takhar
amar at ntpsec.org
Fri Oct 9 14:22:58 UTC 2015
Module: ntpsec
Branch: master
Commit: ebef24c1d82a23503b99a7b2f8d896640bfdb2cf
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=ebef24c1d82a23503b99a7b2f8d896640bfdb2cf
Author: Amar Takhar <verm at darkbeer.org>
Date: Fri Oct 9 10:17:02 2015 -0400
Move platform detection code to the top.
---
pylib/configure.py | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/pylib/configure.py b/pylib/configure.py
index f4508ee..c2f705c 100644
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -41,6 +41,17 @@ def cmd_configure(ctx):
ctx.env.CFLAGS += ["-Wall"] # Default CFLAGS.
+ # Check target platform.
+ ctx.start_msg("Checking build target")
+ from sys import platform
+ if platform == "win32":
+ ctx.env.PLATFORM_TARGET = "win"
+ else:
+ ctx.env.PLATFORM_TARGET = "unix"
+ ctx.end_msg(ctx.env.PLATFORM_TARGET )
+
+
+
# Wipe out and override flags with those from the commandline
for flag in ctx.env.OPT_STORE:
opt = flag.replace("--", "").upper() # XXX: find a better way.
@@ -60,15 +71,6 @@ def cmd_configure(ctx):
ctx.env.ENABLE_DOC = True
- ctx.start_msg("Checking build target")
- from sys import platform
- if platform == "win32":
- ctx.env.PLATFORM_TARGET = "win"
- else:
- ctx.env.PLATFORM_TARGET = "unix"
- ctx.end_msg(ctx.env.PLATFORM_TARGET )
-
-
from os.path import exists
from waflib.Utils import subprocess
if exists(".git") and ctx.find_program("git", var="BIN_GIT", mandatory=False):
More information about the vc
mailing list