binutils: Make manpage handling generic to ease maintenance
[dragonfly.git] / gnu / usr.bin / binutils221 / strip / Makefile
1 .include "../Makefile.inc1"
2 .include "../Makefile.bu"
3
4 .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
5
6 PROG=   strip
7 SRCS=   objcopy.c is-strip.c
8 MFILE=  strip${MANPAGEVER}.1
9 MAN=    ${MFILE}
10 WARNS=  1
11
12 CLEANFILES+=    maybe_stripped
13
14 all: maybe_stripped
15
16 maybe_stripped: strip
17         cp strip maybe_stripped
18 .if defined(STRIP)
19 .if ${STRIP:M-s} != ""
20         -strip maybe_stripped
21 .endif
22 .endif
23
24 ${MFILE}: ${SRCDIR}/binutils/doc/strip.1
25         cp ${.ALLSRC} ${.TARGET}
26
27 CLEANFILES+=    ${MFILE}
28
29 .if defined(IS_PRIMARY)
30 MLINKS+=        ${MFILE} strip.1
31 .endif
32
33 realinstall:
34         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
35             maybe_stripped ${DESTDIR}${BINDIR}/strip
36
37 .include <bsd.prog.mk>