svn commit: r269130 - in head/sys/modules: bxe dtrace/fasttrap zfs

Marcel Moolenaar marcel at FreeBSD.org
Sat Jul 26 17:24:59 UTC 2014


Author: marcel
Date: Sat Jul 26 17:24:58 2014
New Revision: 269130
URL: http://svnweb.freebsd.org/changeset/base/269130

Log:
  Avoid using ${.CURDIR} so that the module can be built from multiple
  directories.
  
  Obtained from:	Juniper Networks, Inc.

Modified:
  head/sys/modules/bxe/Makefile
  head/sys/modules/dtrace/fasttrap/Makefile
  head/sys/modules/zfs/Makefile

Modified: head/sys/modules/bxe/Makefile
==============================================================================
--- head/sys/modules/bxe/Makefile	Sat Jul 26 17:07:32 2014	(r269129)
+++ head/sys/modules/bxe/Makefile	Sat Jul 26 17:24:58 2014	(r269130)
@@ -1,5 +1,8 @@
 # $FreeBSD$
-BXE	= ${.CURDIR}/../../dev/bxe
+
+SYSDIR	?= ${.CURDIR}/../..
+
+BXE	= ${SYSDIR}/dev/bxe
 .PATH:	${BXE}
 
 KMOD	= if_bxe

Modified: head/sys/modules/dtrace/fasttrap/Makefile
==============================================================================
--- head/sys/modules/dtrace/fasttrap/Makefile	Sat Jul 26 17:07:32 2014	(r269129)
+++ head/sys/modules/dtrace/fasttrap/Makefile	Sat Jul 26 17:24:58 2014	(r269130)
@@ -20,7 +20,7 @@ CFLAGS+=	-I${SYSDIR}/cddl/contrib/openso
 .PATH:		${SYSDIR}/cddl/contrib/opensolaris/uts/powerpc/dtrace
 .endif
 
-.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/common/unicode
+.PATH:		${SYSDIR}/cddl/contrib/opensolaris/common/unicode
 SRCS+=		u8_textprep.c
 
 CFLAGS+=	-DSMP

Modified: head/sys/modules/zfs/Makefile
==============================================================================
--- head/sys/modules/zfs/Makefile	Sat Jul 26 17:07:32 2014	(r269129)
+++ head/sys/modules/zfs/Makefile	Sat Jul 26 17:24:58 2014	(r269130)
@@ -1,10 +1,12 @@
 # $FreeBSD$
 
+SYSDIR?=${.CURDIR}/../..
+
 KMOD=	zfs
 
 SRCS=	bus_if.h device_if.h vnode_if.h
 
-SUNW=	${.CURDIR}/../../cddl/contrib/opensolaris
+SUNW=	${SYSDIR}/cddl/contrib/opensolaris
 
 .PATH:	${SUNW}/common/acl
 SRCS+=	acl_common.c
@@ -14,10 +16,10 @@ SRCS+=	avl.c
 SRCS+=	nvpair.c
 SRCS+=	nvpair_alloc_fixed.c
 SRCS+=	fnvpair.c
-.PATH:	${.CURDIR}/../../cddl/contrib/opensolaris/common/unicode
+.PATH:	${SYSDIR}/cddl/contrib/opensolaris/common/unicode
 SRCS+=	u8_textprep.c
 
-.PATH:	${.CURDIR}/../../cddl/compat/opensolaris/kern
+.PATH:	${SYSDIR}/cddl/compat/opensolaris/kern
 SRCS+=	opensolaris_acl.c
 SRCS+=	opensolaris_kobj.c
 SRCS+=	opensolaris_kstat.c
@@ -31,7 +33,7 @@ SRCS+=	opensolaris_vfs.c
 SRCS+=	opensolaris_vm.c
 SRCS+=	opensolaris_zone.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
@@ -64,7 +66,7 @@ SRCS+=	zmod.c
 SRCS+=	zmod_subr.c
 SRCS+=	zutil.c
 
-.PATH:	${.CURDIR}/../../crypto/sha2
+.PATH:	${SYSDIR}/crypto/sha2
 SRCS+=	sha2.c sha256c.c
 
 .PATH:	${SUNW}/common/zfs
@@ -78,11 +80,11 @@ SRCS+=	trim_map.c
 # Use FreeBSD's namecache.
 CFLAGS+=-DFREEBSD_NAMECACHE
 
-CFLAGS+=-I${.CURDIR}/../../cddl/compat/opensolaris
+CFLAGS+=-I${SYSDIR}/cddl/compat/opensolaris
 CFLAGS+=-I${SUNW}/uts/common/fs/zfs
 CFLAGS+=-I${SUNW}/uts/common/zmod
 CFLAGS+=-I${SUNW}/uts/common
-CFLAGS+=-I${.CURDIR}/../..
+CFLAGS+=-I${SYSDIR}
 CFLAGS+=-I${SUNW}/common/zfs
 CFLAGS+=-I${SUNW}/common
 CFLAGS+=-DBUILDING_ZFS
@@ -96,7 +98,7 @@ CFLAGS+=-mminimal-toc
 
 .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-unknown-pragmas
 CWARNFLAGS+=-Wno-missing-prototypes


More information about the svn-src-head mailing list