Fix a User's Guide example. (Sanjoy Mahajan)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 7 May 2005 21:56:43 +0000 (21:56 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 7 May 2005 21:56:43 +0000 (21:56 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1289 fdb21ef1-2011-0410-befe-b5e4ea1792b1

SConstruct
doc/SConscript
doc/man/scons.1
doc/user/scanners.in
doc/user/scanners.sgml
src/CHANGES.txt

index 4ea2246b4b5d8a3e4fbb220cf6e33e4d200e0b72..be557ef5a8da51a74b5d78273b8bfb38d35038b2 100644 (file)
@@ -720,6 +720,8 @@ for p in [ scons ]:
         topdir = os.path.join(os.getcwd(), build, 'build',
                               'bdist.' + platform, 'rpm')
 
+        buildroot = os.path.join(os.getcwd(), 'build', 'rpm-buildroot')
+
         BUILDdir = os.path.join(topdir, 'BUILD', pkg + '-' + version)
         RPMSdir = os.path.join(topdir, 'RPMS', 'noarch')
         SOURCESdir = os.path.join(topdir, 'SOURCES')
@@ -753,7 +755,7 @@ for p in [ scons ]:
         Local(sourcefile)
 
         targets = [ noarch_rpm, src_rpm ]
-        cmd = "$RPMBUILD --define '_topdir $(%s$)' -ba $SOURCES" % topdir
+        cmd = "$RPMBUILD --define '_topdir $(%s$)' --buildroot %s -ba $SOURCES" % (topdir, buildroot)
         if not os.path.isdir(BUILDdir):
             cmd = ("$( mkdir -p %s; $)" % BUILDdir) + cmd
         env.Command(targets, specfile, cmd)
index 008f20588244f1ce3b2c198e63fe9881f2f41cf3..a51dd796f2dbfa68e4b1cfc4af6654be43aa0fbb 100644 (file)
@@ -158,13 +158,21 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE.  DO NOT EDIT.
     variables_gen = os.path.join(build, 'user', 'variables.gen')
     variables_mod = os.path.join(build, 'user', 'variables.mod')
 
+    # We put $( - $) around $SOURCES in the command line below because
+    # the path names will change when a given input file is found in
+    # a repository one run and locally the next, and we don't want
+    # to rebuild documentation just because it's found in one location
+    # vs. the other.  The *.gen and *.mod targets will still be dependent
+    # on the list of the files themselves.
     b = env.Command([builders_gen, builders_mod,
                      tools_gen, tools_mod,
                      variables_gen, variables_mod],
                     scons_doc_files,
-                    "python $SCONS_PROC_PY -b ${TARGETS[0]},${TARGETS[1]} -t ${TARGETS[2]},${TARGETS[3]} -v ${TARGETS[4]},${TARGETS[5]} $SOURCES")
+                    "python $SCONS_PROC_PY -b ${TARGETS[0]},${TARGETS[1]} -t ${TARGETS[2]},${TARGETS[3]} -v ${TARGETS[4]},${TARGETS[5]} $( $SOURCES $)")
     env.Depends(b, "$SCONS_PROC_PY")
 
+    env.Local(b)
+
     #
     # Each document will live in its own subdirectory.  List them here
     # as hash keys, with a hash of the info to control its build.
index 986c14be0a8fb2838add02f38c22c0855c77137c..c627a19f6e546fe2352cbf8bf4dd2468c46e7cdc 100644 (file)
@@ -9737,6 +9737,8 @@ env['BUILDERS]['PDFBuilder'] = bld
 .ES
 import re
 
+'\" Note:  the \\ in the following are for the benefit of nroff/troff,
+'\" not inappropriate doubled escape characters within the r'' raw string.
 include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
 
 def kfile_scan(node, env, path, arg):
index a0029ef46c28fcb082dc676d2a660c37e961f27e..63c07227f7114c9d2b789c6abe7804a77881b810 100644 (file)
@@ -167,7 +167,7 @@ over the file scanning rather than being called for each input line:
     <programlisting>
       import re
       
-      include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
+      include_re = re.compile(r'^include\s+(\S+)$', re.M)
       
       def kfile_scan(node, env, path, arg):
           contents = node.get_contents()
@@ -278,7 +278,7 @@ over the file scanning rather than being called for each input line:
       <file name="SConstruct" printme="1">
         import re
 
-        include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
+        include_re = re.compile(r'^include\s+(\S+)$', re.M)
 
         def kfile_scan(node, env, path):
             contents = node.get_contents()
index b4756c534e8f25d781b6bb1299bf07f47bae67f3..c068d037529592d486e9acb47bd13e52b90b414a 100644 (file)
@@ -167,7 +167,7 @@ over the file scanning rather than being called for each input line:
     <programlisting>
       import re
       
-      include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
+      include_re = re.compile(r'^include\s+(\S+)$', re.M)
       
       def kfile_scan(node, env, path, arg):
           contents = node.get_contents()
@@ -277,7 +277,7 @@ over the file scanning rather than being called for each input line:
     <programlisting>
         import re
 
-        include_re = re.compile(r'^include\\s+(\\S+)$', re.M)
+        include_re = re.compile(r'^include\s+(\S+)$', re.M)
 
         def kfile_scan(node, env, path):
             contents = node.get_contents()
index 0fb6e7123cce499b63eb30f98c83184c917d52c8..cc3538f7e889b2e5edc108442ecf82397b4f38ec 100644 (file)
@@ -283,7 +283,8 @@ RELEASE 0.97 - XXX
 
   From Sanjoy Mahajan:
 
-  - Fix a bad use of Copy() in an example in the man page.
+  - Fix a bad use of Copy() in an example in the man page, and a
+    bad regular expression example in the man page and User's Guide.
 
   From Michael McCracken: