From fc2642aeb48078b9167d8c0639a645f386babecd Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 27 Nov 2013 08:58:16 +0100 Subject: [PATCH] kernel: Clean up sys/kern/Makefile and sys/emulation/linux/i386/Makefile * Move generation of syscall related files from Makefile.misc to Makefile. * Remove Makefile.misc, since the rest of its content (in sys/kern at at least) is inactive code for tags and links generation. --- sys/emulation/linux/i386/Makefile | 19 +++++++-- sys/emulation/linux/i386/Makefile.misc | 18 --------- sys/kern/Makefile | 50 +++++++---------------- sys/kern/Makefile.misc | 56 -------------------------- 4 files changed, 30 insertions(+), 113 deletions(-) delete mode 100644 sys/emulation/linux/i386/Makefile.misc delete mode 100644 sys/kern/Makefile.misc diff --git a/sys/emulation/linux/i386/Makefile b/sys/emulation/linux/i386/Makefile index 3d12541b04..efd673250a 100644 --- a/sys/emulation/linux/i386/Makefile +++ b/sys/emulation/linux/i386/Makefile @@ -2,10 +2,21 @@ # # $FreeBSD: src/sys/i386/linux/Makefile,v 1.4 1999/08/28 00:45:21 peter Exp $ -SUBDIR= linprocfs +all: + @echo "make sysent only" -.include +sysent: ${.CURDIR}/linux_sysent.c -sysent: - cd ${.CURDIR} && ${MAKE} -f Makefile.misc sysent +${.CURDIR}/linux_sysent.c ${.CURDIR}/linux_syscall.h \ +${.CURDIR}/linux_proto.h ${.CURDIR}/linux_union.h: \ + ${.CURDIR}/../../../kern/makesyscalls.sh \ + ${.CURDIR}/syscalls.master ${.CURDIR}/syscalls.conf + -mv -f ${.CURDIR}/linux_sysent.c ${.CURDIR}/linux_sysent.c.bak + -mv -f ${.CURDIR}/linux_syscall.h ${.CURDIR}/linux_syscall.h.bak + -mv -f ${.CURDIR}/linux_proto.h ${.CURDIR}/linux_proto.h.bak + -mv -f ${.CURDIR}/linux_union.h ${.CURDIR}/linux_union.h.bak + cd ${.CURDIR} && sh ../../../kern/makesyscalls.sh syscalls.master syscalls.conf +SUBDIR= linprocfs + +.include diff --git a/sys/emulation/linux/i386/Makefile.misc b/sys/emulation/linux/i386/Makefile.misc deleted file mode 100644 index 2a1dd75402..0000000000 --- a/sys/emulation/linux/i386/Makefile.misc +++ /dev/null @@ -1,18 +0,0 @@ -# Makefile for syscall tables -# -# $DragonFly: src/sys/emulation/linux/i386/Makefile.misc,v 1.1 2003/08/21 20:08:30 dillon Exp $ - -all: - @echo "make sysent only" - -sysent: ${.CURDIR}/linux_sysent.c - -${.CURDIR}/linux_sysent.c ${.CURDIR}/linux_syscall.h \ -${.CURDIR}/linux_proto.h ${.CURDIR}/linux_union.h: \ - ${.CURDIR}/../../../kern/makesyscalls.sh \ - ${.CURDIR}/syscalls.master ${.CURDIR}/syscalls.conf - -mv -f ${.CURDIR}/linux_sysent.c ${.CURDIR}/linux_sysent.c.bak - -mv -f ${.CURDIR}/linux_syscall.h ${.CURDIR}/linux_syscall.h.bak - -mv -f ${.CURDIR}/linux_proto.h ${.CURDIR}/linux_proto.h.bak - -mv -f ${.CURDIR}/linux_union.h ${.CURDIR}/linux_union.h.bak - cd ${.CURDIR} && sh ../../../kern/makesyscalls.sh syscalls.master syscalls.conf diff --git a/sys/kern/Makefile b/sys/kern/Makefile index 75d2033c0b..533ea357c1 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -1,44 +1,24 @@ # @(#)Makefile 8.2 (Berkeley) 3/21/94 # $FreeBSD: src/sys/kern/Makefile,v 1.6.2.1 2003/02/10 12:21:08 des Exp $ -# $DragonFly: src/sys/kern/Makefile,v 1.13 2007/01/19 07:23:42 dillon Exp $ -# Makefile for kernel tags files, init_sysent, etc. +# Makefile for init_sysent.c -TAGARCH= i386 # luna68k news3400 pmax sparc tahoe vax -SUBDIR= dsched firmware libmchain +all: + @echo "make sysent only" -# Kernel tags: -# Tags files are built in the top-level directory for each architecture, -# with a makefile listing the architecture-dependent files, etc. The list -# of common files is in ./Make.tags.inc. Links to the correct tags file -# are placed in each source directory. We need to have links to tags files -# from the generic directories that are relative to the machine type, even -# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at -# ${SYSDIR}/platform/${MACHINE_PLATFORM}/tags. +sysent: ${.CURDIR}/init_sysent.c -SYSTAGS=/var/db/sys_tags -SYSDIR=${.CURDIR:H} -MFLAGS=SYS=${SYSDIR} +${.CURDIR}/init_sysent.c ${.CURDIR}/syscalls.c \ +${.CURDIR}/../sys/syscall.mk ${.CURDIR}/../sys/sysproto.h \ +${.CURDIR}/../sys/sysunion.h: ${.CURDIR}/makesyscalls.sh ${.CURDIR}/syscalls.master + -mv -f ${.CURDIR}/init_sysent.c ${.CURDIR}/init_sysent.c.bak + -mv -f ${.CURDIR}/syscalls.c ${.CURDIR}/syscalls.c.bak + -mv -f ${.CURDIR}/../sys/syscall.h ${.CURDIR}/../sys/syscall.h.bak + -mv -f ${.CURDIR}/../sys/syscall.mk ${.CURDIR}/../sys/syscall.mk.bak + -mv -f ${.CURDIR}/../sys/sysproto.h ${.CURDIR}/../sys/sysproto.h.bak + -mv -f ${.CURDIR}/../sys/sysunion.h ${.CURDIR}/../sys/sysunion.h.bak + cd ${.CURDIR} && sh makesyscalls.sh syscalls.master -# Directories in which to place tags links (other than machine-dependent) -DGEN= conf \ - dev \ - kern libkern \ - vfs vfs/deadfs vfs/fdesc vfs/fifofs \ - vfs/nullfs vfs/portal vfs/procfs \ - vfs/specfs vfs/union \ - vfs/ufs vfs/mfs vfs/nfs vfs/tmpfs \ - net netinet sys \ - vm +SUBDIR= dsched firmware libmchain .include - -sysent: - cd ${.CURDIR} && ${MAKE} -f Makefile.misc sysent - -do_tags: - cd ${.CURDIR} && ${MAKE} -f Makefile.misc tags - -do_links: - cd ${.CURDIR} && ${MAKE} -f Makefile.misc links - diff --git a/sys/kern/Makefile.misc b/sys/kern/Makefile.misc deleted file mode 100644 index f0b8693cc3..0000000000 --- a/sys/kern/Makefile.misc +++ /dev/null @@ -1,56 +0,0 @@ -# Makefile for kernel tags files, init_sysent, etc. - -TAGARCH= i386 # luna68k news3400 pmax sparc tahoe vax - -all: - @echo "make sysent, tags, or links target only" - -sysent: ${.CURDIR}/init_sysent.c - -${.CURDIR}/init_sysent.c ${.CURDIR}/syscalls.c \ -${.CURDIR}/../sys/syscall.mk ${.CURDIR}/../sys/sysproto.h \ -${.CURDIR}/../sys/sysunion.h: ${.CURDIR}/makesyscalls.sh ${.CURDIR}/syscalls.master - -mv -f ${.CURDIR}/init_sysent.c ${.CURDIR}/init_sysent.c.bak - -mv -f ${.CURDIR}/syscalls.c ${.CURDIR}/syscalls.c.bak - -mv -f ${.CURDIR}/../sys/syscall.h ${.CURDIR}/../sys/syscall.h.bak - -mv -f ${.CURDIR}/../sys/syscall.mk ${.CURDIR}/../sys/syscall.mk.bak - -mv -f ${.CURDIR}/../sys/sysproto.h ${.CURDIR}/../sys/sysproto.h.bak - -mv -f ${.CURDIR}/../sys/sysunion.h ${.CURDIR}/../sys/sysunion.h.bak - cd ${.CURDIR} && sh makesyscalls.sh syscalls.master - -# Kernel tags: -# Tags files are built in the top-level directory for each architecture, -# with a makefile listing the architecture-dependent files, etc. The list -# of common files is in ./Make.tags.inc. Links to the correct tags file -# are placed in each source directory. We need to have links to tags files -# from the generic directories that are relative to the machine type, even -# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at -# ${SYSDIR}/platform/${MACHINE_PLATFORM}/tags. - -SYSTAGS=/var/db/sys_tags -SYSDIR=${.CURDIR:H} -MFLAGS=SYS=${SYSDIR} - -# Directories in which to place tags links (other than machine-dependent) -DGEN= conf \ - dev \ - kern libkern \ - vfs vfs/deadfs vfs/fdesc vfs/fifofs \ - vfs/nullfs vfs/portal vfs/procfs \ - vfs/specfs vfs/union \ - vfs/ufs vfs/mfs vfs/nfs vfs/tmpfs \ - net netinet sys \ - vm - -#tags:: -# -cd ${.CURDIR} && for i in ${TAGARCH}; do \ -# (cd ../$$i && make ${MFLAGS} tags); done -# -#links:: -# rm -f ${.CURDIR}/${SYSTAGS} -# -${LN} -s ${SYSDIR}/platform/${MACHINE_PLATFORM}/tags ${.CURDIR}/${SYSTAGS} -# -cd ${.CURDIR} && for i in ${DGEN}; do \ -# (cd ../$$i && { rm -f tags; ${LN} -s ${SYSTAGS} tags; }) done -# -cd ${.CURDIR} && for i in ${TAGARCH}; do \ -# (cd ../$$i && make ${MFLAGS} SYSTAGS=${SYSTAGS} links); done - -- 2.41.0