2000-06-10 18:12:03 +04:00
|
|
|
# $NetBSD: bsd.files.mk,v 1.14 2000/06/10 14:12:03 mycroft 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}
|
2000-06-06 09:40:47 +04:00
|
|
|
|
|
|
|
filesinstall:: ${FILES:@F@${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}@}
|
2000-06-06 13:22:00 +04:00
|
|
|
.PRECIOUS: ${FILES:@F@${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}@}
|
1997-03-27 20:33:34 +03:00
|
|
|
.if !defined(UPDATE)
|
2000-06-06 09:40:47 +04:00
|
|
|
.PHONY: ${FILES:@F@${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}@}
|
1997-03-27 20:33:34 +03:00
|
|
|
.endif
|
2000-06-06 09:40:47 +04:00
|
|
|
|
2000-06-06 13:53:29 +04:00
|
|
|
__fileinstall: .USE
|
|
|
|
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
|
2000-06-10 18:12:03 +04:00
|
|
|
-o ${FILESOWN_${.ALLSRC:T}:U${FILESOWN}} \
|
|
|
|
-g ${FILESGRP_${.ALLSRC:T}:U${FILESGRP}} \
|
|
|
|
-m ${FILESMODE_${.ALLSRC:T}:U${FILESMODE}} \
|
2000-06-06 13:53:29 +04:00
|
|
|
${.ALLSRC} ${.TARGET}
|
|
|
|
|
2000-06-06 09:40:47 +04:00
|
|
|
.for F in ${FILES}
|
1999-09-05 01:48:33 +04:00
|
|
|
.if !defined(BUILD) && !make(all) && !make(${F})
|
2000-06-06 09:40:47 +04:00
|
|
|
${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}: .MADE
|
1997-03-27 20:33:34 +03:00
|
|
|
.endif
|
2000-06-06 13:53:29 +04:00
|
|
|
${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}: ${F} __fileinstall
|
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:=
|