1 # $FreeBSD: src/share/mk/bsd.files.mk,v 1.2.2.3 2002/08/07 16:31:50 ru Exp $
2 # $DragonFly: src/share/mk/bsd.files.mk,v 1.3 2005/04/12 23:35:37 okumoto Exp $
4 .if
!target
(__
<bsd.init.mk
>__
)
5 .error bsd.files.mk cannot be included directly.
10 .if
!target
(buildfiles
)
11 .for group in
${FILESGROUPS}
12 buildfiles
: ${${group}}
18 .if
!target
(installfiles
)
19 .for group in
${FILESGROUPS}
20 .if defined
(${group}) && !empty
(${group})
22 ${group}OWN?
= ${SHAREOWN}
23 ${group}GRP?
= ${SHAREGRP}
24 ${group}MODE?
= ${SHAREMODE}
25 ${group}DIR?
= ${BINDIR}
28 .for file in
${${group}}
29 .if defined
(${group}OWN_
${file
:T
}) || defined
(${group}GRP_
${file
:T
}) || \
30 defined
(${group}MODE_
${file
:T
}) || defined
(${group}DIR_
${file
:T
}) || \
31 defined
(${group}NAME_
${file
:T
})
32 ${group}OWN_
${file
:T
}?
= ${${group}OWN
}
33 ${group}GRP_
${file
:T
}?
= ${${group}GRP
}
34 ${group}MODE_
${file
:T
}?
= ${${group}MODE
}
35 ${group}DIR_
${file
:T
}?
= ${${group}DIR
}
36 .if defined
(${group}NAME
)
37 ${group}NAME_
${file
:T
}?
= ${${group}NAME
}
39 ${group}NAME_
${file
:T
}?
= ${file
:T
}
41 installfiles
: _
${group}INS_
${file
:T
}
42 _
${group}INS_
${file
:T
}: ${file}
43 ${INSTALL} -o
${${group}OWN_
${.ALLSRC
:T
}} \
44 -g
${${group}GRP_
${.ALLSRC
:T
}} -m
${${group}MODE_
${.ALLSRC
:T
}} \
46 ${DESTDIR}${${group}DIR_
${.ALLSRC
:T
}}/${${group}NAME_
${.ALLSRC
:T
}}
48 _
${group}FILES
+= ${file}
51 .if
!empty
(_
${group}FILES
)
52 installfiles
: _
${group}INS
53 _
${group}INS
: ${_
${group}FILES
}
54 .if defined
(${group}NAME
)
55 ${INSTALL} -o
${${group}OWN
} -g
${${group}GRP
} \
56 -m
${${group}MODE
} ${.ALLSRC
} \
57 ${DESTDIR}${${group}DIR
}/${${group}NAME
}
59 ${INSTALL} -o
${${group}OWN
} -g
${${group}GRP
} \
60 -m
${${group}MODE
} ${.ALLSRC
} ${DESTDIR}${${group}DIR
}
64 .
endif # defined(${group}) && !empty(${group})
67 .
endif # !target(installfiles)
69 realinstall
: installfiles
70 .ORDER
: beforeinstall installfiles
72 .for _FG in
${FLAGS_GROUPS}
73 .for _FFILE in
${${_FG}_FLAGS_FILES
}
74 _
${_FFILE}_FLAGS
= ${${_FG}_FLAGS
}