summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2017-04-17 13:57:59 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2017-04-17 13:57:59 -0700
commitef1ea87c3c2e45b9f4626cdd8c11823c9241c682 (patch)
tree14ccd0ddf1cc68e297d7eb1264fd3b78153ff0d1
parent8dc965347ddf9caabacc4ca0441efe3a4ec32af8 (diff)
parentaa319b93e910736eacb4a492a3128661a76f52b1 (diff)
downloadnasm-ef1ea87c3c2e45b9f4626cdd8c11823c9241c682.tar.gz
Merge branch 'master' of ssh://repo.or.cz/nasm
-rw-r--r--doc/Makefile.in18
-rwxr-xr-xdoc/genps.pl14
-rw-r--r--doc/local.css1
-rw-r--r--doc/nasmdoc.css12
-rw-r--r--doc/rdsrc.pl4
5 files changed, 35 insertions, 14 deletions
diff --git a/doc/Makefile.in b/doc/Makefile.in
index c43f029c..2ddfd1ee 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -24,6 +24,10 @@ PDFOPT = @PDFOPT@
RM_F = rm -f
RM_RF = rm -rf
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
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
.PHONY: html
-html: $(SRCS) rdsrc.pl nasmdoc.css nasmlogw.png
+html: $(HTMLAUX)
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)/
@@ -46,12 +51,6 @@ html/nasmdoc0.html: $(SRCS) rdsrc.pl
$(RM_F) html/*.html
$(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
$(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 \
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.pdf: nasmdoc.ps pspdf.pl
diff --git a/doc/genps.pl b/doc/genps.pl
index e3b799b5..88e57388 100755
--- a/doc/genps.pl
+++ b/doc/genps.pl
@@ -92,6 +92,10 @@ require 'findfont.ph'; # Find fonts in the system
# Canned header file
$headps = 'head.ps';
+# Directories
+$fontsdir = 'fonts';
+$epsdir = File::Spec->curdir();
+
#
# Parse the command line
#
@@ -107,11 +111,13 @@ while ( $arg = shift(@ARGV) ) {
$psbool{$parm} = $true;
} elsif ( $true && defined($psconf{$parm}) ) {
$psconf{$parm} = shift(@ARGV);
- } elsif ( $parm =~ /^(title|subtitle|year|author|license)$/ ) {
+ } elsif ( $true && $parm =~ /^(title|subtitle|year|author|license)$/ ) {
$metadata{$parm} = shift(@ARGV);
- } elsif ( $parm =~ /^fontsdir$/ ) {
+ } elsif ( $true && $parm eq 'fontsdir' ) {
$fontsdir = shift(@ARGV);
- } elsif ( $parm eq 'headps' ) {
+ } elsif ( $true && $parm eq 'epsdir' ) {
+ $epsdir = shift(@ARGV);
+ } elsif ( $true && $parm eq 'headps' ) {
$headps = shift(@ARGV);
} else {
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
# global header.
if ( defined($metadata{epslogo}) &&
- open(EPS, '<', $metadata{epslogo}) ) {
+ open(EPS, '<', File::Spec->catfile($epsdir, $metadata{epslogo})) ) {
my @eps = ();
my ($bbllx,$bblly,$bburx,$bbury) = (undef,undef,undef,undef);
my $line;
diff --git a/doc/local.css b/doc/local.css
new file mode 100644
index 00000000..dfee5220
--- /dev/null
+++ b/doc/local.css
@@ -0,0 +1 @@
+/* Add site-local nasmdoc style configuration to this file */
diff --git a/doc/nasmdoc.css b/doc/nasmdoc.css
index 466ee2ce..af095273 100644
--- a/doc/nasmdoc.css
+++ b/doc/nasmdoc.css
@@ -3,8 +3,18 @@ body {
"arial", "sans-serif";
background: white;
}
-h1 {
+div.title {
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 {
font-family: "source code pro", "liberation mono", "monospace";
diff --git a/doc/rdsrc.pl b/doc/rdsrc.pl
index b31d9b7e..bc066584 100644
--- a/doc/rdsrc.pl
+++ b/doc/rdsrc.pl
@@ -949,6 +949,7 @@ sub html_preamble {
print "<head>\n";
print "<title>", $metadata{'title'}, "</title>\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 "<body>\n";
@@ -966,7 +967,10 @@ sub html_preamble {
print "<li class=\"last\"><a class=\"index\" href=\"nasmdoci.html\">Index</a></li>\n";
print "</ul>\n";
+ print "<div class=\"title\">\n";
print "<h1>", $metadata{'title'}, "</h1>\n";
+ print '<span class="subtitle">', $metadata{'subtitle'}, "</span>\n";
+ print "</div>\n";
}
sub html_postamble {