summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2015-08-06 12:57:44 -0600
committerJonathan Corbet <corbet@lwn.net>2015-08-06 12:57:44 -0600
commit60004ca5dcfbf43182a9ba42bcbbf216c3684433 (patch)
treea162fa48c8ec29ae88ac66deb22c46d05999a849
parent7c97211b61d8b91b8f88237e4bbb3a8959ecb18a (diff)
parente9c9963b439db734e9705f96909c5a3388dd81bb (diff)
Merge branch 'doc/4.3-reproducible' into docs-next
Ben Hutchings writes: As part of the reproducible builds project, Jérémy Bobbio identified several time-dependent and non-deterministic functions in the document build process (htmldocs, mandocs targets). This patch series should fix all of those. I ended up reverting one patch that introduced problems.
-rw-r--r--Documentation/DocBook/Makefile2
-rw-r--r--Documentation/DocBook/stylesheet.xsl1
-rwxr-xr-xscripts/kernel-doc17
3 files changed, 15 insertions, 5 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 170042a1ea5f..b7d2110298de 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -56,7 +56,7 @@ htmldocs: $(HTML)
MAN := $(patsubst %.xml, %.9, $(BOOKS))
mandocs: $(MAN)
- find $(obj)/man -name '*.9' | xargs gzip -f
+ find $(obj)/man -name '*.9' | xargs gzip -nf
installmandocs: mandocs
mkdir -p /usr/local/man/man9/
diff --git a/Documentation/DocBook/stylesheet.xsl b/Documentation/DocBook/stylesheet.xsl
index 85b25275196f..3bf4ecf3d760 100644
--- a/Documentation/DocBook/stylesheet.xsl
+++ b/Documentation/DocBook/stylesheet.xsl
@@ -5,6 +5,7 @@
<param name="funcsynopsis.tabular.threshold">80</param>
<param name="callout.graphics">0</param>
<!-- <param name="paper.type">A4</param> -->
+<param name="generate.consistent.ids">1</param>
<param name="generate.section.toc.level">2</param>
<param name="use.id.as.filename">1</param>
</stylesheet>
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 9922e66883a5..0ac1a07874cc 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -253,11 +253,20 @@ my %highlights = %highlights_man;
my $blankline = $blankline_man;
my $modulename = "Kernel API";
my $function_only = 0;
+my $show_not_found = 0;
+
+my @build_time;
+if (defined($ENV{'KBUILD_BUILD_TIMESTAMP'}) &&
+ (my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
+ @build_time = gmtime($seconds);
+} else {
+ @build_time = localtime;
+}
+
my $man_date = ('January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October',
- 'November', 'December')[(localtime)[4]] .
- " " . ((localtime)[5]+1900);
-my $show_not_found = 0;
+ 'November', 'December')[$build_time[4]] .
+ " " . ($build_time[5]+1900);
# Essentially these are globals.
# They probably want to be tidied up, made more localised or something.
@@ -2587,7 +2596,7 @@ $kernelversion = get_kernel_version();
# generate a sequence of code that will splice in highlighting information
# using the s// operator.
-foreach my $pattern (keys %highlights) {
+foreach my $pattern (sort keys %highlights) {
# print STDERR "scanning pattern:$pattern, highlight:($highlights{$pattern})\n";
$dohighlight .= "\$contents =~ s:$pattern:$highlights{$pattern}:gs;\n";
}