mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
Merge branch 'master' of ssh://repo.or.cz/nasm
This commit is contained in:
commit
ef1ea87c3c
@ -24,6 +24,10 @@ PDFOPT = @PDFOPT@
|
|||||||
RM_F = rm -f
|
RM_F = rm -f
|
||||||
RM_RF = rm -rf
|
RM_RF = rm -rf
|
||||||
CP_F = cp -f
|
CP_F = cp -f
|
||||||
|
CP_UF = cp -ufv
|
||||||
|
|
||||||
|
# Auxiliary files referenced by the HTML files
|
||||||
|
HTMLAUX = nasmdoc.css local.css nasmlogw.png
|
||||||
|
|
||||||
SRCS = nasmdoc.src inslist.src changes.src version.src
|
SRCS = nasmdoc.src inslist.src changes.src version.src
|
||||||
OUT = html nasmdoc.txt nasmdoc.pdf
|
OUT = html nasmdoc.txt nasmdoc.pdf
|
||||||
@ -36,9 +40,10 @@ inslist.src: inslist.pl ../x86/insns.dat
|
|||||||
$(PERL) $(srcdir)/inslist.pl $(srcdir)/../x86/insns.dat
|
$(PERL) $(srcdir)/inslist.pl $(srcdir)/../x86/insns.dat
|
||||||
|
|
||||||
.PHONY: html
|
.PHONY: html
|
||||||
html: $(SRCS) rdsrc.pl nasmdoc.css nasmlogw.png
|
html: $(HTMLAUX)
|
||||||
mkdir -p html
|
mkdir -p html
|
||||||
$(MAKE) html/nasmdoc0.html html/nasmdoc.css html/nasmlogw.png
|
for f in $(HTMLAUX); do $(CP_UF) "$(srcdir)/$$f" html/; done
|
||||||
|
$(MAKE) html/nasmdoc0.html
|
||||||
|
|
||||||
RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
|
RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
|
||||||
|
|
||||||
@ -46,12 +51,6 @@ html/nasmdoc0.html: $(SRCS) rdsrc.pl
|
|||||||
$(RM_F) html/*.html
|
$(RM_F) html/*.html
|
||||||
$(RDSRC) -ohtml html nasmdoc.src
|
$(RDSRC) -ohtml html nasmdoc.src
|
||||||
|
|
||||||
html/nasmdoc.css: nasmdoc.css
|
|
||||||
$(CP_F) $(srcdir)/nasmdoc.css html/nasmdoc.css
|
|
||||||
|
|
||||||
html/nasmlogw.png: nasmlogw.png
|
|
||||||
$(CP_F) $(srcdir)/nasmlogw.png html/nasmlogw.png
|
|
||||||
|
|
||||||
nasmdoc.dip: $(SRCS) rdsrc.pl
|
nasmdoc.dip: $(SRCS) rdsrc.pl
|
||||||
$(RDSRC) dip nasmdoc.src
|
$(RDSRC) dip nasmdoc.src
|
||||||
|
|
||||||
@ -64,7 +63,8 @@ version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
|
|||||||
|
|
||||||
nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
|
nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
|
||||||
pswidth.ph nasmlogo.eps psfonts.ph head.ps
|
pswidth.ph nasmlogo.eps psfonts.ph head.ps
|
||||||
$(PERL) $(srcdir)/genps.pl -headps $(srcdir)/head.ps nasmdoc.dip \
|
$(PERL) $(srcdir)/genps.pl -epsdir "$(srcdir)" \
|
||||||
|
-headps $(srcdir)/head.ps nasmdoc.dip \
|
||||||
> nasmdoc.ps
|
> nasmdoc.ps
|
||||||
|
|
||||||
nasmdoc.pdf: nasmdoc.ps pspdf.pl
|
nasmdoc.pdf: nasmdoc.ps pspdf.pl
|
||||||
|
14
doc/genps.pl
14
doc/genps.pl
@ -92,6 +92,10 @@ require 'findfont.ph'; # Find fonts in the system
|
|||||||
# Canned header file
|
# Canned header file
|
||||||
$headps = 'head.ps';
|
$headps = 'head.ps';
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
$fontsdir = 'fonts';
|
||||||
|
$epsdir = File::Spec->curdir();
|
||||||
|
|
||||||
#
|
#
|
||||||
# Parse the command line
|
# Parse the command line
|
||||||
#
|
#
|
||||||
@ -107,11 +111,13 @@ while ( $arg = shift(@ARGV) ) {
|
|||||||
$psbool{$parm} = $true;
|
$psbool{$parm} = $true;
|
||||||
} elsif ( $true && defined($psconf{$parm}) ) {
|
} elsif ( $true && defined($psconf{$parm}) ) {
|
||||||
$psconf{$parm} = shift(@ARGV);
|
$psconf{$parm} = shift(@ARGV);
|
||||||
} elsif ( $parm =~ /^(title|subtitle|year|author|license)$/ ) {
|
} elsif ( $true && $parm =~ /^(title|subtitle|year|author|license)$/ ) {
|
||||||
$metadata{$parm} = shift(@ARGV);
|
$metadata{$parm} = shift(@ARGV);
|
||||||
} elsif ( $parm =~ /^fontsdir$/ ) {
|
} elsif ( $true && $parm eq 'fontsdir' ) {
|
||||||
$fontsdir = shift(@ARGV);
|
$fontsdir = shift(@ARGV);
|
||||||
} elsif ( $parm eq 'headps' ) {
|
} elsif ( $true && $parm eq 'epsdir' ) {
|
||||||
|
$epsdir = shift(@ARGV);
|
||||||
|
} elsif ( $true && $parm eq 'headps' ) {
|
||||||
$headps = shift(@ARGV);
|
$headps = shift(@ARGV);
|
||||||
} else {
|
} else {
|
||||||
die "$0: Unknown option: $arg\n";
|
die "$0: Unknown option: $arg\n";
|
||||||
@ -1161,7 +1167,7 @@ print "sti show\n";
|
|||||||
# and DocumentFonts in the header of the EPSF and add those to the
|
# and DocumentFonts in the header of the EPSF and add those to the
|
||||||
# global header.
|
# global header.
|
||||||
if ( defined($metadata{epslogo}) &&
|
if ( defined($metadata{epslogo}) &&
|
||||||
open(EPS, '<', $metadata{epslogo}) ) {
|
open(EPS, '<', File::Spec->catfile($epsdir, $metadata{epslogo})) ) {
|
||||||
my @eps = ();
|
my @eps = ();
|
||||||
my ($bbllx,$bblly,$bburx,$bbury) = (undef,undef,undef,undef);
|
my ($bbllx,$bblly,$bburx,$bbury) = (undef,undef,undef,undef);
|
||||||
my $line;
|
my $line;
|
||||||
|
1
doc/local.css
Normal file
1
doc/local.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
/* Add site-local nasmdoc style configuration to this file */
|
@ -3,8 +3,18 @@ body {
|
|||||||
"arial", "sans-serif";
|
"arial", "sans-serif";
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
h1 {
|
div.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
span.subtitle {
|
||||||
|
font-size: 1.25em;
|
||||||
|
font-style: italic;
|
||||||
}
|
}
|
||||||
code, pre {
|
code, pre {
|
||||||
font-family: "source code pro", "liberation mono", "monospace";
|
font-family: "source code pro", "liberation mono", "monospace";
|
||||||
|
@ -949,6 +949,7 @@ sub html_preamble {
|
|||||||
print "<head>\n";
|
print "<head>\n";
|
||||||
print "<title>", $metadata{'title'}, "</title>\n";
|
print "<title>", $metadata{'title'}, "</title>\n";
|
||||||
print "<link href=\"nasmdoc.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
|
print "<link href=\"nasmdoc.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
|
||||||
|
print "<link href=\"local.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
|
||||||
print "</head>\n";
|
print "</head>\n";
|
||||||
print "<body>\n";
|
print "<body>\n";
|
||||||
|
|
||||||
@ -966,7 +967,10 @@ sub html_preamble {
|
|||||||
print "<li class=\"last\"><a class=\"index\" href=\"nasmdoci.html\">Index</a></li>\n";
|
print "<li class=\"last\"><a class=\"index\" href=\"nasmdoci.html\">Index</a></li>\n";
|
||||||
print "</ul>\n";
|
print "</ul>\n";
|
||||||
|
|
||||||
|
print "<div class=\"title\">\n";
|
||||||
print "<h1>", $metadata{'title'}, "</h1>\n";
|
print "<h1>", $metadata{'title'}, "</h1>\n";
|
||||||
|
print '<span class="subtitle">', $metadata{'subtitle'}, "</span>\n";
|
||||||
|
print "</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub html_postamble {
|
sub html_postamble {
|
||||||
|
Loading…
Reference in New Issue
Block a user