Source-Changes-HG archive

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

[src/trunk]: src/lib/csu/common Reorder to avoid !exists



details:   https://anonhg.NetBSD.org/src/rev/2cc17197fab5
branches:  trunk
changeset: 787588:2cc17197fab5
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Jun 25 07:18:02 2013 +0000

description:
Reorder to avoid !exists
Add a crtbegin.h dependency

diffstat:

 lib/csu/common/Makefile.inc |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (49 lines):

diff -r 34c997703a1f -r 2cc17197fab5 lib/csu/common/Makefile.inc
--- a/lib/csu/common/Makefile.inc       Tue Jun 25 07:08:10 2013 +0000
+++ b/lib/csu/common/Makefile.inc       Tue Jun 25 07:18:02 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.9 2013/06/22 02:37:09 matt Exp $
+#      $NetBSD: Makefile.inc,v 1.10 2013/06/25 07:18:02 matt Exp $
 
 .include <bsd.own.mk>
 
@@ -12,14 +12,14 @@
 
 realall: ${OBJS}
 
-.if !exists(${ARCHDIR}/crtbegin.S)
-crtbegin.o: crtbegin.c
-       ${_MKTARGET_COMPILE}
-       ${COMPILE.c} ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
-.else
+.if exists(${ARCHDIR}/crtbegin.S)
 crtbegin.o: crtbegin.S
        ${_MKTARGET_COMPILE}
        ${COMPILE.S} ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
+.else
+crtbegin.o: crtbegin.c crtbegin.h
+       ${_MKTARGET_COMPILE}
+       ${COMPILE.c} ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
 .endif
        ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
        rm -f ${.TARGET}.o
@@ -27,14 +27,14 @@
        ${OBJCOPY} -R .ident ${.TARGET}
 .endif
 
-.if !exists(${ARCHDIR}/crtbegin.S)
-crtbeginS.o: crtbegin.c
-       ${_MKTARGET_COMPILE}
-       ${COMPILE.c} -DPIC -DSHARED ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
-.else
+.if exists(${ARCHDIR}/crtbegin.S)
 crtbeginS.o: crtbegin.S
        ${_MKTARGET_COMPILE}
        ${COMPILE.S} -DPIC -DSHARED ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
+.else
+crtbeginS.o: crtbegin.c crtbegin.h
+       ${_MKTARGET_COMPILE}
+       ${COMPILE.c} -DPIC -DSHARED ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
 .endif
        ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
        rm -f ${.TARGET}.o



Home | Main Index | Thread Index | Old Index