From c41790fef1cb2ed2cad05aa6c9ff83de183593e3 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Thu, 14 Apr 2016 21:04:42 +0000 Subject: Rework META_TARGETS so that it automatically adds META_DEPS to the targets. This will only be done if the target is defined, so if the target is defined after bsd.sys.mk is included then it needs to manually add ${META_DEPS} still. Sponsored by: EMC / Isilon Storage Division --- include/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/Makefile b/include/Makefile index bb79098..c949ede 100644 --- a/include/Makefile +++ b/include/Makefile @@ -131,13 +131,8 @@ _MARCHS+= x86 META_TARGETS+= compat copies symlinks stage_includes: ${SHARED} -.include - -installincludes: ${SHARED} -${SHARED}: compat - # Take care of stale directory-level symlinks. -compat: ${META_DEPS} +compat: .for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ @@ -147,7 +142,7 @@ compat: ${META_DEPS} -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ -p ${DESTDIR}${INCLUDEDIR} > /dev/null -copies: ${META_DEPS} +copies: .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \ ${_MARCHS} if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \ @@ -233,7 +228,7 @@ copies: ${META_DEPS} ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \ ${DESTDIR}${INCLUDEDIR}/teken -symlinks: ${META_DEPS} +symlinks: @${ECHO} "Setting up symlinks to kernel source tree..." .for i in ${LDIRS} cd ${.CURDIR}/../sys/$i; \ @@ -347,6 +342,11 @@ symlinks: ${META_DEPS} ${DESTDIR}${INCLUDEDIR}/rpc; \ done +.include + +installincludes: ${SHARED} +${SHARED}: compat + .if ${MACHINE} == "host" && !defined(_SKIP_BUILD) # we're here because we are building a sysroot... # we need MACHINE et al set correctly -- cgit v1.1