NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/39217: make cleandir leaves files in src/lib/libc

>Number:         39217
>Category:       lib
>Synopsis:       make cleandir leaves files in src/lib/libc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 27 15:20:00 +0000 2008
>Originator:     Bernd Ernesti
>Release:        NetBSD 4.99.70
System: NetBSD 4.99.70
Architecture: i386
Machine: i386

        there are some files left after a make cleandir in the obj dir for

        This seems to be related to the '.if exists' usage in

        I can understand why the last two files are not removed, because
        there is no CLEANFILES entry for them:
ASM_MD= _lwp_getprivate.S mremap.S

.for f in ${ASM_MD}
. if !exists(${f})
   ASM+=        ${f}
. else
   SRCS+=       ${f}
. endif

        Adding a CLEANFILES+=${f} after ASM wouldn't work because at the
        cleanup time these two files are existing and a general CLEANFILES
        could fail on m68k who has these asm stubs.

        There is a similar problem with the other asm files which won't get
        removed, the GLUE files:
GLUE+=  adjtime.c clock_settime.c ftruncate.c \
        lseek.c mmap.c ntp_adjtime.c pread.c preadv.c pwrite.c \
        pwritev.c settimeofday.c \
# 'glue' files might .c or .S depending on the architecture
.for glue in ${GLUE}
. if exists(${glue:.c=.S})
# Build the ASM glue file
. else
.  if exists(__${glue:.c=.S})
SRCS+=__${glue:.c=.S} ${glue}
.  else
# Build the C glue file
SRCS+= ${glue}
# and an asm entry for __<syscall>
ASM_GLUE+= __${glue:.c=.S}
.  endif
. endif

        Will this work at all with libc/arch/m68k/sys/__mmap.S because
        mmap.c exists and will be found first.
        Or am I missing something when I look at this makefile rules?

        cd src/lib/libc
        make cleandir

Home | Main Index | Thread Index | Old Index