Skip to content

Commit

Permalink
create/update doc/ref/user_pref_list.xml automatically (gap-system#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBreuer authored Mar 18, 2024
1 parent 4f3a54b commit 203cc91
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 358 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ doc/*/*.tex
/doc/*/*.out
doc/gapmacrodoc.example-1.tst
doc/gapmacrodoc.idx
doc/ref/user_pref_list.xml

# GAP packages
/bootstrap-pkg-full.tar.gz
Expand Down
1 change: 1 addition & 0 deletions doc/make_doc.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ echo "--------------------"
base:="@abs_top_srcdir@";;
books:=["ref", "tut", "hpc", "dev"];;
latexOpts := rec(Maintitlesize := "\\\\fontsize{36}{38}\\\\selectfont");;
UpdateXMLForUserPreferences();
for run in [1,2] do
for book in books do
path := Concatenation(base, "/doc/", book);
Expand Down
330 changes: 0 additions & 330 deletions doc/ref/user_pref_list.xml

This file was deleted.

18 changes: 18 additions & 0 deletions lib/userpref.g
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,24 @@ BindGlobal( "XMLForUserPreferences", function( pkgname )
end );


#############################################################################
##
#F UpdateXMLForUserPreferences()
##
## Update the file <F>doc/ref/user_pref_list.xml</F> if necessary.
##
BindGlobal( "UpdateXMLForUserPreferences", function()
local file, old, new;

file:= Filename(DirectoriesLibrary("doc")[1], "ref/user_pref_list.xml");
old:= StringFile(file);
new:= XMLForUserPreferences("GAP");
if old <> new then
FileString(file, new);
fi;
end );


#############################################################################
##
#F WriteGapIniFile( [<dir>, ][true] )
Expand Down
1 change: 1 addition & 0 deletions tst/extractmanuals.g
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pathtodoc := DirectoriesLibrary("doc/ref");
Read(Filename(pathtodoc, "makedocreldata.g"));
GAPInfo.ManualDataRef.pathtodoc := pathtodoc;
GAPInfo.ManualDataRef.pathtoroot := DirectoriesLibrary("");
UpdateXMLForUserPreferences();
WriteExamplesTst( testdir, GAPInfo.ManualDataRef );

#
Expand Down
Loading

0 comments on commit 203cc91

Please sign in to comment.