3 .if !target(__<bsd.init.mk>__)
4 .error bsd.incs.mk cannot be included directly.
9 .if !target(buildincludes)
10 .for group in ${INCSGROUPS}
11 buildincludes: ${${group}}
17 .if !target(installincludes)
18 .for group in ${INCSGROUPS}
19 .if defined(${group}) && !empty(${group})
21 ${group}OWN?= ${BINOWN}
22 ${group}GRP?= ${BINGRP}
23 ${group}MODE?= ${NOBINMODE}
24 ${group}DIR?= ${INCLUDEDIR}
27 .for header in ${${group}}
28 .if defined(${group}OWN_${header:T}) || defined(${group}GRP_${header:T}) || \
29 defined(${group}MODE_${header:T}) || defined(${group}DIR_${header:T}) || \
30 defined(${group}NAME_${header:T})
31 ${group}OWN_${header:T}?= ${${group}OWN}
32 ${group}GRP_${header:T}?= ${${group}GRP}
33 ${group}MODE_${header:T}?= ${${group}MODE}
34 ${group}DIR_${header:T}?= ${${group}DIR}
35 .if defined(${group}NAME)
36 ${group}NAME_${header:T}?= ${${group}NAME}
38 ${group}NAME_${header:T}?= ${header:T}
40 installincludes: _${group}INS_${header:T}
41 _${group}INS_${header:T}: ${header}
42 ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \
43 -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
45 ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
47 _${group}INCS+= ${header}
50 .if !empty(_${group}INCS)
51 installincludes: _${group}INS
52 _${group}INS: ${_${group}INCS}
53 .if defined(${group}NAME)
54 ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
55 ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
57 ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
58 ${.ALLSRC} ${DESTDIR}${${group}DIR}
62 .endif # defined(${group}) && !empty(${group})
65 .if defined(INCSLINKS) && !empty(INCSLINKS)
68 while test $$# -ge 2; do \
73 ${ECHO} $$t -\> $$l; \
77 .endif # !target(installincludes)
79 realinstall: installincludes
80 .ORDER: beforeinstall installincludes