mailr2621 - in /1.2: scons/manuals.py sconstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 12, 2006 - 07:09:
Author: bugman
Date: Thu Oct 12 07:08:18 2006
New Revision: 2621

URL: http://svn.gna.org/viewcvs/relax?rev=2621&view=rev
Log:
Complete overhaul of the relax manual targets.

The relax manual is now referred to as the user manaul (to allow a developers 
manual in the future).

The functions for compiling the manual have been renamed:
  'user_manual_html()' to 'compile_user_manual_html()'.
  'user_manual_pdf()' to 'compile_user_manual_pdf()'.

The header printed when compiling from the LaTeX sources has been updated.

Many target names have changes:
  'manual_dist' to 'user_manual_pdf_dist'.
  'manual' to 'user_manual_pdf'.
  'manual_nofetch' to 'user_manual_pdf_nofetch'.
  'manual_dist' to 'user_manual_pdf_dist'.
  'user_manual_pdf' to 'compile_user_manual_pdf'.
  'user_manual_html' to 'compile_user_manual_html'.

The HTML target has been split in two.


Modified:
    1.2/scons/manuals.py
    1.2/sconstruct

Modified: 1.2/scons/manuals.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/scons/manuals.py?rev=2621&r1=2620&r2=2621&view=diff
==============================================================================
--- 1.2/scons/manuals.py (original)
+++ 1.2/scons/manuals.py Thu Oct 12 07:08:18 2006
@@ -94,34 +94,14 @@
     print "\n\n\n"
 
 
-def fetch_docstrings(target, source, env):
-    """Builder action for fetching the relax user function docstrings."""
-
-    # Print out.
-    print
-    print "###############################################"
-    print "# Fetching the relax user function docstrings #"
-    print "###############################################\n\n"
-
-    # Import the fetch_docstrings module (needs to be done here so that 
Sconstruct doesn't need to load the entire program each time).
-    sys.path.append(getcwd())
-    from docs.latex.fetch_docstrings import Fetch_docstrings
-
-    # Get the docstrings.
-    Fetch_docstrings(env['LATEX_DIR'] + sep + 'docstring.tex')
-
-    # Final print out.
-    print "\n\n\n"
-
-
-def user_manual_html(target, source, env):
-    """Builder action for creating the HTML manual."""
-
-    # Print out.
-    print
-    print "############################"
-    print "# Creating the HTML manual #"
-    print "############################\n\n"
+def compile_user_manual_html(target, source, env):
+    """Builder action for compiling the HTML version of the user manual from 
the LaTeX sources."""
+
+    # Print out.
+    print
+    print "#################################################"
+    print "# Compiling the HTML version of the user manual #"
+    print "#################################################\n\n"
 
     # Go to the LaTeX directory.
     base_dir = getcwd()
@@ -138,14 +118,14 @@
     print "\n\n\n"
 
 
-def user_manual_pdf(target, source, env):
-    """Builder action for compiling the LaTeX manual into a PDF file."""
-
-    # Print out.
-    print
-    print "###################################"
-    print "# LaTeX compilation of the manual #"
-    print "###################################\n\n"
+def compile_user_manual_pdf(target, source, env):
+    """Builder action for compiling the PDF version of the user manual from 
the LaTeX sources."""
+
+    # Print out.
+    print
+    print "################################################"
+    print "# Compiling the PDF version of the user manual #"
+    print "################################################\n\n"
 
     # Go to the LaTeX directory.
     base_dir = getcwd()
@@ -195,6 +175,26 @@
     print "\n\n\n"
 
 
+def fetch_docstrings(target, source, env):
+    """Builder action for fetching the relax user function docstrings."""
+
+    # Print out.
+    print
+    print "###############################################"
+    print "# Fetching the relax user function docstrings #"
+    print "###############################################\n\n"
+
+    # Import the fetch_docstrings module (needs to be done here so that 
Sconstruct doesn't need to load the entire program each time).
+    sys.path.append(getcwd())
+    from docs.latex.fetch_docstrings import Fetch_docstrings
+
+    # Get the docstrings.
+    Fetch_docstrings(env['LATEX_DIR'] + sep + 'docstring.tex')
+
+    # Final print out.
+    print "\n\n\n"
+
+
 def version_file(target, source, env):
     """Builder action for creating the LaTeX relax version file."""
 

Modified: 1.2/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/1.2/sconstruct?rev=2621&r1=2620&r2=2621&view=diff
==============================================================================
--- 1.2/sconstruct (original)
+++ 1.2/sconstruct Thu Oct 12 07:08:18 2006
@@ -42,7 +42,7 @@
 
 
 # relax and Scons modules.
-from scons.manuals import acro, clean_manual_files, fetch_docstrings, 
user_manual_html, user_manual_pdf, version_file
+from scons.manuals import acro, clean_manual_files, 
compile_user_manual_html, compile_user_manual_pdf, fetch_docstrings, 
version_file
 from version import version
 
 
@@ -100,7 +100,7 @@
         binary_dist_env.dummy(target='binary_dist', source=None)
         binary_dist_env.Depends('binary_dist', 'version_check')           # 
First check the program version number.
         binary_dist_env.Depends('binary_dist', self.relax_fit_object)     # 
Compile the C code.
-        binary_dist_env.Depends('binary_dist', 'manual_dist')             # 
Compile the manual.
+        binary_dist_env.Depends('binary_dist', 'user_manual_pdf_dist')    # 
Compile the PDF version of the user manual.
         binary_dist_env.Depends('binary_dist', 'manual_clean_nodeps')     # 
Clean up the temporary manual files.
         binary_dist_env.Depends('binary_dist', 'clean_temp')              # 
Then clean up all other temporary files.
         binary_dist_env.Depends('binary_dist', 'package_bin')             # 
Package the binary distribution.
@@ -110,7 +110,7 @@
         source_dist_env = Environment(BUILDERS={'dummy' : 
Builder(action=self.dummy)})
         source_dist_env.dummy(target='source_dist', source=None)
         source_dist_env.Depends('source_dist', 'version_check')           # 
First check the program version number.
-        source_dist_env.Depends('source_dist', 'manual_dist')             # 
Compile the manual.
+        source_dist_env.Depends('source_dist', 'user_manual_pdf_dist')    # 
Compile the PDF version of the user manual.
         source_dist_env.Depends('source_dist', 'manual_clean_nodeps')     # 
Clean up the temporary manual files.
         source_dist_env.Depends('source_dist', 'clean')                   # 
Then clean up the sources.
         source_dist_env.Depends('source_dist', 'package_src')             # 
Package the source distribution.
@@ -169,38 +169,42 @@
         # relax manuals.
         ################
 
-        # Create a manual build environment.
+        # Create the manual build environment.
         manual_env = Environment(DOCS_DIR=self.DOCS_DIR,
                                  LATEX_DIR=self.LATEX_DIR,
                                  SYSTEM=self.SYSTEM)
 
-        # Target for creating the PDF manual.
-        manual_env.Append(BUILDERS={'Manual' : Builder(action=self.dummy)})
-        manual_env.Manual(target='manual', source=None)
-        manual_env.Depends('manual', 'manual_clean')
-        manual_env.Depends('manual', 'manual_version_file')
-        manual_env.Depends('manual', 'fetch_docstrings')
-        manual_env.Depends('manual', 'user_manual_pdf')
-        manual_env.Depends('manual', 'manual_acro')
-
-        # Target for creating the PDF manual without fetching the docstrings.
-        manual_env.Manual(target='manual_nofetch', source=None)
-        manual_env.Depends('manual_nofetch', 'manual_clean')
-        manual_env.Depends('manual_nofetch', 'manual_version_file')
-        manual_env.Depends('manual_nofetch', 'user_manual_pdf')
-        manual_env.Depends('manual_nofetch', 'manual_acro')
-
-        # Target for creating the PDF manual for distribution.
-        manual_env.Manual(target='manual_dist', source=None)
-        manual_env.Depends('manual_dist', 'manual_clean')
-        manual_env.Depends('manual_dist', 'manual_version_file')
-        manual_env.Depends('manual_dist', 'fetch_docstrings')
-        manual_env.Depends('manual_dist', 'user_manual_pdf')
-
-        # Target for creating the HTML manual.
-        manual_env.Append(BUILDERS={'User_manual_html' : 
Builder(action=user_manual_html)})
-        manual_env.User_manual_html(target='user_manual_html', source=None)
+        # Target for creating the PDF version of the user manual.
+        manual_env.Append(BUILDERS={'UserManualPDF' : 
Builder(action=self.dummy)})
+        manual_env.UserManualPDF(target='user_manual_pdf', source=None)
+        manual_env.Depends('user_manual_pdf', 'manual_clean')
+        manual_env.Depends('user_manual_pdf', 'manual_version_file')
+        manual_env.Depends('user_manual_pdf', 'fetch_docstrings')
+        manual_env.Depends('user_manual_pdf', 'compile_user_manual_pdf')
+        manual_env.Depends('user_manual_pdf', 'manual_acro')
+
+        # Target for creating the HTML version of the user manual.
+        manual_env.Append(BUILDERS={'UserManualHTML' : 
Builder(action=self.dummy)})
+        manual_env.UserManualHTML(target='user_manual_html', source=None)
         manual_env.Depends('user_manual_html', 'manual_clean')
+        manual_env.Depends('user_manual_html', 'manual_version_file')
+        manual_env.Depends('user_manual_html', 'fetch_docstrings')
+        manual_env.Depends('user_manual_html', 'compile_user_manual_html')
+        manual_env.Depends('user_manual_html', 'manual_acro')
+
+        # Target for creating the PDF version of the user manual (without 
fetching the docstrings).
+        manual_env.Manual(target='user_manual_pdf_nofetch', source=None)
+        manual_env.Depends('user_manual_pdf_nofetch', 'manual_clean')
+        manual_env.Depends('user_manual_pdf_nofetch', 'manual_version_file')
+        manual_env.Depends('user_manual_pdf_nofetch', 
'compile_user_manual_pdf')
+        manual_env.Depends('user_manual_pdf_nofetch', 'manual_acro')
+
+        # Target for creating the PDF version of the user manual for 
distribution.
+        manual_env.Manual(target='user_manual_pdf_dist', source=None)
+        manual_env.Depends('user_manual_pdf_dist', 'manual_clean')
+        manual_env.Depends('user_manual_pdf_dist', 'manual_version_file')
+        manual_env.Depends('user_manual_pdf_dist', 'fetch_docstrings')
+        manual_env.Depends('user_manual_pdf_dist', 'compile_user_manual_pdf')
 
         # Target for creating relax version number LaTeX file.
         manual_env.Append(BUILDERS={'Version' : 
Builder(action=version_file)})
@@ -210,11 +214,15 @@
         manual_env.Append(BUILDERS={'Fetch' : 
Builder(action=fetch_docstrings)})
         manual_env.Fetch(target='fetch_docstrings', source=None)
 
-        # LaTeX compilation target.
-        manual_env.Append(BUILDERS={'User_manual_pdf' : 
Builder(action=user_manual_pdf)})
-        manual_env.User_manual_pdf(target='user_manual_pdf', source=None)
-
-        # Adobe Acrobat target.
+        # Target for compiling the PDF version of the user manaul from the 
LaTeX sources.
+        manual_env.Append(BUILDERS={'CompileUserManualPDF' : 
Builder(action=compile_user_manual_pdf)})
+        manual_env.CompileUserManualPDF(target='compile_user_manual_pdf', 
source=None)
+
+        # Target for compiling the HTML version of the user manual from the 
LaTeX sources.
+        manual_env.Append(BUILDERS={'CompileUserManualHTML' : 
Builder(action=compile_user_manual_html)})
+        manual_env.CompileUserManualHTML(target='compile_user_manual_html', 
source=None)
+
+        # Target for launching Adobe Acrobat with the PDF version of the 
relax manual.
         manual_env.Append(BUILDERS={'Acro' : Builder(action=acro)})
         manual_env.Acro(target='manual_acro', source=None)
 




Related Messages


Powered by MHonArc, Updated Thu Oct 12 07:20:04 2006