Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2014 01:59:13 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262818 - in head/sys/modules: cyclic dtrace/dtmalloc dtrace/dtnfscl dtrace/dtnfsclient dtrace/dtrace dtrace/dtrace_test dtrace/dtraceall dtrace/fasttrap dtrace/fbt dtrace/lockstat dtra...
Message-ID:  <201403060159.s261xDqK022086@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Thu Mar  6 01:59:13 2014
New Revision: 262818
URL: http://svnweb.freebsd.org/changeset/base/262818

Log:
  Use SYSDIR to reference to the top of the sys hierarchy. Define SYSDIR
  relative to .CURDIR if not already defined. This makes the makefiles
  more readable but also more re-usable and adaptable.
  
  Obtained from:	Juniper Networks, Inc.

Modified:
  head/sys/modules/cyclic/Makefile
  head/sys/modules/dtrace/dtmalloc/Makefile
  head/sys/modules/dtrace/dtnfscl/Makefile
  head/sys/modules/dtrace/dtnfsclient/Makefile
  head/sys/modules/dtrace/dtrace/Makefile
  head/sys/modules/dtrace/dtrace_test/Makefile
  head/sys/modules/dtrace/dtraceall/Makefile
  head/sys/modules/dtrace/fasttrap/Makefile
  head/sys/modules/dtrace/fbt/Makefile
  head/sys/modules/dtrace/lockstat/Makefile
  head/sys/modules/dtrace/profile/Makefile
  head/sys/modules/dtrace/prototype/Makefile
  head/sys/modules/dtrace/sdt/Makefile
  head/sys/modules/dtrace/systrace/Makefile
  head/sys/modules/dtrace/systrace_freebsd32/Makefile
  head/sys/modules/dtrace/systrace_linux32/Makefile
  head/sys/modules/opensolaris/Makefile

Modified: head/sys/modules/cyclic/Makefile
==============================================================================
--- head/sys/modules/cyclic/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/cyclic/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,19 +1,21 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../cddl/dev/cyclic
+SYSDIR?=	${.CURDIR}/../..
+
+.PATH:		${SYSDIR}/cddl/dev/cyclic
 
 KMOD=		cyclic
 SRCS=		cyclic.c
 
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../cddl/compat/opensolaris		\
-		-I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common	\
-		-I${.CURDIR}/../..					\
-		-I${.CURDIR}/../../cddl/dev/cyclic/i386
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris		\
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common	\
+		-I${SYSDIR}					\
+		-I${SYSDIR}/cddl/dev/cyclic/i386
 
 IGNORE_PRAGMA=	1
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/dtmalloc/Makefile
==============================================================================
--- head/sys/modules/dtrace/dtmalloc/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/dtmalloc/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/dtmalloc
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/dtmalloc
 
 KMOD=		dtmalloc
 SRCS=		dtmalloc.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/dtnfscl/Makefile
==============================================================================
--- head/sys/modules/dtrace/dtnfscl/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/dtnfscl/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../fs/nfsclient
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/fs/nfsclient
 
 KMOD=		dtnfscl
 SRCS=		nfs_clkdtrace.c \
 		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/dtnfsclient/Makefile
==============================================================================
--- head/sys/modules/dtrace/dtnfsclient/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/dtnfsclient/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../nfsclient
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/nfsclient
 
 KMOD=		dtnfsclient
 SRCS=		nfs_kdtrace.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/dtrace/Makefile
==============================================================================
--- head/sys/modules/dtrace/dtrace/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/dtrace/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,12 +1,14 @@
 # $FreeBSD$
 
+SYSDIR?=	${.CURDIR}/../../..
+
 ARCHDIR=	${MACHINE_CPUARCH}
 
-.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace
-.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/kern
-.PATH: ${.CURDIR}/../../../cddl/kern
-.PATH: ${.CURDIR}/../../../cddl/dev/dtrace
-.PATH: ${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR}
+.PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace
+.PATH: ${SYSDIR}/cddl/compat/opensolaris/kern
+.PATH: ${SYSDIR}/cddl/kern
+.PATH: ${SYSDIR}/cddl/dev/dtrace
+.PATH: ${SYSDIR}/cddl/dev/dtrace/${ARCHDIR}
 
 KMOD=		dtrace
 SRCS=		dtrace.c \
@@ -14,11 +16,11 @@ SRCS=		dtrace.c \
 		dtrace_subr.c
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
-.PATH: ${.CURDIR}/../../../cddl/dev/dtrace/x86
+.PATH: ${SYSDIR}/cddl/dev/dtrace/x86
 SRCS+=		dis_tables.c \
 		instr_size.c
-CFLAGS+=	-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel \
-		-I${.CURDIR}/../../../cddl/dev/dtrace/x86
+CFLAGS+=	-I${SYSDIR}/cddl/contrib/opensolaris/uts/intel \
+		-I${SYSDIR}/cddl/dev/dtrace/x86
 .endif
 
 SRCS+=		bus_if.h device_if.h vnode_if.h
@@ -36,11 +38,11 @@ SRCS += 	opensolaris_taskq.c
 SRCS+=		opt_apic.h
 .endif
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/dev/dtrace \
-		-I${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR} \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../.. -DDIS_MEM
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/dev/dtrace \
+		-I${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR} -DDIS_MEM
 
 CFLAGS+=	-DSMP
 
@@ -52,7 +54,7 @@ dtrace_asm.o:  assym.s
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h
 
 CWARNFLAGS+=	-Wno-parentheses
 CWARNFLAGS+=	-Wno-uninitialized

Modified: head/sys/modules/dtrace/dtrace_test/Makefile
==============================================================================
--- head/sys/modules/dtrace/dtrace_test/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/dtrace_test/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,16 +1,18 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/dtrace
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/dtrace
 
 KMOD=		dtrace_test
 SRCS=		dtrace_test.c
 
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}
 
 CFLAGS+=	-D_KERNEL
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/dtraceall/Makefile
==============================================================================
--- head/sys/modules/dtrace/dtraceall/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/dtraceall/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,9 +1,11 @@
 # $FreeBSD$
 
+SYSDIR?=	${.CURDIR}/../../..
+
 KMOD=		dtraceall
 SRCS=		dtraceall.c opt_compat.h opt_nfs.h
 
-CFLAGS+=	-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}
 
 .if !defined(KERNBUILDDIR)
 .if ${MACHINE_ARCH} == "amd64"
@@ -14,4 +16,4 @@ opt_compat.h:
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/fasttrap/Makefile
==============================================================================
--- head/sys/modules/dtrace/fasttrap/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/fasttrap/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,26 +1,28 @@
 # $FreeBSD$
 
-.PATH:	${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace
 
 KMOD=		fasttrap
 SRCS=		fasttrap.c fasttrap_isa.c opt_compat.h
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .if ${MACHINE_CPUARCH} == "amd64" ||  ${MACHINE_CPUARCH} == "i386"
-CFLAGS+=	-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel
-.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel/dtrace
+CFLAGS+=	-I${SYSDIR}/cddl/contrib/opensolaris/uts/intel
+.PATH:		${SYSDIR}/cddl/contrib/opensolaris/uts/intel/dtrace
 .elif ${MACHINE_CPUARCH} == "powerpc"
-CFLAGS+=	-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/powerpc
-.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/uts/powerpc/dtrace
+CFLAGS+=	-I${SYSDIR}/cddl/contrib/opensolaris/uts/powerpc
+.PATH:		${SYSDIR}/cddl/contrib/opensolaris/uts/powerpc/dtrace
 .endif
 
 CFLAGS+=	-DSMP
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h
 CWARNFLAGS+=	-Wno-unused

Modified: head/sys/modules/dtrace/fbt/Makefile
==============================================================================
--- head/sys/modules/dtrace/fbt/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/fbt/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,6 +1,8 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/fbt
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/fbt
 
 KMOD=		fbt
 .if ${MACHINE_CPUARCH} == "powerpc"
@@ -10,10 +12,10 @@ SRCS=		fbt.c
 .endif
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/lockstat/Makefile
==============================================================================
--- head/sys/modules/dtrace/lockstat/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/lockstat/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,16 +1,18 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/lockstat
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/lockstat
 
 KMOD=		lockstat
 SRCS=		lockstat.c 
 
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/profile/Makefile
==============================================================================
--- head/sys/modules/dtrace/profile/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/profile/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/profile
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/profile
 
 KMOD=		profile
 SRCS=		profile.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/prototype/Makefile
==============================================================================
--- head/sys/modules/dtrace/prototype/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/prototype/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev
 
 KMOD=		prototype
 SRCS=		prototype.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/sdt/Makefile
==============================================================================
--- head/sys/modules/dtrace/sdt/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/sdt/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/sdt
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/sdt
 
 KMOD=		sdt
 SRCS=		sdt.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/systrace/Makefile
==============================================================================
--- head/sys/modules/dtrace/systrace/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/systrace/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/systrace
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/systrace
 
 KMOD=		systrace
 SRCS=		systrace.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR}
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/systrace_freebsd32/Makefile
==============================================================================
--- head/sys/modules/dtrace/systrace_freebsd32/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/systrace_freebsd32/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,15 +1,17 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/systrace
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/systrace
 
 KMOD=		systrace_freebsd32
 SRCS=		systrace.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../.. -DFREEBSD32_SYSTRACE
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR} -DFREEBSD32_SYSTRACE
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/dtrace/systrace_linux32/Makefile
==============================================================================
--- head/sys/modules/dtrace/systrace_linux32/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/dtrace/systrace_linux32/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,6 +1,8 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../cddl/dev/systrace
+SYSDIR?=	${.CURDIR}/../../..
+
+.PATH:		${SYSDIR}/cddl/dev/systrace
 
 .if ${MACHINE} == "amd64"
 KMOD=		systrace_linux32
@@ -11,10 +13,10 @@ KMOD=		systrace_linux
 SRCS=		systrace.c
 SRCS+=		vnode_if.h
 
-CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
-		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../.. -DLINUX_SYSTRACE
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris \
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
+		-I${SYSDIR} -DLINUX_SYSTRACE
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h

Modified: head/sys/modules/opensolaris/Makefile
==============================================================================
--- head/sys/modules/opensolaris/Makefile	Thu Mar  6 00:37:16 2014	(r262817)
+++ head/sys/modules/opensolaris/Makefile	Thu Mar  6 01:59:13 2014	(r262818)
@@ -1,6 +1,8 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../cddl/compat/opensolaris/kern
+SYSDIR?=	${.CURDIR}/../..
+
+.PATH:		${SYSDIR}/cddl/compat/opensolaris/kern
 
 KMOD=		opensolaris
 SRCS=		opensolaris.c		\
@@ -9,7 +11,7 @@ SRCS=		opensolaris.c		\
 		opensolaris_misc.c	\
 		opensolaris_sunddi.c
 
-_A=${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic
+_A=${SYSDIR}/cddl/contrib/opensolaris/common/atomic
 .if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S)
 .PATH:	${_A}/${MACHINE_CPUARCH}
 SRCS+=		opensolaris_atomic.S
@@ -20,12 +22,12 @@ SRCS+=		opensolaris_atomic.S
 SRCS+=		opensolaris_atomic.c
 .endif
 
-CFLAGS+=	-I${.CURDIR}/../../cddl/compat/opensolaris		\
-		-I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common	\
-		-I${.CURDIR}/../..
+CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris		\
+		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common	\
+		-I${SYSDIR}
 
 IGNORE_PRAGMA=	1
 
 .include <bsd.kmod.mk>
 
-CFLAGS+=	-include ${.CURDIR}/../../cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403060159.s261xDqK022086>