From 9029b6442aea7df5b828b70738700ef93ca2c190 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 12 Dec 1999 16:45:58 +0000 Subject: [PATCH] Use the -c and -h args of vnode_if.sh to generate only the .h file that we use. The .c half is statically compiled into the kernel. It's kinda silly to generate a .h file on the fly that has inlines to call the .c stuff when the .c code is fixed. Also, zap the special treatment for VFS_KLD modules. This treatment applies to lots of things, not just VFS's. --- share/mk/bsd.kmod.mk | 16 +++++++--------- sys/conf/kmod.mk | 16 +++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk index c7f9a511ea35..e559e2edda62 100644 --- a/share/mk/bsd.kmod.mk +++ b/share/mk/bsd.kmod.mk @@ -109,10 +109,6 @@ CFLAGS+= -I${.OBJDIR} -I${.OBJDIR}/@ CFLAGS+= -I${DESTDIR}/usr/include .endif -.if defined(VFS_KLD) -SRCS+= vnode_if.h -.endif - .if ${OBJFORMAT} == elf CLEANFILES+= setdef0.c setdef1.c setdefs.h CLEANFILES+= setdef0.o setdef1.o @@ -285,14 +281,16 @@ ${_src}: @/kern/makedevops.pl @/${_srcsrc} .endfor # _ext .endfor # _srcsrc -.if ${SRCS:Mvnode_if.[ch]} != "" -CLEANFILES+= vnode_if.c vnode_if.h -vnode_if.c vnode_if.h: @ +.for _ext in c h +.if ${SRCS:Mvnode_if.${_ext}} != "" +CLEANFILES+= vnode_if.${_ext} +vnode_if.${_ext}: @ .if exists(@) -vnode_if.c vnode_if.h: @/kern/vnode_if.sh @/kern/vnode_if.src +vnode_if.${_ext}: @/kern/vnode_if.sh @/kern/vnode_if.src .endif - sh @/kern/vnode_if.sh @/kern/vnode_if.src + perl @/kern/vnode_if.sh -${_ext} @/kern/vnode_if.src .endif +.endfor regress: diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index c7f9a511ea35..e559e2edda62 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -109,10 +109,6 @@ CFLAGS+= -I${.OBJDIR} -I${.OBJDIR}/@ CFLAGS+= -I${DESTDIR}/usr/include .endif -.if defined(VFS_KLD) -SRCS+= vnode_if.h -.endif - .if ${OBJFORMAT} == elf CLEANFILES+= setdef0.c setdef1.c setdefs.h CLEANFILES+= setdef0.o setdef1.o @@ -285,14 +281,16 @@ ${_src}: @/kern/makedevops.pl @/${_srcsrc} .endfor # _ext .endfor # _srcsrc -.if ${SRCS:Mvnode_if.[ch]} != "" -CLEANFILES+= vnode_if.c vnode_if.h -vnode_if.c vnode_if.h: @ +.for _ext in c h +.if ${SRCS:Mvnode_if.${_ext}} != "" +CLEANFILES+= vnode_if.${_ext} +vnode_if.${_ext}: @ .if exists(@) -vnode_if.c vnode_if.h: @/kern/vnode_if.sh @/kern/vnode_if.src +vnode_if.${_ext}: @/kern/vnode_if.sh @/kern/vnode_if.src .endif - sh @/kern/vnode_if.sh @/kern/vnode_if.src + perl @/kern/vnode_if.sh -${_ext} @/kern/vnode_if.src .endif +.endfor regress: