From 6a798cfa81a9ac5c0238e7a40303b62e31395172 Mon Sep 17 00:00:00 2001 From: Makoto Matsushita Date: Thu, 15 Nov 2001 07:04:23 +0000 Subject: [PATCH] Run "make cleandir" if NO_MODULES are set, or there is no sys/modules directory. Previous commit breaks buildkernel if NO_MODULES was set. Sorry... Noticed by: mike --- Makefile.inc1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index c516f2495fa8..28bcaa2eae14 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -431,8 +431,13 @@ buildkernel: ${KERNCONFDIR}/${_kernel} .endif .if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) +.if defined(NO_MODULES) || !exists(${KRNLSRCDIR}/modules) + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} clean +.else` cd ${KRNLOBJDIR}/${_kernel}; \ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} clean cleandir +.endif .endif cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \