Skip to content

Commit af3fbde

Browse files
committed
Remove redundancy: strip away hard coded release versions from scripts
Adapt Makefile accordingly Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#120)
1 parent eb90cf7 commit af3fbde

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ manpages: $(foreach S,$(NEWMANSERIES),manpages-$(S)) \
8888
$(foreach S,$(OLDMANSERIES),manpages-$(S) manmap-$(S))
8989

9090
mancross:
91-
./bin/mk-mancross
91+
./bin/mk-mancross master $(SERIES)
9292

9393

9494
## $(SIMPLE) -- SIMPLE GENERATED FILES
@@ -98,7 +98,7 @@ newsflash.inc: news/newsflash.inc
9898
head -7 $? >$@
9999
sitemap sitemap.txt:
100100
@rm -f sitemap.txt
101-
./bin/mk-sitemap > sitemap.txt
101+
./bin/mk-sitemap master $(SERIES) > sitemap.txt
102102

103103
community/committers.inc:
104104
@rm -f $@

bin/mk-mancross

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22

3-
releases="master 1.1.1 1.1.0 1.0.2"
3+
releases="$*"
44

55
log () {
66
echo >&2 "$@"

bin/mk-manpages

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,10 @@ use Pod::Simple::XHTML;
1212

1313
__PACKAGE__->run(@ARGV);
1414

15-
sub Releases { return (qw(master 1.1.1 1.1.0 1.0.2)) }
1615
sub Dirs { return (qw(apps crypto ssl
1716
man1 man3 man5 man7)) }
1817
sub Dir2Section { return ( apps => "man1", crypto => "man3", ssl => "man3" ) }
1918

20-
sub getRelease {
21-
my ( $class, $ver ) = @_;
22-
my %known = map { $_ => 1 } $class->Releases;
23-
return @_ != 2 ? %known : defined $known{$ver} ? $ver : undef;
24-
}
25-
2619
sub run {
2720
my ( $class, @argv ) = @_;
2821
my $opt = $class->process_options(@argv);
@@ -298,11 +291,6 @@ sub process_options {
298291
push( @err, "No documentation directories in $docdir" )
299292
unless ( @found_dirs );
300293

301-
# verify release
302-
push( @err, "Unknown release '$opt{RelVer}'" )
303-
unless ( $class->getRelease( $opt{RelVer} ) );
304-
$class->die(@err) if @err;
305-
306294
return \%opt;
307295
}
308296

bin/mk-sitemap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#! /usr/bin/perl -w
22
use strict;
33

4+
my @series = @ARGV;
5+
46
sub
57
dodir()
68
{
@@ -33,7 +35,7 @@ dodir()
3335
$simple =~ s@.*/@@;
3436
print "\n", "\t" x $level, $simple, "/\n";
3537
next if $entry =~ m/secadv/;
36-
next if $entry =~ m/man1.0.2|man1.1.0|manmaster/;
38+
next if grep { $entry eq "man$_" } @series;
3739
&dodir($entry, $level + 1);
3840
}
3941
}

0 commit comments

Comments
 (0)