]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/config/doc_alc++2html.pl
This commit was generated by cvs2svn to compensate for changes in r1459,
[u/mrichter/AliRoot.git] / AliGeant4 / config / doc_alc++2html.pl
CommitLineData
676fb573 1#!/usr/local/bin/perl
2# $Id$
3# Ivana Hrivnacova 12.2.99
4#
5# HTML documentation is created for all
6# source code files: *.h *.cxx
7# makefiles: Makefile, *.gmk
8# and configuration setup scripts
9
10# create doc directory if it does not exist
11$CURDIR = `pwd`;
12chdir $ENV{'AG4_INSTALL'};
13if (! grep(/doc/, `ls`)) {
14 `mkdir doc` ;
15 print "Directory doc has been created." . "\n";
16};
17# move doc/HTML directory to doc/HTML.old
18chdir doc;
19if (grep(/HTML.old/, `ls`)) {
20 print "Cleaning HTML.old" . "\n";
21 `rm -fr HTML.old`;
22}
23if (grep(/HTML/, `ls`)) {
24 `mkdir HTML.old`;
25 `mv HTML HTML.old`;
26 print "Old HTML directory has been saved." . "\n";
27}
28chdir $ENV{'AG4_INSTALL'};
29
30# create tmpdoc directory is it does not exist
31# or clean it
32if (! grep(/tmpdoc/, `ls`)) {
33 `mkdir tmpdoc` ;
34 print "Directory tmpdoc has been created." . "\n";
35} else {
36 print "Cleaning tmpdoc" . "\n";
37 `rm -fr tmpdoc/*`;
38}
39
40# select directory that will be processed
41$SOURCEDIR = ". ../TGeant4";
42
43# copy everything for documentation to tmpdoc
44@FILELIST = `find $SOURCEDIR -name "*.ddl"`;
45@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.h"`);
46@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.cxx"`);
47@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.icc"`);
48@FILELIST = (@FILELIST, `find $SOURCEDIR -name "Makefile"`);
49@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.gmk"`);
50@FILELIST = (@FILELIST, `find $SOURCEDIR -name "setup*"`);
51
52print "Copying files to tmpdoc" . "\n";
53foreach $FILE (@FILELIST) {
54 chop $FILE;
55 # exclude dictionary classes
56 if (!grep(/Dict/,$FILE)) {
57 `cp $FILE tmpdoc`;
58 }
59 #print "$FILE has been copied to tmpdoc" . "\n";
60}
61
62# mv *.cxx to *.C
63# what is recquired by ddl2html.pl
64chdir tmpdoc;
65print "Renaming files" . "\n";
66@CXXLIST = `ls *.cxx`;
67foreach $CXXFILE (@CXXLIST) {
68 chop $CXXFILE;
69 $CFILE = `echo $CXXFILE | sed s/.cxx/.C/g`;
70 `mv $CXXFILE $CFILE`;
71}
72
73# execute the modified P.Binko's script
74system $ENV{'AG4_INSTALL'} . "/config/doc_alddl2html.pl ALICE G4 Project";
75
76# move HTML to doc and remove tmpdoc
77$DOCDIR = $ENV{'AG4_INSTALL'} . "/doc";
78`mv HTML $DOCDIR`;
79print "Removing tmpdoc" . "\n";
80chdir $ENV{'AG4_INSTALL'};
81`rm -fr tmpdoc`;
82
83# generate the category pages
84system $ENV{'AG4_INSTALL'} . "/config/doc_alsorthtml.pl";
85
86chdir $CURDIR;