mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 08:22:44 +00:00
Generate files at build time, not at install time. This should be the
last fix of this type. Installing from a read-only object tree should work now. Install files using a single install command where this is easy; don't use shell loops. Don't use MANDEPEND to complicate things.
This commit is contained in:
parent
cf3fd327f4
commit
71d8a2d21a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34748
@ -1,4 +1,6 @@
|
|||||||
# Makefile for groff macros
|
# $Id$
|
||||||
|
|
||||||
|
.include "../Makefile.inc"
|
||||||
|
|
||||||
TMACOWN?= ${BINOWN}
|
TMACOWN?= ${BINOWN}
|
||||||
TMACGRP?= ${BINGRP}
|
TMACGRP?= ${BINGRP}
|
||||||
@ -10,8 +12,7 @@ MAN7= groff_ms.7 me.7
|
|||||||
MLINKS= groff_ms.7 ms.7 me.7 groff_me.7
|
MLINKS= groff_ms.7 ms.7 me.7 groff_me.7
|
||||||
LINKS= ${TMACDIR}/tmac.andoc ${TMACDIR}/tmac.an
|
LINKS= ${TMACDIR}/tmac.andoc ${TMACDIR}/tmac.an
|
||||||
|
|
||||||
MANDEPEND= ${MAN7}
|
CLEANFILES= ${MAN7} ${MDOCFILES} ${STRIPFILES} tmac.groff_an
|
||||||
CLEANFILES+= temp ${MANDEPEND} tmac.groff_an
|
|
||||||
|
|
||||||
FILES= tmac.andoc tmac.pic tmac.ps tmac.psnew tmac.psold\
|
FILES= tmac.andoc tmac.pic tmac.ps tmac.psnew tmac.psold\
|
||||||
tmac.pspic tmac.psatk tmac.dvi tmac.tty tmac.tty-char tmac.X\
|
tmac.pspic tmac.psatk tmac.dvi tmac.tty tmac.tty-char tmac.X\
|
||||||
@ -19,30 +20,28 @@ FILES= tmac.andoc tmac.pic tmac.ps tmac.psnew tmac.psold\
|
|||||||
STRIPFILES= tmac.e tmac.s tmac.doc
|
STRIPFILES= tmac.e tmac.s tmac.doc
|
||||||
MDOCFILES= doc-common doc-ditroff doc-nroff doc-syms
|
MDOCFILES= doc-common doc-ditroff doc-nroff doc-syms
|
||||||
|
|
||||||
|
all: ${MDOCFILES} ${STRIPFILES} tmac.groff_an
|
||||||
|
|
||||||
|
.for f in ${MDOCFILES} ${STRIPFILES}
|
||||||
|
$f: ${DIST_DIR}/$f
|
||||||
|
sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
tmac.groff_an: tmac.an
|
||||||
|
sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
beforeinstall:
|
beforeinstall:
|
||||||
for f in ${FILES}; do \
|
|
||||||
${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
|
||||||
${DIST_DIR}/$$f ${DESTDIR}${TMACDIR}; \
|
|
||||||
done
|
|
||||||
sed -f ${DIST_DIR}/strip.sed ${DIST_DIR}/tmac.an >tmac.groff_an
|
|
||||||
${INSTALL} ${COPY} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
${INSTALL} ${COPY} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
||||||
tmac.groff_an ${DESTDIR}${TMACDIR}
|
${MDOCFILES} ${DESTDIR}${MDOCDIR}
|
||||||
for f in ${STRIPFILES}; do \
|
${INSTALL} ${COPY} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
||||||
rm -f temp; \
|
${STRIPFILES} tmac.groff_an ${DESTDIR}${TMACDIR}
|
||||||
sed -f ${DIST_DIR}/strip.sed ${DIST_DIR}/$$f >temp; \
|
cd ${DIST_DIR}; \
|
||||||
${INSTALL} ${COPY} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
||||||
temp ${DESTDIR}${TMACDIR}/$$f; \
|
${FILES} ${DESTDIR}${TMACDIR}
|
||||||
done
|
.if !exists(${DESTDIR}${TMACDIR}/man.local)
|
||||||
for f in ${MDOCFILES}; do \
|
${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
||||||
rm -f temp; \
|
${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
|
||||||
sed -f ${DIST_DIR}/strip.sed ${DIST_DIR}/$$f >temp; \
|
.endif
|
||||||
${INSTALL} ${COPY} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
|
||||||
temp ${DESTDIR}${MDOCDIR}/$$f; \
|
|
||||||
done
|
|
||||||
test -f ${DESTDIR}${TMACDIR}/man.local || \
|
|
||||||
${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
|
|
||||||
${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
|
|
||||||
|
|
||||||
.include "../Makefile.cfg"
|
.include "../Makefile.cfg"
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
Loading…
Reference in New Issue
Block a user