ensembl-hive  2.7.0
make_doxygen.pl
Go to the documentation of this file.
1 #!/usr/bin/env perl
2 
3 use strict;
4 use warnings;
5 
7 
8 my $ehrd = $ENV{'EHIVE_ROOT_DIR'} or die "Environment variable 'EHIVE_ROOT_DIR' not defined, please check your setup";
9 my $erd = $ENV{'ENSEMBL_CVS_ROOT_DIR'} or die "Environment variable 'ENSEMBL_CVS_ROOT_DIR' not defined, please check your setup";
10 my $doxy_target = $ARGV[0] or die "Command-line argument <doxygen_target_path> not defined, please check your setup";
12 
13 my @shared_params = (
14  "echo 'PROJECT_NUMBER = $code_ver'",
15  "echo 'OUTPUT_DIRECTORY = $doxy_target'",
16  "echo 'EXCLUDE_PATTERNS = */_build/*'",
17  "echo 'USE_MDFILE_AS_MAINPAGE = README.md'",
18  "echo 'ENABLE_PREPROCESSING = NO'",
19  "echo 'RECURSIVE = YES'",
20  "echo 'EXAMPLE_PATTERNS = *'",
21  "echo 'HTML_TIMESTAMP = YES'",
22  "echo 'HTML_DYNAMIC_SECTIONS = YES'",
23  "echo 'GENERATE_TREEVIEW = YES'",
24  "echo 'GENERATE_LATEX = NO'",
25  "echo 'HAVE_DOT = YES'",
26  "echo 'EXTRACT_ALL = YES'",
27  "echo 'SOURCE_BROWSER = YES'",
28 );
29 
30 
31 main();
32 
33 
34 sub main {
35 
38 }
39 
40 
42 
43  print "Regenerating $doxy_target/perl ...\n\n";
44 
45  my $doxy_bin = `which doxygen`;
46  chomp $doxy_bin;
47 
48  die "Cannot run doxygen binary, please make sure it is installed and is in the path.\n" unless(-r $doxy_bin);
49 
50  my $doxy_filter = "$erd/ensembl/misc-scripts/doxygen_filter/ensembldoxygenfilter.pl";
51 
52  die "Cannot run the Ensembl-Doxygen Perl filter at '$doxy_filter', please make sure Ensembl core API is intalled properly.\n" unless(-x $doxy_filter);
53 
54  my @cmds = (
55  "rm -rf $doxy_target/perl",
56  "mkdir -p $doxy_target/perl",
57  "rm -f $doxy_target/ensembl-hive.tag",
58  "doxygen -g -",
59  "echo 'PROJECT_NAME = ensembl-hive'",
60  "echo 'STRIP_FROM_PATH = $ehrd'",
61  "echo 'INPUT = $ehrd'",
62  "echo 'INPUT_FILTER = $doxy_filter'",
63  "echo 'HTML_OUTPUT = perl'",
64  "echo 'EXTENSION_MAPPING = pm=C pl=C'",
65  "echo 'FILE_PATTERNS = *.pm *.pl README.md'",
66  "echo 'GENERATE_TAGFILE = $doxy_target/ensembl-hive.tag'",
67  "echo 'CLASS_DIAGRAMS = NO'",
68  "echo 'COLLABORATION_GRAPH = NO'",
69  @shared_params,
70  );
71 
72  my $full_cmd = '('.join(' ; ', @cmds).") | doxygen -";
73 
74  print "Running the following command:\n\t$full_cmd\n\n";
75 
76  system( $full_cmd );
77 }
78 
79 
81 
82  print "Regenerating $doxy_target/python3 ...\n\n";
83 
84  my $doxy_bin = `which doxygen`;
85  chomp $doxy_bin;
86  die "Cannot run doxygen binary, please make sure it is installed and is in the path.\n" unless(-r $doxy_bin);
87 
88  my $doxypypy = `which doxypypy`;
89  chomp $doxypypy;
90  die "Cannot find the Doxygen Python filter 'doxypypy' in the current PATH.\n" unless -e $doxypypy;
91 
92  my @cmds = (
93  "rm -rf $doxy_target/python3",
94  "mkdir -p $doxy_target/python3",
95  "doxygen -g -",
96  "echo 'PROJECT_NAME = ensembl-hive-python3'",
97  "echo 'PROJECT_NUMBER = $code_ver'",
98  "echo 'OUTPUT_DIRECTORY = $doxy_target'",
99  "echo 'STRIP_FROM_PATH = $ehrd/wrappers/python3'",
100  "echo 'INPUT = $ehrd/wrappers/python3'",
101  "echo 'HTML_OUTPUT = python3'",
102  "echo 'FILE_PATTERNS = *.py README.md'",
103  "echo 'FILTER_PATTERNS = *.py=$ehrd/scripts/dev/doxypypy_filter.sh'",
104  "echo 'EXTRACT_PRIVATE = YES'",
105  "echo 'EXTRACT_STATIC = YES'",
106  "echo 'CLASS_DIAGRAMS = YES'",
107  "echo 'CALL_GRAPH = YES'",
108  "echo 'CALLER_GRAPH = YES'",
109  "echo 'COLLABORATION_GRAPH = NO'",
110  @shared_params,
111  );
112 
113  my $full_cmd = '('.join(' ; ', @cmds).") | doxygen -";
114 
115  print "Running the following command:\n\t$full_cmd\n\n";
116 
117  system( $full_cmd );
118 }
119 
120 
121 
122 __DATA__
123 
124 =pod
125 
126 =head1 NAME
127 
128 make_doxygen.pl
129 
130 =head1 DESCRIPTION
131 
132 An internal eHive script for regenerating the Doxygen documentation.
133 
134 =head1 LICENSE
135 
136  See the NOTICE file distributed with this work for additional information
137  regarding copyright ownership.
138 
139  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
140  You may obtain a copy of the License at
141 
142  http://www.apache.org/licenses/LICENSE-2.0
143 
144  Unless required by applicable law or agreed to in writing, software distributed under the License
145  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
146  See the License for the specific language governing permissions and limitations under the License.
147 
148 =head1 CONTACT
149 
150 Please subscribe to the eHive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss eHive-related questions or to be notified of our updates
151 
152 =cut
153 
main
public main()
generate_docs_doxygen_python
public generate_docs_doxygen_python()
Bio::EnsEMBL::Hive::Version::get_code_version
public get_code_version()
Bio::EnsEMBL::Hive::Version
Definition: Version.pm:19
generate_docs_doxygen_perl
public generate_docs_doxygen_perl()