3 # Generation of icaruscode Doxygen documentation:
4 # * fetches the latest Doxygen tag files for LArSoft and ROOT
5 # (at most once per day)
6 # * sets up the latest UPS version of `icaruscode` (needed for depedencies)
7 # * checks out the latest tag of `icaruscode` `master` branch
8 # * runs Doxygen (output is expected in the ${OutputDir} directory)
10 # -----------------------------------------------------
12 # -----------------------------------------------------
14 # This script currently does not support generating documentation from multiple
15 # repositories. To implement such support, a possible way is to have the user
16 # specify a list of repositories including a main one (say, the first one)
17 # which is where the Doxygen configuration file is. Then that configuration file
18 # is processed to include as INPUT all the repositories, instead of just one.
19 # Some additional work is needed to achieve that.
25 # 20200426 (petrillo@slac.stanford.edu) [v1.0]
26 # first version in `icaruscode`; metadata version: 1
27 # 20200520 (petrillo@slac.stanford.edu) [v1.1]
28 # using GitHub sources
29 # 20201009 (petrillo@slac.stanford.edu) [v1.2]
30 # support additional repositories; metadata version: 2
31 # 20210302 (petrillo@slac.stanford.edu) [v1.3]
32 # support for non-`master` release branches (like in `sbnobj`);
33 # in case of tagged target, use the versions from UPS for all repositories
36 # -- BEGIN -- boilerplate settings and library loading -------------------------
41 for LibraryToLoad
in 'settings.sh' 'experiment_settings.sh' 'utilities.sh' ;
do
43 source "${SCRIPTDIR%/}/${LibraryToLoad}" ||
exit $?
47 # -- END -- boilerplate settings and library loading ---------------------------
49 # ------------------------------------------------------------------------------
53 declare -ri MetadataVersion=
'2' # integral numbers please
56 # ------------------------------------------------------------------------------
70 --branch=BRANCH , --tag=TAG , --commit=COMMIT
71 use
this branch, tag or commit instead of branch
'${DefaultBranch}';
72 the content of
the repository will be changed
74 do not change
the branch of
the GIT repository;
if the repository is
75 downloaded, its
default branch is used (
'${DefaultBranch}');
76 otherwise,
the current status is used
78 removes
the old documentation
if present; by
default,
this does not happen
80 forces
the update of Doxygen tag files even
if they have been downloaded
83 prints
the script version
and exits (hint: it
's version ${SCRIPTVERSION}
85 prints this usage message and exits
92 function printVersion() {
93 echo "${SCRIPTNAME} version ${SCRIPTVERSION}."
97 # ------------------------------------------------------------------------------
99 function UpdateTag() {
101 # Downloads the specified tag file and renames it as directed, if older than Age
103 # Usage: UpdateTag TagFile URL Description
105 local -r Age='yesterday
'
110 local Description="$*"
112 local TempFile="$(mktemp --dry-run )"
113 touch --date="$Age" "$TempFile"
115 if [[ "$TagFile" -nt "$TempFile" ]] && isFlagUnset ForceTags ; then
116 echo "Keeping '${TagFile}
' (run with \`--force-tags\` to override)."
118 echo "Fetching tag file for ${Description} ('${TagFile}
' from '${URL}
')"
119 wget --output-document "$TagFile" "$URL"
128 function UpdateROOTtag() {
131 ROOTVersion="$(DetectROOTversion)"
132 LASTFATAL "Can't detect
ROOT version!
" # did set up fail?
134 local ROOTVersionTag="${ROOTVersion%
return match has_match and(match.match_pdg==11 or match.match_pdg==-11)
then echo Cowardly refusing to create a new FHiCL file with the same name as the original one('${SourceName}')." >&2 exit 1 fi echo "'$
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker options