1 # $NetBSD: bsd.info.mk,v 1.40 2011/09/10 16:57:35 apb Exp $
6 realinstall
: infoinstall
16 INFOFILES
= ${TEXINFO
:C
/\.te?xi
(nfo
)?
$/.
info/}
21 .SUFFIXES
: .txi .texi .texinfo .
info
23 .txi.
info .texi.
info .texinfo.
info:
25 ${TOOL_MAKEINFO} ${INFOFLAGS} --no-split
--no-version-header
-o
${.TARGET
} ${.IMPSRC
}
27 .
endif # ${MKINFO} != "no"
30 infoinstall
:: # ensure existence
35 INFODIRFILE
=${DESTDIR}${INFODIR}/dir
37 # serialize access to ${INFODIRFILE}; needed for parallel makes
41 -o
${INFOOWN_
${.ALLSRC
:T
}:U
${INFOOWN}} \
42 -g
${INFOGRP_
${.ALLSRC
:T
}:U
${INFOGRP}} \
43 -m
${INFOMODE_
${.ALLSRC
:T
}:U
${INFOMODE}} \
45 @
[ -f
${INFODIRFILE} ] && \
46 while
! ln
${INFODIRFILE} ${INFODIRFILE}.lock
2> /dev
/null
; \
48 ${TOOL_INSTALL_INFO} -d
${INFODIRFILE} -r
${.TARGET
} 2> /dev
/null
; \
49 ${TOOL_INSTALL_INFO} -d
${INFODIRFILE} ${.TARGET
}; \
50 rm -f
${INFODIRFILE}.lock
53 .for F in
${INFOFILES
:O
:u
}
54 _FDIR
:= ${INFODIR_
${F}:U
${INFODIR}} # dir overrides
55 _FNAME
:= ${INFONAME_
${F}:U
${INFONAME
:U
${F
:T
}}} # name overrides
56 _F
:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path
58 .if
${MKUPDATE} == "no"
59 ${_F}! ${F} __infoinstall
# install rule
60 .if
!defined
(BUILD
) && !make
(all) && !make
(${F})
61 ${_F}! .MADE
# no build at install
64 ${_F}: ${F} __infoinstall
# install rule
65 .if
!defined
(BUILD
) && !make
(all) && !make
(${F})
66 ${_F}: .MADE
# no build at install
71 .PRECIOUS
: ${_F} # keep if install fails
77 .
endif # ${MKINFO} != "no"
80 CLEANDIRFILES
+= ${INFOFILES}
82 ##### Pull in related .mk logic
85 .
include <bsd.
clean.mk
>
87 ${TARGETS}: # ensure existence