1999-09-05 01:48:33 +04:00
|
|
|
# $NetBSD: bsd.files.mk,v 1.10 1999/09/04 21:48:33 fredb Exp $
|
1999-02-11 16:25:42 +03:00
|
|
|
|
|
|
|
# This file can be included multiple times. It clears the definition of
|
|
|
|
# FILES at the end so that this is possible.
|
1997-05-07 00:54:31 +04:00
|
|
|
|
|
|
|
.PHONY: filesinstall
|
1997-05-09 17:25:46 +04:00
|
|
|
realinstall: filesinstall
|
1997-03-27 20:33:34 +03:00
|
|
|
|
1999-02-11 16:25:42 +03:00
|
|
|
.if defined(FILES) && !empty(FILES)
|
1997-03-27 20:33:34 +03:00
|
|
|
FILESDIR?=${BINDIR}
|
|
|
|
FILESOWN?=${BINOWN}
|
|
|
|
FILESGRP?=${BINGRP}
|
|
|
|
FILESMODE?=${NONBINMODE}
|
|
|
|
.for F in ${FILES}
|
|
|
|
FILESDIR_${F}?=${FILESDIR}
|
|
|
|
FILESOWN_${F}?=${FILESOWN}
|
|
|
|
FILESGRP_${F}?=${FILESGRP}
|
|
|
|
FILESMODE_${F}?=${FILESMODE}
|
|
|
|
.if defined(FILESNAME)
|
|
|
|
FILESNAME_${F} ?= ${FILESNAME}
|
|
|
|
.else
|
|
|
|
FILESNAME_${F} ?= ${F:T}
|
|
|
|
.endif
|
|
|
|
filesinstall:: ${DESTDIR}${FILESDIR_${F}}/${FILESNAME_${F}}
|
|
|
|
.if !defined(UPDATE)
|
|
|
|
.PHONY: ${DESTDIR}${FILESDIR_${F}}/${FILESNAME_${F}}
|
|
|
|
.endif
|
1999-09-05 01:48:33 +04:00
|
|
|
.if !defined(BUILD) && !make(all) && !make(${F})
|
1997-03-27 20:33:34 +03:00
|
|
|
${DESTDIR}${FILESDIR_${F}}/${FILESNAME_${F}}: .MADE
|
|
|
|
.endif
|
|
|
|
|
1997-05-07 01:29:33 +04:00
|
|
|
.PRECIOUS: ${DESTDIR}${FILESDIR_${F}}/${FILESNAME_${F}}
|
1997-03-27 20:33:34 +03:00
|
|
|
${DESTDIR}${FILESDIR_${F}}/${FILESNAME_${F}}: ${F}
|
1999-08-21 10:17:45 +04:00
|
|
|
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
|
|
|
|
-o ${FILESOWN_${F}} -g ${FILESGRP_${F}} -m ${FILESMODE_${F}} \
|
|
|
|
${.ALLSRC} ${.TARGET}
|
1997-03-27 20:33:34 +03:00
|
|
|
.endfor
|
1997-05-07 19:53:28 +04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !target(filesinstall)
|
1997-03-27 20:33:34 +03:00
|
|
|
filesinstall::
|
|
|
|
.endif
|
1999-02-11 16:25:42 +03:00
|
|
|
|
|
|
|
FILES:=
|