due to the many external programs that come to plan9 nowadays i've added a 'man' target for installing external man pages located in the same directory as the source. the command is common to the 'mkone' and 'mkmany' include files and works simply by: - the source code writer creates one or several man pages named '$TARG.man' - the source code writer defines MAN= in the mkfiles for their code, $MAN points to the section the man pages are destined for (i.e. /sys/man/1/ for section 1, commands) - the user types 'mk man' or 'mk somefile.man' to have the man page installed. for now, the 'man' target is not included in 'mk all'... Reference: /n/sources/patch/applied/mkfiles-man Date: Tue Mar 15 01:47:01 CET 2005 --- /sys/src/cmd/mkmany Tue Mar 15 01:43:00 2005 +++ /sys/src/cmd/mkmany Tue Mar 15 01:42:58 2005 @@ -1,4 +1,5 @@ PROGS=${TARG:%=$O.%} +MANFILES=${TARG:%=%.man} LDFLAGS= YFLAGS=-d @@ -69,3 +70,8 @@ %.acid: %.$O $HFILES $CC $CFLAGS -a $stem.c >$target + +%.man: $MAN/$stem + cp $stem.man $MAN/$stem + +man:V: $MANFILES --- /sys/src/cmd/mkone Tue Mar 15 01:43:07 2005 +++ /sys/src/cmd/mkone Tue Mar 15 01:43:05 2005 @@ -52,3 +52,9 @@ %.acid: %.$O $HFILES $CC $CFLAGS -a $stem.c >$target + +%.man: $MAN/$stem + cp $stem.man $MAN/$stem + +man:V: $TARG.man +