build: explain the passing of make options to waf
authorAndrew Tridgell <tridge@samba.org>
Thu, 20 Oct 2011 03:57:13 +0000 (14:57 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 20 Oct 2011 05:24:02 +0000 (07:24 +0200)
add a comment explaining how we pass make command line options into
waf

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Oct 20 07:24:02 CEST 2011 on sn-devel-104

buildtools/wafsamba/samba_utils.py

index 3adf533b0e49071bc617a3d64310bca802bc0e86..5e16a5d470b6c9566b38c7c8db966ef07ddef7b8 100644 (file)
@@ -487,6 +487,13 @@ def CHECK_MAKEFLAGS(bld):
             if Logs.verbose > 2:
                 Logs.zones = ['*']
         elif opt[0].isupper() and opt.find('=') != -1:
+            # this allows us to set waf options on the make command line
+            # for example, if you do "make FOO=blah", then we set the
+            # option 'FOO' in Options.options, to blah. If you look in wafsamba/wscript
+            # you will see that the command line accessible options have their dest=
+            # set to uppercase, to allow for passing of options from make in this way
+            # this is also how "make test TESTS=testpattern" works, and
+            # "make VERBOSE=1" as well as things like "make SYMBOLCHECK=1"
             loc = opt.find('=')
             setattr(Options.options, opt[0:loc], opt[loc+1:])
         elif opt[0] != '-':