[Git][NTPsec/ntpsec][master] A contemplated 'snapshot' feature in the build recipe is unnecessary.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Sep 24 11:17:28 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
de11b499 by Eric S. Raymond at 2016-09-24T06:45:11-04:00
A contemplated 'snapshot' feature in the build recipe is unnecessary.

There was a TODO item that read:

* Add 'snapshot' feature to dump config status into a JSON file for collecting
  build + platform information

This was missing the obvious; there already is a parseable representation
of that state, it's called the config.h file.  On the Don't Repeat Yourself
principle, if we want JSON or anything else we should make it by simple
postprocessing rather than adding needless complexity to the build recipe.

Added: a PLATFORM_FULL feature, the string from Python's platform.platform(),
to capture more information.

- - - - -


3 changed files:

- devel/TODO
- devel/ifdex-ignores
- wafhelpers/configure.py


Changes:

=====================================
devel/TODO
=====================================
--- a/devel/TODO
+++ b/devel/TODO
@@ -8,9 +8,6 @@
 
 * Cleanup and separate features in wafhelpers/*
 
-* Add 'snapshot' feature to dump config status into a JSON file for collecting
-  build + platform information
-
 * Add support for enabling all conditional checks to ensure none are broken.
 
 === Code ===


=====================================
devel/ifdex-ignores
=====================================
--- a/devel/ifdex-ignores
+++ b/devel/ifdex-ignores
@@ -68,6 +68,7 @@ ISC_PLATFORM_NORETURN_POST
 ISC_PLATFORM_NORETURN_PRE
 PLATFORM_OPENBSD
 WORDS_BIGENDIAN
+PLATFORM_FULL
 
 # libsodium
 SODIUM_DLL_EXPORT


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -1,4 +1,4 @@
-import sys, os
+import sys, os, platform
 from waflib.Configure import conf
 from wafhelpers.probes import *
 from wafhelpers.util import msg, msg_setting, parse_version
@@ -180,16 +180,15 @@ def cmd_configure(ctx, config):
 
         # Check target platform.
         ctx.start_msg("Checking build target")
-        from sys import platform
-        if platform == "win32":
+        if sys.platform == "win32":
                 ctx.env.PLATFORM_TARGET = "win"
-        elif platform == "darwin":
+        elif sys.platform == "darwin":
                 ctx.env.PLATFORM_TARGET = "osx"
-        elif platform.startswith("freebsd"):
+        elif sys.platform.startswith("freebsd"):
                 ctx.env.PLATFORM_TARGET = "freebsd"
-        elif platform.startswith("netbsd"):
+        elif sys.platform.startswith("netbsd"):
                 ctx.env.PLATFORM_TARGET = "netbsd"
-        elif platform.startswith("openbsd"):
+        elif sys.platform.startswith("openbsd"):
                 ctx.env.PLATFORM_TARGET = "openbsd"
         else:
                 ctx.env.PLATFORM_TARGET = "unix"
@@ -210,12 +209,12 @@ def cmd_configure(ctx, config):
         if ctx.env.PLATFORM_TARGET == "osx":
                 ctx.define("__APPLE_USE_RFC_3542", 1, comment="Needed for IPv6 support")
 
+	ctx.define("PLATFORM_FULL", platform.platform())
+
         # int32_t and uint32_t probes aren't really needed, POSIX guarantees
         # them.  But int64_t and uint64_t are not guaranteed to exist on 32-bit
-        # machines.
-        # Used by timevalops and timespecops in tests/libntp/
-        # May go away when that is cleaned up.
-        types = ["uint64_t"]
+        # machines.  The calendar and ISC code needs them.
+	types = ["uint64_t"]
 
         for inttype in sorted(types):
                 ctx.check_type(inttype, ["stdint.h", "sys/types.h"])



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/de11b499b28d338427645d3c9bc0adac5d638268
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160924/c167d441/attachment.html>


More information about the vc mailing list