diff --git a/Makefile b/Makefile index f9c51feb3..66aac28d0 100644 --- a/Makefile +++ b/Makefile @@ -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... diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index 6f9e454dc..979aaa360 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -5717,6 +5717,7 @@ ./usr/spool/locks minix-sys ./usr/spool/lpd minix-sys ./usr/src minix-sys +./usr/src/src.tar.gz minix-sys src ./usr/tests minix-sys ./usr/tests/atf/atf-c++/detail/auto_array_test minix-sys atf ./usr/tests/lib/libc/stdio/t_mktemp minix-sys atf diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 7d50afb4c..6f08bee5e 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1117,7 +1117,7 @@ _MKVARS.no= \ #MINIX-specific vars _MKVARS.no+= \ - MKIMAGEONLY MKSMALL MKBITCODE + MKIMAGEONLY MKSMALL MKBITCODE MKSRC .if !empty(MACHINE_ARCH:Mearm*) _MKVARS.no+= \ MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI