1 # $NetBSD: bsd.info.mk,v 1.38 2006/03/16 18:43:34 jwise Exp $
7 realinstall
: infoinstall
17 INFOFILES
= ${TEXINFO
:C
/\.te?xi
(nfo
)?
$/.
info/}
22 .SUFFIXES
: .txi .texi .texinfo .
info
24 .txi.
info .texi.
info .texinfo.
info:
26 ${TOOL_MAKEINFO} ${INFOFLAGS} --no-split
--no-version-header
-o
${.TARGET
} ${.IMPSRC
}
28 .
endif # ${MKINFO} != "no"
31 infoinstall
:: # ensure existence
36 INFODIRFILE
=${DESTDIR}${INFODIR}/dir
38 # serialize access to ${INFODIRFILE}; needed for parallel makes
42 -o
${INFOOWN_
${.ALLSRC
:T
}:U
${INFOOWN}} \
43 -g
${INFOGRP_
${.ALLSRC
:T
}:U
${INFOGRP}} \
44 -m
${INFOMODE_
${.ALLSRC
:T
}:U
${INFOMODE}} \
46 @
[ -f
${INFODIRFILE} ] && \
47 while
! ln
${INFODIRFILE} ${INFODIRFILE}.lock
2> /dev
/null
; \
49 ${TOOL_INSTALL_INFO} -d
${INFODIRFILE} -r
${.TARGET
} 2> /dev
/null
; \
50 ${TOOL_INSTALL_INFO} -d
${INFODIRFILE} ${.TARGET
}; \
51 rm -f
${INFODIRFILE}.lock
54 .for F in
${INFOFILES
:O
:u
}
55 _FDIR
:= ${INFODIR_
${F}:U
${INFODIR}} # dir overrides
56 _FNAME
:= ${INFONAME_
${F}:U
${INFONAME
:U
${F
:T
}}} # name overrides
57 _F
:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path
59 .if
${MKUPDATE} == "no"
60 ${_F}! ${F} __infoinstall
# install rule
61 .if
!defined
(BUILD
) && !make
(all) && !make
(${F})
62 ${_F}! .MADE
# no build at install
65 ${_F}: ${F} __infoinstall
# install rule
66 .if
!defined
(BUILD
) && !make
(all) && !make
(${F})
67 ${_F}: .MADE
# no build at install
72 .PRECIOUS
: ${_F} # keep if install fails
78 .
endif # ${MKINFO} != "no"
81 CLEANFILES
+= ${INFOFILES}
84 .if
!empty
(CLEANFILES
)
88 ##### Pull in related .mk logic
92 ${TARGETS}: # ensure existence