[Git][NTPsec/ntpsec][master] ./waf distclean is a built-in command, not a sub-type of build

Matt Selsky gitlab at mg.gitlab.com
Tue Sep 5 08:08:28 UTC 2017


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
2bd5e61d by Matt Selsky at 2017-09-05T03:51:06-04:00
./waf distclean is a built-in command, not a sub-type of build

distclean and clean are different. "clean" is part of build and conditional
casing for "clean" therefore makes sense.

- - - - -


2 changed files:

- docs/build.txt
- wscript


Changes:

=====================================
docs/build.txt
=====================================
--- a/docs/build.txt
+++ b/docs/build.txt
@@ -105,8 +105,7 @@ link:bugs.html[NTP Bug Reporting Procedures] page.
 +./waf clean+::
   Cleans out object files, programs and temporary files.
 +./waf distclean+::
-  Does the work of +clean+, but cleans out all directories in
-  preparation for a new distribution release.
+  Removes the build directory.
 
 '''''
 


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -1010,7 +1010,7 @@ def afterparty(ctx):
     # Note, this kluge falls apart under Python 3, because
     # waf radically changes the shape of the build directory and
     # the naming conventions for the product files.
-    if ctx.cmd == 'clean' or ctx.cmd == 'distclean':
+    if ctx.cmd == 'clean':
         ctx.exec_command("rm -fr wafhelpers/*.pyc pylib/__pycache__/*.pyc "
                          "wafhelpers/__pycache__/*.pyc ntpd/version.h "
                          "ntpclients/ntp")
@@ -1091,10 +1091,7 @@ def build(ctx):
     )
 
     ctx.add_post_fun(afterparty)
-    # Second clause in the following guard is an unfulfilled hope.
-    # waf distclean doesn't go through build(ctx), it has its own
-    # execution path that we apparently cannot set hooks in.
-    if ctx.cmd == 'clean' or ctx.cmd == 'distclean':
+    if ctx.cmd == 'clean':
         afterparty(ctx)
 
     ctx.manpage(1, "ntpclients/ntploggps-man.txt")



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2bd5e61d66f8d0e274b4b52df2eac880f22efbfb

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2bd5e61d66f8d0e274b4b52df2eac880f22efbfb
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170905/8630e634/attachment.html>


More information about the vc mailing list