Debian Codegraph @

docs/www/tohtml

raw
1 #!/bin/csh
2
3
4 # Set our parameters to generate local pages by default
5
6 set template_file = "template-internal.htmlx"
7 set dest_value = "internal"
8 set location_postfix = "internal"
9 set fortrandir = "fortran"
10 set mpplibname = "MAGPLUSLIB_SHARED"
11 set selection = "all"
12 set get_dwt = "0"
13
14
15
16 # Check for command-line parameters
17
18 foreach arg ($argv)
19
20 if (("$arg" == "-h") || ("$arg" == "-help") || ("$arg" == "--help")) then
21 echo ""
22 echo "tohtml"
23 echo "Possible options:"
24 echo " -external : generates pages for external www pages"
25 echo " -static : shows the static magics++ library path in the test suite"
26 echo " -shared : shows the shared magics++ library path in the test suite"
27 echo " -fortran : generates only the FORTRAN test suite pages"
28 echo " -fortran_drivers : generates only the FORTRAN drivers test suite pages"
29 echo " -c : generates only the C test suite pages"
30 echo " -metgrams : generates only the metgram test suite pages"
31 echo " -magml : generates only the magml test suite pages"
32 echo " -python : generates only the Python test suite pages"
33 echo " -fnames : generates only the filenames test suite pages"
34 echo " -get_dwt : retrieves the DreamWeaver template from the web server (ECMWF only)"
35 echo ""
36 exit
37 endif
38
39 if ( "$arg" == "-external" ) then
40 set template_file = "template-external.htmlx"
41 set dest_value = "external"
42 set location_postfix = "external"
43 else if ("$arg" == "-static") then
44 set mpplibname = "MAGPLUSLIB_STATIC"
45 set fortrandir = "fortran_static"
46 else if ("$arg" == "-fortran") then
47 set selection = "fortran"
48 else if ("$arg" == "-fortran_drivers") then
49 set selection = "fortran_drivers"
50 else if ("$arg" == "-c") then
51 set selection = "c"
52 else if ("$arg" == "-metgrams") then
53 set selection = "metgrams"
54 else if ("$arg" == "-magml") then
55 set selection = "magml"
56 else if ("$arg" == "-python") then
57 set selection = "python"
58 else if ("$arg" == "-fnames") then
59 set selection = "fnames"
60 else if ("$arg" == "-get_dwt") then
61 set get_dwt = "1"
62 endif
63
64 end
65
66
67 # Set symbolic links so that we're using the right templates, etc
68
69 ln -f -s $template_file common/template.htmlx
70 ln -f -s location-$location_postfix.htmlx common/location.htmlx
71 ln -f -s location-top-$location_postfix.htmlx common/location-top.htmlx
72 ln -f -s location-test-$location_postfix.htmlx common/location-test.htmlx
73 ln -f -s location-interfaces-$location_postfix.htmlx common/location-interfaces.htmlx
74
75
76 # Ensure that our output directories exist
77
78 tools/make_html_dirs
79
80
81 # Since the Dreamweaver templates are not visible under leda, we keep
82 # a local copy here so that the scripts may be run under either
83 # Linux or leda without problems. When run under Linux, the latest
84 # versions of the templates will be copied across so we should not
85 # be out of date.
86
87 if ("$get_dwt" == "1") then
88 wget http://wedit.ecmwf.int/Templates/ecmwf.dwt > common/ecmwf.dwt
89 endif
90
91 #if ( $ARCH == linux ) then
92 # cp /vol/www/htdocs/wedit/Templates/w3ec2.dwt common
93 # cp /vol/www/htdocs/wedit/Templates/ecmwf.dwt common
94 #endif
95
96
97 # Set our command-line Perl invocation. We use the -s parameter
98 # to create a Perl variable called 'dest' with value $dest_value.
99 # This will be used by some of the Perl scripts to generate different
100 # text depending on whether the pages are for internal or external
101 # publication.
102
103 set PERL="perl -s"
104 set perl_options = "-audience=$dest_value -mpplibname=$mpplibname -fortrandir=$fortrandir"
105
106
107 # Now run the Perl scripts for the web pages
108
109 switch ($selection)
110 case fortran:
111 $PERL 4_examples/tests.pl $perl_options
112 $PERL 4_examples/testsindex.pl $perl_options
113 breaksw
114
115 case fortran_drivers:
116 $PERL 4_examples/tests.pl $perl_options -testprogs_type="drivers"
117 breaksw
118
119 case c:
120 $PERL 4_examples/c_examplesindex.pl $perl_options -testprogs_type="www"
121 $PERL 4_examples/c_examplesindex.pl $perl_options -testprogs_type="test"
122 $PERL 4_examples/c_examples.pl $perl_options -testprogs_type="test"
123 $PERL 4_examples/c_examples.pl $perl_options -testprogs_type="www"
124 breaksw
125
126 case metgrams:
127 $PERL 4_examples/epsgram_tests.pl $perl_options
128 breaksw
129
130 case magml:
131 $PERL 4_examples/magml_examples.pl $perl_options -testprogs_type="test"
132 breaksw
133
134 case fnames:
135 $PERL 4_examples/filenamestest.pl $perl_options
136 breaksw
137
138 case all:
139 $PERL 0_cover/magicsindex.pl $perl_options
140 $PERL 1_intro/features_now.pl $perl_options
141 $PERL 1_intro/workshopindex.pl $perl_options
142 $PERL 1_intro/akima.pl $perl_options
143 $PERL 1_intro/changes.pl $perl_options
144 $PERL 1_intro/coastlines.pl $perl_options
145 $PERL 2_interfaces/interfacesindex.pl $perl_options
146 $PERL 2_interfaces/fortran.pl $perl_options
147 $PERL 2_interfaces/c.pl $perl_options
148 $PERL 2_interfaces/cpp.pl $perl_options
149 $PERL 2_interfaces/eps.pl $perl_options
150 $PERL 2_interfaces/xml.pl $perl_options
151 $PERL 2_interfaces/magml.pl $perl_options
152 $PERL ../../tools/mergexml.pl -XMLDir='../../src/xml' $perl_options
153 $PERL 3_parameters/fortranactionindex.pl $perl_options
154 $PERL 3_parameters/fortran_params_flat.pl $perl_options
155 $PERL 3_parameters/parameterindex.pl $perl_options
156 # $PERL 3_parameters/xmltoweb.pl $perl_options
157 $PERL 3_parameters/xml_releaseinfo.pl $perl_options
158 $PERL 3_parameters/magml_complete.pl $perl_options
159 $PERL 4_examples/examplesindex.pl $perl_options
160 $PERL 4_examples/fortranexamplesindex.pl $perl_options
161 $PERL 4_examples/magmlexamplesindex.pl $perl_options
162 $PERL 4_examples/examples.pl $perl_options
163 $PERL 4_examples/c_examplesindex.pl $perl_options -testprogs_type="www"
164 $PERL 4_examples/c_examplesindex.pl $perl_options -testprogs_type="test"
165 $PERL 4_examples/c_examples.pl $perl_options -testprogs_type="test"
166 $PERL 4_examples/c_examples.pl $perl_options -testprogs_type="www"
167 $PERL 4_examples/magml_examples.pl $perl_options -testprogs_type="test"
168 $PERL 4_examples/magml_examples.pl $perl_options -testprogs_type="www"
169 $PERL 4_examples/tests.pl $perl_options
170 $PERL 4_examples/testsindex.pl $perl_options
171 $PERL 4_examples/classic.pl $perl_options
172 $PERL 4_examples/epsgram_tests.pl $perl_options
173 $PERL 4_examples/checkup.pl $perl_options
174 $PERL 4_examples/filenamestest.pl $perl_options
175 $PERL 5_compile/compileindex.pl $perl_options
176 $PERL 5_compile/compile_odb.pl $perl_options
177 $PERL 6_install/installindex.pl $perl_options
178 $PERL 7_history/historyindex.pl $perl_options
179 $PERL 8_formats/formatsindex.pl $perl_options
180 $PERL 8_formats/svg.pl $perl_options
181 $PERL 8_formats/ps.pl $perl_options
182 $PERL 8_formats/gd.pl $perl_options
183 $PERL 8_formats/multioutput.pl $perl_options
184 $PERL 9_versions/versionsindex.pl $perl_options
185 $PERL a_environment/environmentindex.pl $perl_options
186
187 default:
188 echo "tohtml: no selection specified - nothing will be output!"
189 breaksw
190 endsw
191
192
193
194 # copy any images into the html directories
195
196 # cp -u -f 1_intro/akima.gif html/intro
197