svn commit: r307923 - in head/usr.sbin/makefs: . cd9660 ffs
Marcel Moolenaar
marcel at FreeBSD.org
Tue Oct 25 16:21:40 UTC 2016
Author: marcel
Date: Tue Oct 25 16:21:38 2016
New Revision: 307923
URL: https://svnweb.freebsd.org/changeset/base/307923
Log:
Allow building makefs(8) from another Makefile (such as one in
a seperate directory hierarchy used to build tools). This boils
down to replacing the use of ${.CURDIR} with either ${SRCDIR}
or ${SRCTOP}. SRCDIR is defined as the directory in which the
Makefile lives that bmake(1) is currently reading. Use SRCTOP
when reaching outside of makefs's directory.
Modified:
head/usr.sbin/makefs/Makefile
head/usr.sbin/makefs/cd9660/Makefile.inc
head/usr.sbin/makefs/ffs/Makefile.inc
Modified: head/usr.sbin/makefs/Makefile
==============================================================================
--- head/usr.sbin/makefs/Makefile Tue Oct 25 16:14:11 2016 (r307922)
+++ head/usr.sbin/makefs/Makefile Tue Oct 25 16:21:38 2016 (r307923)
@@ -1,10 +1,12 @@
# $FreeBSD$
+SRCDIR:=${.PARSEDIR:tA}
+
.include <src.opts.mk>
PROG= makefs
-CFLAGS+=-I${.CURDIR}
+CFLAGS+=-I${SRCDIR}
SRCS= cd9660.c ffs.c \
makefs.c \
@@ -14,24 +16,24 @@ MAN= makefs.8
WARNS?= 2
-.include "${.CURDIR}/cd9660/Makefile.inc"
-.include "${.CURDIR}/ffs/Makefile.inc"
+.include "${SRCDIR}/cd9660/Makefile.inc"
+.include "${SRCDIR}/ffs/Makefile.inc"
CFLAGS+=-DHAVE_STRUCT_STAT_ST_FLAGS=1
CFLAGS+=-DHAVE_STRUCT_STAT_ST_GEN=1
-.PATH: ${.CURDIR}/../../contrib/mtree
-CFLAGS+=-I${.CURDIR}/../../contrib/mtree
+.PATH: ${SRCTOP}/contrib/mtree
+CFLAGS+=-I${SRCTOP}/contrib/mtree
SRCS+= getid.c misc.c spec.c
-.PATH: ${.CURDIR}/../../contrib/mknod
-CFLAGS+=-I${.CURDIR}/../../contrib/mknod
+.PATH: ${SRCTOP}/contrib/mknod
+CFLAGS+=-I${SRCTOP}/contrib/mknod
SRCS+= pack_dev.c
-.PATH: ${.CURDIR}/../../sys/ufs/ffs
+.PATH: ${SRCTOP}/sys/ufs/ffs
SRCS+= ffs_tables.c
-CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd
+CFLAGS+= -I${SRCTOP}/lib/libnetbsd
LIBADD= netbsd util sbuf
.if ${MK_TESTS} != "no"
Modified: head/usr.sbin/makefs/cd9660/Makefile.inc
==============================================================================
--- head/usr.sbin/makefs/cd9660/Makefile.inc Tue Oct 25 16:14:11 2016 (r307922)
+++ head/usr.sbin/makefs/cd9660/Makefile.inc Tue Oct 25 16:21:38 2016 (r307923)
@@ -1,9 +1,9 @@
# $FreeBSD$
#
-.PATH: ${.CURDIR}/cd9660 ${.CURDIR}/../../sys/fs/cd9660/
+.PATH: ${SRCDIR}/cd9660 ${SRCTOP}/sys/fs/cd9660/
-CFLAGS+=-I${.CURDIR}/../../sys/fs/cd9660/
+CFLAGS+=-I${SRCTOP}/sys/fs/cd9660/
SRCS+= cd9660_strings.c cd9660_debug.c cd9660_eltorito.c \
cd9660_write.c cd9660_conversion.c iso9660_rrip.c cd9660_archimedes.c
Modified: head/usr.sbin/makefs/ffs/Makefile.inc
==============================================================================
--- head/usr.sbin/makefs/ffs/Makefile.inc Tue Oct 25 16:14:11 2016 (r307922)
+++ head/usr.sbin/makefs/ffs/Makefile.inc Tue Oct 25 16:21:38 2016 (r307923)
@@ -1,9 +1,9 @@
# $FreeBSD$
#
-.PATH: ${.CURDIR}/ffs ${.CURDIR}/../../sys/ufs/ffs
+.PATH: ${SRCDIR}/ffs ${SRCTOP}/sys/ufs/ffs
-CFLAGS+= -I${.CURDIR}/../../sys/ufs/ffs
+CFLAGS+= -I${SRCTOP}/sys/ufs/ffs
SRCS+= ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ufs_bmap.c
SRCS+= buf.c mkfs.c
More information about the svn-src-all
mailing list