Subject: Too much ifs in Makefile.mips
To: port-mips NetBSD <port-mips@netbsd.org>
From: TAKEMURA Shin <takemura@netbsd.org>
List: port-mips
Date: 07/08/2001 23:45:59
I found arch/mips/conf/Makefile.mips containing too much ifs.
This patch deletes some verbose lines from the file. Because
I tested this patch on only hpcmips, I'm not sure this patch is
OK or not. Could you please review?
Takemura
diff -c -r1.14 Makefile.mips
*** Makefile.mips 2001/05/29 02:20:24 1.14
--- Makefile.mips 2001/07/08 13:45:50
***************
*** 201,236 ****
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' >
makelinks
sh makelinks && rm -f dontlink
- SRCS= ${MIPS}/mips/locore.S \
- ${THISMIPS}/${TARGET_MACHINE}/locore_machdep.S \
- param.c ioconf.c ${CFILES} ${SFILES}
.if !empty(IDENT:M-DMIPS1)
! SRCS+= ${MIPS}/mips/locore_mips1.S
.endif
.if !empty(IDENT:M-DMIPS3)
! SRCS+= ${MIPS}/mips/locore_mips3.S
.endif
.if empty(IDENT:M-DNOFPU)
! SRCS+= ${MIPS}/mips/fp.S
.endif
depend: .depend
.depend: ${SRCS} assym.h param.c
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${MIPS}/mips/locore.S
- .if !empty(IDENT:M-DMIPS1)
- ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${MIPS}/mips/locore_mips1.S
- .endif
- .if !empty(IDENT:M-DMIPS3)
- ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${MIPS}/mips/locore_mips3.S
- .endif
- .if empty(IDENT:M-DNOFPU)
- ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${MIPS}/mips/fp.S
- .endif
- ${MKDEP} -a ${AFLAGS} ${CPPFLAGS}
${THISMIPS}/${TARGET_MACHINE}/locore_m
achdep.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
- .if (${SFILES} != "")
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
- .endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS} < ${MIPS}/mips/genassym.cf
@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
--- 201,223 ----
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' >
makelinks
sh makelinks && rm -f dontlink
.if !empty(IDENT:M-DMIPS1)
! SFILES+=${MIPS}/mips/locore_mips1.S
.endif
.if !empty(IDENT:M-DMIPS3)
! SFILES+=${MIPS}/mips/locore_mips3.S
.endif
.if empty(IDENT:M-DNOFPU)
! SFILES+=${MIPS}/mips/fp.S
.endif
+ SFILES+=${MIPS}/mips/locore.S \
+ ${THISMIPS}/${TARGET_MACHINE}/locore_machdep.S
+ SRCS= param.c ioconf.c ${CFILES} ${SFILES}
depend: .depend
.depend: ${SRCS} assym.h param.c
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS} < ${MIPS}/mips/genassym.cf
@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
-------- EOF