diff options
author | sada <sada@FreeBSD.org> | 2001-03-11 03:17:30 +0800 |
---|---|---|
committer | sada <sada@FreeBSD.org> | 2001-03-11 03:17:30 +0800 |
commit | 269a3d7764ff6637943377041f6d714b16b25eb1 (patch) | |
tree | 884f06a4ba228bb3a087cbdb371b1fa056786b76 /japanese/linux-JM/scripts | |
parent | 8852106c0e4a6a6001f9e9bed127c7b98a22ad78 (diff) | |
download | freebsd-ports-graphics-269a3d7764ff6637943377041f6d714b16b25eb1.tar.gz freebsd-ports-graphics-269a3d7764ff6637943377041f6d714b16b25eb1.tar.zst freebsd-ports-graphics-269a3d7764ff6637943377041f6d714b16b25eb1.zip |
New ports import: japanese/linux-JM.
JM is Japanese translated manual pages by JM Project.
WWW: http://www.linux.or.jp/JM/
Diffstat (limited to 'japanese/linux-JM/scripts')
-rw-r--r-- | japanese/linux-JM/scripts/configure | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/japanese/linux-JM/scripts/configure b/japanese/linux-JM/scripts/configure new file mode 100644 index 00000000000..8da3fb55d31 --- /dev/null +++ b/japanese/linux-JM/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}>) { + open(F, $manpage) || die "cannot open $manpage: $!\n"; + $_ = <F>; + 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; +pages-list: + @\${ECHO} \${MAN${sec}} \${MLINKS} + +.include <bsd.prog.mk> +EOF + + close(MAKEFILE); +} |