From 96bbf588b8f91c5eeaab71e431151f397ce1d056 Mon Sep 17 00:00:00 2001 From: SADA Kenji Date: Sat, 30 Oct 1999 15:34:27 +0000 Subject: Use MLINKS instead of .so directive against the problem of linked pages. Submitted by: Yasuhiro Fukuma in ports-jp ML #7987 --- japanese/xjman-3/scripts/configure | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 japanese/xjman-3/scripts/configure (limited to 'japanese/xjman-3/scripts/configure') diff --git a/japanese/xjman-3/scripts/configure b/japanese/xjman-3/scripts/configure new file mode 100644 index 000000000000..eb66aa645232 --- /dev/null +++ b/japanese/xjman-3/scripts/configure @@ -0,0 +1,47 @@ +exec /usr/bin/perl -Sx "$0" ${1+"$@"} +#! perl + +$WRKSRC = $ENV{'WRKSRC'}; +@MANSECS = split(/\s+/, $ENV{'MANSECS'}); + +for $sec (@MANSECS) { + print "===> Creating Makefile in man${sec}\n"; + + chdir "$WRKSRC/man$sec"; + @manpages = (); + @mlinks = (); + + for $manpage (<*.${sec}x>) { + open(F, $manpage) || die "cannot open $manpage: $!\n"; + $_ = ; + chop; + close(F); + if (/^\.so /) { + ($real = $') =~ s!^man./!!; + push(@mlinks, "$real\t$manpage"); + } + else { + push(@manpages, $manpage); + } + } + + open(MAKEFILE, '>Makefile'); + + if (@manpages) { + print MAKEFILE join("\t\\\n\t", "MAN${sec} =", sort @manpages); + print MAKEFILE "\n\n"; + } + if (@mlinks) { + print MAKEFILE join("\t\\\n\t", "MLINKS =", sort @mlinks); + print MAKEFILE "\n\n"; + } + + print MAKEFILE < +EOF + + close(MAKEFILE); +} -- cgit v1.2.3