]> Zhao Yanbai Git Server - minix.git/commitdiff
Install sources with MKSRC=yes
authorBen Gras <ben@minix3.org>
Thu, 27 Feb 2014 09:27:28 +0000 (10:27 +0100)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:12 +0000 (17:05 +0200)
Change-Id: Iee433cfe6796af0ea292c7eadff365a32059a609

Makefile
distrib/sets/lists/minix/mi
share/mk/bsd.own.mk

index f9c51feb3e10350300fd0f6eac1dd794becdb367..66aac28d06136fb54d570287976a85239a198d32 100644 (file)
--- 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...
index 6f9e454dc229b50d48bdf193b0f7fcee9a0285a1..979aaa36000b8eea0d933bb97da4a63ea24650af 100644 (file)
 ./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
index 7d50afb4cab891ce8f2062dc801a530051c4472f..6f08bee5ef5f7038f616c0c1aaddcd7dfa2532e7 100644 (file)
@@ -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