xref: /freebsd/contrib/bmake/mk/inc.mk (revision 40a8ac8f62b535d30349faf28cf47106b7041b83)
1# $Id: inc.mk,v 1.3 2011/03/11 05:23:05 sjg Exp $
2#
3#	@(#) Copyright (c) 2008, Simon J. Gerraty
4#
5#	This file is provided in the hope that it will
6#	be of use.  There is absolutely NO WARRANTY.
7#	Permission to copy, redistribute or otherwise
8#	use this file is hereby granted provided that
9#	the above copyright notice and this notice are
10#	left intact.
11#
12#	Please send copies of changes and bug-fixes to:
13#	sjg@crufty.net
14#
15
16.include <init.mk>
17
18includes:	${INCS}
19
20.if !empty(LIBOWN)
21INC_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIBGRP}
22.endif
23INCMODE ?= 444
24INC_COPY ?= -C
25INCSDIR ?= ${INCDIR}
26
27realinstall:	incinstall
28.if !target(incinstall)
29incinstall:
30.if !empty(INCS)
31	[ -d ${DESTDIR}${INCSDIR} ] || \
32	${INSTALL} -d ${INC_INSTALL_OWN} -m 775 ${DESTDIR}${INCSDIR}
33	${INSTALL} ${INC_COPY} ${INC_INSTALL_OWN} -m ${INCMODE} ${INCS} ${DESTDIR}${INCSDIR}
34.endif
35.endif
36