Subject: RFC: moving src/common to src/sys/common (with patch)
To: None <current-users@netbsd.org>
From: Pavel Cahyna <pavel@netbsd.org>
List: current-users
Date: 05/09/2006 23:33:30
--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello,
the kernel build -current-ly includes the directory src/common. This means
that it is no longer sufficient to check out src/sys to build the kernel.
Also maintaining it with revision control tools is more complicated. (For
example, if one wants to mirror the repository of kernel sources, it is
impossible to mirror just one directory in the repository.)
For those reasons, I would like to move src/common to src/sys/common.
Comments?
I would also like to have the change tested. The patch modifies MD dirs of
those archs:
amiga
atari
mvme68k
mvmeppc
sun68k
x68k
and also sys/arch/hpc/stand/libz/libz.config and
sys/arch/hpc/stand/hpcboot/hpcboot.config whose purpose is unclear to me.
I completed a full release build of amiga, and would like to ask people to
test the other archs.
To test: apply the included patch and move src/common to src/sys/common.
Then build normally with build.sh .
It would be good to finish this (if we agree that it is actually
desirable) before branching netbsd-4, otherwise it would probably mean
increased maintenance cost ...
Thanks Pavel
--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="move.diff"
Index: distrib/utils/zcat/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/distrib/utils/zcat/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- distrib/utils/zcat/Makefile 14 Jan 2006 21:15:40 -0000 1.14
+++ distrib/utils/zcat/Makefile 9 May 2006 08:38:31 -0000
@@ -6,7 +6,7 @@
# so that the fake deflate functions in zcat.c will satisfy the
# references to those functions in gzio.c (yes, it's a hack).
-SRCDIR= ${.CURDIR}/../../../common/dist/zlib
+SRCDIR= ${.CURDIR}/../../../sys/common/dist/zlib
PROG= zcat
NOMAN= # defined
Index: doc/3RDPARTY
===================================================================
RCS file: /home/pavel/cvs/src/doc/3RDPARTY,v
retrieving revision 1.432
diff -u -r1.432 3RDPARTY
--- doc/3RDPARTY 22 Apr 2006 16:09:50 -0000 1.432
+++ doc/3RDPARTY 9 May 2006 08:57:14 -0000
@@ -918,4 +918,4 @@
Responsible: gwr, tron, christos
License: BSD (3-clause)
Notes:
-Imported to src/common/dist/zlib and shared by the kernel and userland.
+Imported to src/sys/common/dist/zlib and shared by the kernel and userland.
Index: include/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/include/Makefile,v
retrieving revision 1.123
diff -u -r1.123 Makefile
--- include/Makefile 27 Apr 2006 23:42:08 -0000 1.123
+++ include/Makefile 9 May 2006 08:38:06 -0000
@@ -44,7 +44,7 @@
INCSDIR= /usr/include
SUBDIR= rpc
-SUBDIR+= ../common/include/prop
+SUBDIR+= ../sys/common/include/prop
.include <bsd.prog.mk>
.include <bsd.subdir.mk>
Index: lib/libc/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/lib/libc/Makefile,v
retrieving revision 1.127
diff -u -r1.127 Makefile
--- lib/libc/Makefile 11 Mar 2006 21:07:18 -0000 1.127
+++ lib/libc/Makefile 9 May 2006 08:37:39 -0000
@@ -51,7 +51,7 @@
.include "${.CURDIR}/compat/Makefile.inc"
.endif
-.include "${.CURDIR}/../../common/lib/libc/Makefile.inc"
+.include "${.CURDIR}/../../sys/common/lib/libc/Makefile.inc"
.include "${.CURDIR}/db/Makefile.inc"
.include "${.CURDIR}/citrus/Makefile.inc"
.include "${.CURDIR}/compat-43/Makefile.inc"
Index: lib/libprop/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/lib/libprop/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- lib/libprop/Makefile 27 Apr 2006 23:41:24 -0000 1.3
+++ lib/libprop/Makefile 9 May 2006 08:37:33 -0000
@@ -4,7 +4,7 @@
USE_SHLIBDIR= yes
-PROPLIBDIR=${NETBSDSRCDIR}/common/lib/libprop
+PROPLIBDIR=${NETBSDSRCDIR}/sys/common/lib/libprop
.include "${PROPLIBDIR}/Makefile.inc"
Index: lib/libz/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/lib/libz/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- lib/libz/Makefile 14 Jan 2006 20:12:36 -0000 1.19
+++ lib/libz/Makefile 9 May 2006 08:37:29 -0000
@@ -4,7 +4,7 @@
USE_SHLIBDIR= yes
-ZLIBDIR=${NETBSDSRCDIR}/common/dist/zlib
+ZLIBDIR=${NETBSDSRCDIR}/sys/common/dist/zlib
.PATH: ${ZLIBDIR}
LIB= z
Index: sys/arch/amiga/stand/bootblock/boot/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/amiga/stand/bootblock/boot/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- sys/arch/amiga/stand/bootblock/boot/Makefile 25 Jan 2006 13:23:50 -0000 1.38
+++ sys/arch/amiga/stand/bootblock/boot/Makefile 9 May 2006 08:37:22 -0000
@@ -7,14 +7,14 @@
#XX# lines replace similar lines, or are added, in case we want to
#XX# compile LIBZ ourselves to save a few bytes (think TXLT)
-#XX#DIR_LIBZ = ${DIR_TOP}/../common/dist/zlib
+#XX#DIR_LIBZ = ${DIR_TOP}/common/dist/zlib
DIR_TOP= ${.CURDIR}/../../../../..
DIR_SA = ${DIR_TOP}/lib/libsa
DIR_LIBZ=
DIR_KERN= ${DIR_TOP}/lib/libkern
DIR_KERN_MD= ${DIR_TOP}/lib/libkern/arch/$(MACHINE_ARCH)
-DIR_LIBC= ${DIR_TOP}/../common/lib/libc
+DIR_LIBC= ${DIR_TOP}/common/lib/libc
.PATH: $(DIR_SA) ${DIR_LIBZ} $(DIR_KERN) $(DIR_KERN_MD) \
${DIR_LIBC}/gen ${DIR_LIBC}/arch/m68k/gen \
Index: sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile 2 Jan 2006 22:10:32 -0000 1.10
+++ sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile 9 May 2006 08:36:50 -0000
@@ -6,7 +6,7 @@
DIR_SA = ${DIR_TOP}/lib/libsa
DIR_KERN= ${DIR_TOP}/lib/libkern
DIR_KERN_MD= ${DIR_TOP}/lib/libkern/arch/$(MACHINE_ARCH)
-DIR_LIBC= ${DIR_TOP}/../common/lib/libc
+DIR_LIBC= ${DIR_TOP}/common/lib/libc
.PATH: ${.CURDIR}/../boot $(DIR_SA) $(DIR_KERN) $(DIR_KERN_MD) \
${DIR_LIBC}/gen ${DIR_LIBC}/arch/m68k/gen \
Index: sys/arch/atari/stand/libsa/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/atari/stand/libsa/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- sys/arch/atari/stand/libsa/Makefile 30 Dec 2005 00:24:48 -0000 1.27
+++ sys/arch/atari/stand/libsa/Makefile 9 May 2006 08:36:30 -0000
@@ -50,7 +50,7 @@
S_KERN=${S}/lib/libkern
S_MACHSA=${S}/arch/atari/stand/libsa
-.include "${S}/../common/lib/libc/Makefile.inc"
+.include "${S}/common/lib/libc/Makefile.inc"
.PATH: ${S_SA} ${S_KERN}
Index: sys/arch/hpc/stand/hpcboot/hpcboot.config
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/hpc/stand/hpcboot/hpcboot.config,v
retrieving revision 1.10
diff -u -r1.10 hpcboot.config
--- sys/arch/hpc/stand/hpcboot/hpcboot.config 18 Jan 2006 01:08:57 -0000 1.10
+++ sys/arch/hpc/stand/hpcboot/hpcboot.config 9 May 2006 08:53:13 -0000
@@ -69,7 +69,7 @@
res
../include
../../../..
- ../../../../../common/dist/zlib
+ ../../../../common/dist/zlib
'
LIBDEP_LIST='
libsa
Index: sys/arch/hpc/stand/libz/libz.config
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/hpc/stand/libz/libz.config,v
retrieving revision 1.8
diff -u -r1.8 libz.config
--- sys/arch/hpc/stand/libz/libz.config 18 Jan 2006 00:11:27 -0000 1.8
+++ sys/arch/hpc/stand/libz/libz.config 9 May 2006 08:53:10 -0000
@@ -7,12 +7,12 @@
NAME='libz'
SRCFILE_LIST='
- ../../../../../common/dist/zlib/adler32.c
- ../../../../../common/dist/zlib/crc32.c
- ../../../../../common/dist/zlib/inffast.c
- ../../../../../common/dist/zlib/inflate.c
- ../../../../../common/dist/zlib/inftrees.c
- ../../../../../common/dist/zlib/uncompr.c
+ ../../../../common/dist/zlib/adler32.c
+ ../../../../common/dist/zlib/crc32.c
+ ../../../../common/dist/zlib/inffast.c
+ ../../../../common/dist/zlib/inflate.c
+ ../../../../common/dist/zlib/inftrees.c
+ ../../../../common/dist/zlib/uncompr.c
zalloc.c
'
CPPDEF_LIST='
Index: sys/arch/mvme68k/stand/libsa/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/mvme68k/stand/libsa/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- sys/arch/mvme68k/stand/libsa/Makefile 26 Feb 2006 19:20:57 -0000 1.29
+++ sys/arch/mvme68k/stand/libsa/Makefile 9 May 2006 08:36:24 -0000
@@ -5,7 +5,7 @@
# Logically src/sys
DIR_SA=$S/lib/libsa
DIR_KERN=$S/lib/libkern
-DIR_LIBC=$S/../common/lib/libc
+DIR_LIBC=$S/common/lib/libc
SRC_net= arp.c \
bootp.c bootparam.c \
@@ -61,7 +61,7 @@
CLEANFILES+= SRT0.o
.include "../Makefile.booters"
-.include "${S}/../common/lib/libc/Makefile.inc"
+.include "${S}/common/lib/libc/Makefile.inc"
.PATH: ${DIR_SA} ${DIR_KERN} \
${DIR_LIBC}/inet ${DIR_LIBC}/quad ${DIR_LIBC}/string
Index: sys/arch/mvmeppc/stand/libsa/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/mvmeppc/stand/libsa/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- sys/arch/mvmeppc/stand/libsa/Makefile 26 Jan 2006 22:26:52 -0000 1.6
+++ sys/arch/mvmeppc/stand/libsa/Makefile 9 May 2006 08:36:17 -0000
@@ -39,7 +39,7 @@
CLEANFILES+= srt0.o
.include "../Makefile.booters"
-.include "${S}/../common/lib/libc/Makefile.inc"
+.include "${S}/common/lib/libc/Makefile.inc"
.PATH: ${DIR_SA} ${DIR_KERN}
Index: sys/arch/sun68k/stand/libsa/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/sun68k/stand/libsa/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- sys/arch/sun68k/stand/libsa/Makefile 26 Jan 2006 22:16:08 -0000 1.22
+++ sys/arch/sun68k/stand/libsa/Makefile 9 May 2006 08:36:11 -0000
@@ -17,7 +17,7 @@
S=${.CURDIR}/../../../..
DIR_SA=${S}/lib/libsa
DIR_KERN=${S}/lib/libkern ${S}/lib/libkern/arch/m68k
-DIR_LIBC=${S}/../common/lib/libc
+DIR_LIBC=${S}/common/lib/libc
.PATH: ${DIR_SA} ${DIR_KERN} \
${DIR_LIBC}/gen ${DIR_LIBC}/arch/m68k/gen \
Index: sys/arch/x68k/stand/boot_ufs/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/x68k/stand/boot_ufs/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- sys/arch/x68k/stand/boot_ufs/Makefile 27 Dec 2005 23:20:50 -0000 1.18
+++ sys/arch/x68k/stand/boot_ufs/Makefile 9 May 2006 08:35:44 -0000
@@ -52,7 +52,7 @@
.endif
.include "${.CURDIR}/../Makefile.booters"
-.include "${S}/../common/lib/libc/Makefile.inc"
+.include "${S}/common/lib/libc/Makefile.inc"
CLEANFILES+= $(PROG).x $(PROG).map
Index: sys/arch/x68k/stand/libsa/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/arch/x68k/stand/libsa/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- sys/arch/x68k/stand/libsa/Makefile 16 Jan 2006 13:05:11 -0000 1.19
+++ sys/arch/x68k/stand/libsa/Makefile 9 May 2006 08:35:39 -0000
@@ -4,7 +4,7 @@
LIBSADIR= $S/lib/libsa
LIBKERNDIR= $S/lib/libkern
LIBZDIR= $S/lib/libz
-LIBZDIST= $S/../common/dist/zlib
+LIBZDIST= $S/common/dist/zlib
LIB= sa
@@ -43,7 +43,7 @@
.PATH: ${LIBSADIR} ${LIBKERNDIR} ${LIBZDIR} ${LIBZDIST}
.include "../Makefile.booters"
-.include "${S}/../common/lib/libc/Makefile.inc"
+.include "${S}/common/lib/libc/Makefile.inc"
# only needed during build
libinstall::
Index: sys/conf/Makefile.kern.inc
===================================================================
RCS file: /home/pavel/cvs/src/sys/conf/Makefile.kern.inc,v
retrieving revision 1.77
diff -u -r1.77 Makefile.kern.inc
--- sys/conf/Makefile.kern.inc 28 Apr 2006 03:40:15 -0000 1.77
+++ sys/conf/Makefile.kern.inc 9 May 2006 08:35:32 -0000
@@ -55,7 +55,7 @@
## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile
##
_ISGCC295!= ${CC} --version 2>/dev/null | grep 2.95 2>/dev/null || echo 0
-INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \
+INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/common/include -I$S/arch \
-I$S -nostdinc
CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
DEFCOPTS?= -O2
Index: sys/lib/libkern/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/lib/libkern/Makefile,v
retrieving revision 1.80
diff -u -r1.80 Makefile
--- sys/lib/libkern/Makefile 27 Apr 2006 20:43:09 -0000 1.80
+++ sys/lib/libkern/Makefile 9 May 2006 08:35:23 -0000
@@ -25,8 +25,8 @@
CPPFLAGS= -I$M ${KERNCPPFLAGS} ${KERNMISCCPPFLAGS}
-.include "${.PARSEDIR}/../../../common/lib/libc/Makefile.inc"
-.include "${.PARSEDIR}/../../../common/lib/libprop/Makefile.inc"
+.include "${.PARSEDIR}/../../common/lib/libc/Makefile.inc"
+.include "${.PARSEDIR}/../../common/lib/libprop/Makefile.inc"
.PATH.c: ${KERNDIR}
.if exists ($M/Makefile.inc)
Index: sys/lib/libkern/Makefile.inc
===================================================================
RCS file: /home/pavel/cvs/src/sys/lib/libkern/Makefile.inc,v
retrieving revision 1.40
diff -u -r1.40 Makefile.inc
--- sys/lib/libkern/Makefile.inc 20 Dec 2005 19:35:26 -0000 1.40
+++ sys/lib/libkern/Makefile.inc 9 May 2006 08:35:06 -0000
@@ -90,4 +90,4 @@
.PHONY: __always_make_kernlib
.PHONY: cleankernlib cleandirkernlib dependkernlib
-.include "${.PARSEDIR}/../../../common/lib/libc/Makefile.inc"
+.include "${.PARSEDIR}/../../common/lib/libc/Makefile.inc"
Index: sys/lib/libsa/Makefile.inc
===================================================================
RCS file: /home/pavel/cvs/src/sys/lib/libsa/Makefile.inc,v
retrieving revision 1.19
diff -u -r1.19 Makefile.inc
--- sys/lib/libsa/Makefile.inc 26 Jan 2006 14:05:49 -0000 1.19
+++ sys/lib/libsa/Makefile.inc 9 May 2006 08:34:57 -0000
@@ -29,7 +29,7 @@
SALIB= ${SADST}/libsa.a
SALIB_PROF= ${SADST}/libsa_p.a
.endif
-ZLIBSRCDIR:= ${.PARSEDIR}/../../../common/dist/zlib
+ZLIBSRCDIR:= ${.PARSEDIR}/../../common/dist/zlib
SAMISCCPPFLAGS+=-I${ZLIBSRCDIR}
SAMAKE= \
Index: sys/lib/libz/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/sys/lib/libz/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- sys/lib/libz/Makefile 14 Jan 2006 20:15:38 -0000 1.14
+++ sys/lib/libz/Makefile 9 May 2006 08:34:26 -0000
@@ -4,7 +4,7 @@
NOPIC= # defined
NOPROFILE=# defined
-ZDISTDIR:=${.PARSEDIR}/../../../common/dist/zlib
+ZDISTDIR:=${.PARSEDIR}/../../common/dist/zlib
CPPFLAGS+= -I${ZDISTDIR} ${ZCPPFLAGS} ${ZMISCCPPFLAGS} -D_ZLIB_PRIVATE
Index: sys/lkm/Makefile.inc
===================================================================
RCS file: /home/pavel/cvs/src/sys/lkm/Makefile.inc,v
retrieving revision 1.8
diff -u -r1.8 Makefile.inc
--- sys/lkm/Makefile.inc 7 May 2006 20:15:14 -0000 1.8
+++ sys/lkm/Makefile.inc 9 May 2006 08:34:14 -0000
@@ -8,7 +8,7 @@
.include <bsd.own.mk>
-CPPFLAGS+=-I${NETBSDSRCDIR}/common/include
+CPPFLAGS+=-I${NETBSDSRCDIR}/sys/common/include
WARNS?= 1
Index: tools/compat/Makefile
===================================================================
RCS file: /home/pavel/cvs/src/tools/compat/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- tools/compat/Makefile 11 Feb 2006 10:35:29 -0000 1.42
+++ tools/compat/Makefile 9 May 2006 08:34:03 -0000
@@ -38,9 +38,9 @@
${.CURDIR}/../../lib/libc/stdio \
${.CURDIR}/../../lib/libc/stdlib \
${.CURDIR}/../../lib/libc/string \
- ${.CURDIR}/../../common/lib/libc/string \
- ${.CURDIR}/../../common/lib/libc/hash/sha1 \
- ${.CURDIR}/../../common/lib/libc/md \
+ ${.CURDIR}/../../sys/common/lib/libc/string \
+ ${.CURDIR}/../../sys/common/lib/libc/hash/sha1 \
+ ${.CURDIR}/../../sys/common/lib/libc/md \
${.CURDIR}/../../usr.bin/lex \
DPSRCS+= defs.mk
--UugvWAfsgieZRqgk--