plan9fox/sys/src/cmd/mkone
cinap_lenrek 335e019746 mkone: fix man target (thanks Amavect)
Amavect wrote:
> mkone and mkmany have backwards targets for installing man pages.
> This patch makes 'mk man' actually work for mkfiles that include mkone.
> mkmany is not easily fixed without breaking changes.
> It may go without saying that external repos should write their own mkfiles.
2019-05-17 01:51:28 +02:00

63 lines
980 B
Plaintext

LDFLAGS=
YFLAGS=-d
AFLAGS=
default:V: $O.out
all:V: $O.out
$O.out: $OFILES $LIB
$LD $LDFLAGS -o $target $prereq
%.$O: $HFILES # don't combine with following %.$O rules
%.$O: %.c
$CC $CFLAGS $stem.c
%.$O: %.s
$AS $AFLAGS $stem.s
y.tab.h y.tab.c:D: $YFILES
$YACC $YFLAGS $prereq
lex.yy.c: $LFILES
$LEX $LFLAGS $prereq
install:V: $BIN/$TARG
$BIN/$TARG: $O.out
cp $prereq $BIN/$TARG
installall:V:
for(objtype in $CPUS)
mk install
allall:V:
for(objtype in $CPUS)
mk all
nuke:V:
rm -f *.[$OS] [$OS].out y.tab.? lex.yy.c y.debug y.output *.acid $TARG $CLEANFILES
clean:V:
rm -f *.[$OS] [$OS].out y.tab.? lex.yy.c y.debug y.output $TARG $CLEANFILES
safeinstall:V: $O.out
test -e $BIN/$TARG && mv $BIN/$TARG $BIN/_$TARG
cp $prereq $BIN/$TARG
update:V:
update $UPDATEFLAGS $UPDATE
safeinstallall:V:
for (objtype in $CPUS)
mk safeinstall
%.acid: %.$O $HFILES
$CC $CFLAGS -a $stem.c >$target
$MAN/%: %.man
cp $prereq $target
man:V: $MAN/$TARG