+pl 64
+ - exe's now built in out/
+ - toplevel Makefile dep from make/Toplevel.make.in
+ - make_website: add version fokoter
+ - make_website: bf dist *.txt
+ - bf: fix loose bars : \meter 4/4; c1.
+ - Staff_elem -> Score_elem
+ - bf <cis cis>
+ - vbrace lookup
+ - stop if barchecks failed
+ - resync barcheck
+
+*******
pl 63
- bf: segfault during MIDI output with mi2mu output.
- kludge: parse error beyond eof
#!/usr/bin/perl -w
-
+# stupid script to generate WWW site.
use FileHandle;
+my $lily_version;
+my $footstr;
+my $mw_id = "<!make_website!>";
+sub get_version
+{
+ my ($vstr)=("");
+ open V, "$depth/.version";
+ while (<V>) {
+ s/#.*$//g;
+ next if (/^ *$/);
+ s/^/\$/;
+ s/= *(.*)$/=\"$1\";/;
+ $vstr .= $_;
+ }
+ eval ($vstr);
+
+ $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+
+ # stupid checks.
+ $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+
+
+ close V;
+}
+
+sub set_html_footer
+{
+ my $MAILADRESS=$ENV{MAILADRESS};
+ my @pw=(getpwuid($<));
+ my $username=$pw[6];
+
+ $footstr =
+ "\n<hr>
+<font size=-2>
+This page was generated by <code>make_website</code> from lilypond-$lily_version by
+<p>
+<address><br>$username <a href=mailto:$MAILADRESS><<!bla>$MAILADRESS</a>></address>
+<p>" . `date` . "
+<p></font>\n";
+}
+
# do something, check return status
sub my_system
{
my (@cmds) = @_;
foreach $cmd (@cmds) {
- my $ret = ( system ($cmd))/256;
+ my $ret = ( system ($cmd));
if ($ret) {
print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n";
exit 2;
{
print "generating HTML list\n";
open HTMLLIST, ">example_output.html";
- print HTMLLIST "<title>LilyPond examples</title>\n";
+ print HTMLLIST "<html><body><title>LilyPond examples</title>\n";
foreach $a (@examples) {
$name=$a;
print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
if ( -f $midif );
print HTMLLIST "</ul>";
}
+ print HTMLLIST "</BODY></HTML>";
close HTMLLIST;
}
+
+sub edit_html
+{
+ print STDERR "adding footer\n";
+
+ OUTER:
+ foreach $a (<*.html>) {
+ open H, "$a";
+ my $sep="</BODY>";
+ input_record_separator H $sep;
+ my $file="";
+
+ while (<H>) {
+ if (/$mw_id/) {
+ close H;
+ next OUTER;
+ }
+ $file .= $_;
+
+ }
+ close H;
+
+
+ $file =~ s/$sep/$footstr$sep/g ;
+
+ open H, ">$a";
+ print H $mw_id;
+ print H $file;
+ close H;
+ }
+}
sub copy_files
{
print "copying files\n";
my_system "make -C $depth doc++";
}
-sub
- do_tar
+sub do_tar
{
print "tarring.\n";
my_system
- " tar vhcf website.tar *.html *.gif *.ps.gz *.ly.txt *.midi docxx/*;",
+ " tar vhcf website.tar *.html *.gif *.ps.gz *.txt *.midi docxx/*;",
"gzip -f9 website.tar;";
}
-$depth = "../../";
-$ENV{"TEXINPUTS"} .= ":$depth/input/:";
-$ENV{"LILYINCLUDE"} = "$depth/input/";
-my $cwd;
-chomp($cwd = `pwd`);
+sub main
+{
+ $depth = "../";
+ my $cwd;
+ chomp($cwd = `pwd`);
+ die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
+ get_version;
+ set_html_footer;
+
-die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
-chdir ("out");
+ $depth = "../../";
+ chdir ("out");
+ $ENV{"TEXINPUTS"} .= ":$depth/input/:";
+ $ENV{"LILYINCLUDE"} = "$depth/input/";
-gen_html;
-gen_examples;
-gen_list;
-copy_files;
-docxx_update;
-do_tar;
+
+ gen_html;
+ gen_examples;
+ gen_list;
+ copy_files;
+ edit_html;
+ docxx_update;
+ do_tar;
+}
+main;