Current-Users archive

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

Cleaning up some ASM files in src/lib/libc/sys/ fails


there are some files left after a make cleandir in the obj dir for
src/lib/libc (i386 if it matters):


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 
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 I miss something when I look at this makefile rules.


Home | Main Index | Thread Index | Old Index