[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:54:02 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 321c5fb80e1a911ef09e559d719c92c4f8f1ce5f
Author: Bernhard R. Link <brlink at debian.org>
Date:   Sat Mar 3 10:21:04 2012 +0100

    tag more examples
    
    Add a way to tag all examples from a .lib file included.
    
    Use this new feature to tag some libs needed external programs,
    special features or significant memory usage in order to be able
    to build documentation on more machines.
    
    Make DOC2TEX_EXAMPLE_EXCLUSIONS a make variable, so that this
    setting can also be overridden at make invocation time.

diff --git a/doc/Makefile.in b/doc/Makefile.in
index 3f3d199..301cec5 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -67,10 +67,12 @@ endif
 DOC_SUBDIR      = ./d2t_singular
 EX_SUBDIR       = ./examples
 CHKSUM_DB       = ${DOC_SUBDIR}/chksum
+DOC2TEX_EXAMPLE_EXCLUSIONS = @DOC2TEX_EXAMPLE_EXCLUSIONS@
 DOC2TEX         = ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
                   -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
-		  -exdir ${EX_SUBDIR} @DOC2TEX_EXAMPLE_EXCLUSIONS@
-PL2DOC		= ${PERL} ./pl2doc.pl -db ${CHKSUM_DB}
+		  -exdir ${EX_SUBDIR} ${DOC2TEX_EXAMPLE_EXCLUSIONS}
+TAG		=
+PL2DOC		= ${PERL} ./pl2doc.pl ${TAG} -db ${CHKSUM_DB}
 
 # t2h stuff
 TMP_DIR		= @TMP_DIR@
diff --git a/doc/doc2tex.pl b/doc/doc2tex.pl
index abc8ed4..6a45136 100755
--- a/doc/doc2tex.pl
+++ b/doc/doc2tex.pl
@@ -539,7 +539,7 @@ sub HandleRef
 
 sub HandleLib
 {
-  my($lib, $proc, $n_fun, $n_ex, $section, $tex_file);
+  my($lib, $proc, $n_fun, $n_ex, $section, $tex_file, $tag);
 
   if (/^\@c\s*lib\s+([^\.]+)\.lib(.*)/)
   {
@@ -552,6 +552,14 @@ sub HandleLib
     print TEX $_;
     return;
   }
+  if (/tag:(\w+)/)
+  {
+    $tag = "TAG='-tag ".$1."'";
+  }
+  else
+  {
+    $tag = '';
+  }
 
   $proc = $1 if (/^:(.*?) /);
   $n_fun = 1 if ($no_fun || /no_fun/);
@@ -574,7 +582,7 @@ sub HandleLib
   if ($make)
   {
     print "<lib $lib " if ($verbose);
-    System("$make $make_opts VERBOSE=$verbose $tex_file"); 
+    System("$make $make_opts $tag VERBOSE=$verbose $tex_file"); 
   }
   
   # make sure file exists
diff --git a/doc/examples.doc b/doc/examples.doc
index a5081d6..269d256 100644
--- a/doc/examples.doc
+++ b/doc/examples.doc
@@ -787,7 +787,7 @@ which allows ignoring all but the first j entries of vectors when
 forming the pairs in the standard basis computation.
 
 @smallexample
- at c example
+ at c example tag:dynlib
 ring r=0,(x,y),dp;
 module mo=[x^2-y^2,1,0,0],[xy+y^2,0,1,0],[y^2,0,0,1];
 print(mo);
diff --git a/doc/pl2doc.pl b/doc/pl2doc.pl
index 6c50e4c..672d45a 100755
--- a/doc/pl2doc.pl
+++ b/doc/pl2doc.pl
@@ -20,6 +20,7 @@ while (@ARGV && $ARGV[0] =~ /^-/)
   $_ = shift(@ARGV);
   if (/^-o$/)    { $out_file = shift(@ARGV); next;}
   if (/^-db$/) { $db_file = shift(@ARGV); next;}
+  if (/^-tag$/) { $tag = $tag . " tag:" . shift(@ARGV); next;}
   if (/^-no_fun$/)    { $no_fun = 1;next;}
   if (/^-doc$/)       { $doc = 1; next;}
   if (/^-h(elp)?$/)   { print $Usage; exit;}
@@ -120,7 +121,7 @@ unless ($no_fun)
 	($ex = &CleanUpExample($lib, $example{$procs[$i]})))
     {
       print LDOC "\@strong{Example:}\n";
-      print LDOC "\@smallexample\n\@c example\n";
+      print LDOC "\@smallexample\n\@c example$tag\n";
       print LDOC $ex;
       print LDOC "\n\@c example\n\@end smallexample\n";
     }
diff --git a/doc/singular.doc b/doc/singular.doc
index ca3274d..c14fa5d 100644
--- a/doc/singular.doc
+++ b/doc/singular.doc
@@ -442,7 +442,7 @@ LIB "all.lib";
 @c ---------------------------------------------------------
 @node normaliz_lib, pointid_lib, normal_lib, Commutative algebra
 @subsection normaliz_lib
- at c lib normaliz.lib
+ at c lib normaliz.lib tag:normaliz
 @c ----------------------------------------------------------
 @node pointid_lib, primdec_lib, normaliz_lib, Commutative algebra
 @subsection pointid_lib
@@ -474,7 +474,7 @@ LIB "all.lib";
 @c ---------------------------------------------------------
 @node sing4ti2_lib, toric_lib, sagbi_lib, Commutative algebra
 @subsection sing4ti2_lib
- at c lib sing4ti2.lib
+ at c lib sing4ti2.lib tag:sing4ti2
 @c ---------------------------------------------------------
 @node toric_lib, , sing4ti2_lib, Commutative algebra
 @subsection toric_lib
@@ -531,7 +531,7 @@ iniD, reslist, sumlist, dividelist, createlist
 @c ---------------------------------------------------------
 @node sheafcoh_lib, ,reszeta_lib, Algebraic geometry
 @subsection sheafcoh_lib
- at c lib sheafcoh.lib
+ at c lib sheafcoh.lib tag:memory
 @c ----------------------------------------------------------------------------
 @node Singularities, Invariant theory, Algebraic geometry, SINGULAR libraries
 @section Singularities

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list