aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2015-06-13 19:20:56 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2015-06-13 19:20:56 +0000
commitccfb965433c67f3bda935a3cdf334be2e3c4348d (patch)
tree224d8be23eae518123c5b6db18c9819fe6ac6c62 /etc
parentcab10cc1d1135a912a7bd2d6178c8e951405167e (diff)
parent2b3dc5355754d7cfe6736c8c2f8d573ee7ac7fab (diff)
downloadsrc-ccfb965433c67f3bda935a3cdf334be2e3c4348d.tar.gz
src-ccfb965433c67f3bda935a3cdf334be2e3c4348d.zip
Add META_MODE support.
Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
Notes
Notes: svn path=/head/; revision=284345
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile16
-rw-r--r--etc/sendmail/Makefile.depend15
2 files changed, 29 insertions, 2 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 7f0ca56aae02..053a40705efe 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -330,6 +330,16 @@ distribution:
MTREE_CMD?= mtree
+.if ${MK_INSTALL_AS_USER} == "yes" && ${_uid} != 0
+MTREE_FILTER= sed -e 's,\([gu]\)name=,\1id=,g' \
+ -e 's,\(uid=\)[^ ]* ,\1${_uid} ,' \
+ -e 's,\(gid=\)[^ ]* ,\1${_gid} ,' \
+ -e 's,\(uid=\)[^ ]*$$,\1${_uid},' \
+ -e 's,\(gid=\)[^ ]*$$,\1${_gid},'
+.else
+MTREE_FILTER= cat
+.endif
+
MTREES= mtree/BSD.root.dist / \
mtree/BSD.var.dist /var \
mtree/BSD.usr.dist /usr \
@@ -358,7 +368,8 @@ distrib-dirs: ${MTREES:N/*}
test -d $$d || mkdir -p $$d; \
${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
-f $$m -p $$d; \
- ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
+ ${MTREE_FILTER} $$m | \
+ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -p $$d; \
done; true
.if defined(NO_ROOT)
@set ${MTREES}; \
@@ -372,7 +383,8 @@ distrib-dirs: ${MTREES:N/*}
test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \
${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
"sed s#^\.#.$$d# | ${METALOG.add}" ; \
- ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \
+ ${MTREE_FILTER} $$m | \
+ ${MTREE_CMD:N-W} -C -K uname,gname | sed s#^\.#.$$d# | \
${METALOG.add} ; \
done; true
.endif
diff --git a/etc/sendmail/Makefile.depend b/etc/sendmail/Makefile.depend
new file mode 100644
index 000000000000..3af2d7f1f4d2
--- /dev/null
+++ b/etc/sendmail/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DEP_MACHINE := ${.PARSEFILE:E}
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif