aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2015-08-06 14:57:44 -0400
committerJonathan Corbet <corbet@lwn.net>2015-08-06 14:57:44 -0400
commit60004ca5dcfbf43182a9ba42bcbbf216c3684433 (patch)
treea162fa48c8ec29ae88ac66deb22c46d05999a849 /scripts/kernel-doc
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.
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc17
1 files changed, 13 insertions, 4 deletions
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;
253my $blankline = $blankline_man; 253my $blankline = $blankline_man;
254my $modulename = "Kernel API"; 254my $modulename = "Kernel API";
255my $function_only = 0; 255my $function_only = 0;
256my $show_not_found = 0;
257
258my @build_time;
259if (defined($ENV{'KBUILD_BUILD_TIMESTAMP'}) &&
260 (my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
261 @build_time = gmtime($seconds);
262} else {
263 @build_time = localtime;
264}
265
256my $man_date = ('January', 'February', 'March', 'April', 'May', 'June', 266my $man_date = ('January', 'February', 'March', 'April', 'May', 'June',
257 'July', 'August', 'September', 'October', 267 'July', 'August', 'September', 'October',
258 'November', 'December')[(localtime)[4]] . 268 'November', 'December')[$build_time[4]] .
259 " " . ((localtime)[5]+1900); 269 " " . ($build_time[5]+1900);
260my $show_not_found = 0;
261 270
262# Essentially these are globals. 271# Essentially these are globals.
263# They probably want to be tidied up, made more localised or something. 272# They probably want to be tidied up, made more localised or something.
@@ -2587,7 +2596,7 @@ $kernelversion = get_kernel_version();
2587 2596
2588# generate a sequence of code that will splice in highlighting information 2597# generate a sequence of code that will splice in highlighting information
2589# using the s// operator. 2598# using the s// operator.
2590foreach my $pattern (keys %highlights) { 2599foreach my $pattern (sort keys %highlights) {
2591# print STDERR "scanning pattern:$pattern, highlight:($highlights{$pattern})\n"; 2600# print STDERR "scanning pattern:$pattern, highlight:($highlights{$pattern})\n";
2592 $dohighlight .= "\$contents =~ s:$pattern:$highlights{$pattern}:gs;\n"; 2601 $dohighlight .= "\$contents =~ s:$pattern:$highlights{$pattern}:gs;\n";
2593} 2602}