mk: let install(1) handle already-existing directories
[unleashed.git] / share / mk / inc.mk
blob8f9e1a0eb647bee84aaa43316c796ce6abb45137
1 # $Id: inc.mk,v 1.3 2011/03/11 05:23:05 sjg Exp $
3 # @(#) Copyright (c) 2008, Simon J. Gerraty
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.
12 # Please send copies of changes and bug-fixes to:
13 # sjg@crufty.net
16 .include <init.mk>
18 includes: ${INCS}
20 .if !empty(LIBOWN)
21 INC_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIBGRP}
22 .endif
23 INCMODE ?= 444
24 INC_COPY ?= -C
25 INCSDIR ?= ${INCDIR}
27 realinstall: incinstall
28 .if !target(incinstall)
29 incinstall:
30 .if !empty(INCS)
31 ${INSTALL} -d ${INC_INSTALL_OWN} -m 755 ${DESTDIR}${INCSDIR}
32 ${INSTALL} ${INC_COPY} ${INC_INSTALL_OWN} -m ${INCMODE} ${INCS} ${DESTDIR}${INCSDIR}
33 .endif
34 .endif