Install sources with MKSRC=yes

Change-Id: Iee433cfe6796af0ea292c7eadff365a32059a609
This commit is contained in:
Ben Gras
2014-02-27 10:27:28 +01:00
committed by Lionel Sambuc
parent 4193f2292e
commit fad76abe45
3 changed files with 14 additions and 1 deletions

View File

@@ -254,6 +254,11 @@ BUILDTARGETS+= do-x11
.if ${MKEXTSRC} != "no"
BUILDTARGETS+= do-extsrc
.endif
.if defined(__MINIX) && ${MKSRC} == "yes"
BUILDTARGETS+= do-installsrc
.endif # defined(__MINIX)
BUILDTARGETS+= do-obsolete
#
@@ -551,6 +556,13 @@ install-${dir}: .PHONY
@true
.endfor
.if defined(__MINIX)
SRCTAR=src.tar.gz
do-installsrc:
cd ${.CURDIR} && git ls-tree -r HEAD --name-only | tar czf ${.OBJDIR}/$(SRCTAR) -T -
${INSTALL_FILE} ${.OBJDIR}/$(SRCTAR) ${DESTDIR}/usr/src/
.endif # defined(__MINIX)
#
# XXX this needs to change when distrib Makefiles are recursion compliant
# XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first...