Source-Changes-HG archive

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

[src/trunk]: src/sys - Allow multiple .BEGIN targets



details:   https://anonhg.NetBSD.org/src/rev/b4e928f6a547
branches:  trunk
changeset: 828374:b4e928f6a547
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Dec 10 14:29:47 2017 +0000

description:
- Allow multiple .BEGIN targets
- Make their protection consistent

diffstat:

 sys/arch/aarch64/conf/Makefile.aarch64   |   8 ++++----
 sys/arch/i386/conf/Makefile.i386         |   6 +++---
 sys/arch/sparc64/conf/Makefile.sparc64   |   8 ++++----
 sys/arch/usermode/conf/Makefile.usermode |  10 +++++-----
 sys/arch/xen/conf/Makefile.xen           |  17 ++++++++---------
 sys/conf/dts.mk                          |   4 ++--
 6 files changed, 26 insertions(+), 27 deletions(-)

diffs (140 lines):

diff -r 5d595f7ec8f3 -r b4e928f6a547 sys/arch/aarch64/conf/Makefile.aarch64
--- a/sys/arch/aarch64/conf/Makefile.aarch64    Sun Dec 10 14:09:42 2017 +0000
+++ b/sys/arch/aarch64/conf/Makefile.aarch64    Sun Dec 10 14:29:47 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.aarch64,v 1.7 2016/05/05 21:14:14 rjs Exp $
+#      $NetBSD: Makefile.aarch64,v 1.8 2017/12/10 14:29:47 christos Exp $
 
 # Makefile for NetBSD
 #
@@ -92,9 +92,9 @@
 # would be defined
 .MAIN: all
 
-.if make(depend) || make(all) || make(dependall)
-.BEGIN:
-       @rm -f arm && \
+.if !make(obj) && !make(clean) && !make(cleandir)
+.BEGIN::
+       -@rm -f arm && \
                ln -s $S/arch/arm/include arm
 .endif
 
diff -r 5d595f7ec8f3 -r b4e928f6a547 sys/arch/i386/conf/Makefile.i386
--- a/sys/arch/i386/conf/Makefile.i386  Sun Dec 10 14:09:42 2017 +0000
+++ b/sys/arch/i386/conf/Makefile.i386  Sun Dec 10 14:29:47 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.i386,v 1.186 2017/08/09 19:11:13 maxv Exp $
+#      $NetBSD: Makefile.i386,v 1.187 2017/12/10 14:29:47 christos Exp $
 
 # Makefile for NetBSD
 #
@@ -94,8 +94,8 @@
 ##
 
 .if !make(obj) && !make(clean) && !make(cleandir)
-.BEGIN:
-       @rm -f i386 && \
+.BEGIN::
+       -@rm -f i386 && \
                ln -s $S/arch/i386/include i386
 .endif
 
diff -r 5d595f7ec8f3 -r b4e928f6a547 sys/arch/sparc64/conf/Makefile.sparc64
--- a/sys/arch/sparc64/conf/Makefile.sparc64    Sun Dec 10 14:09:42 2017 +0000
+++ b/sys/arch/sparc64/conf/Makefile.sparc64    Sun Dec 10 14:29:47 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.sparc64,v 1.83 2017/12/04 09:44:33 martin Exp $
+#      $NetBSD: Makefile.sparc64,v 1.84 2017/12/10 14:29:47 christos Exp $
 
 #=========================================================================
 #
@@ -138,9 +138,9 @@
 # would be defined
 .MAIN: all
 
-.if make(depend) || make(all) || make(dependall)
-.BEGIN:
-       @rm -f sparc && \
+.if !make(obj) && !make(clean) && !make(cleandir)
+.BEGIN::
+       -@rm -f sparc && \
                ln -s $S/arch/sparc/include sparc
 .endif
 
diff -r 5d595f7ec8f3 -r b4e928f6a547 sys/arch/usermode/conf/Makefile.usermode
--- a/sys/arch/usermode/conf/Makefile.usermode  Sun Dec 10 14:09:42 2017 +0000
+++ b/sys/arch/usermode/conf/Makefile.usermode  Sun Dec 10 14:29:47 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.39 2015/08/27 03:20:13 uebayasi Exp $
+# $NetBSD: Makefile.usermode,v 1.40 2017/12/10 14:29:47 christos Exp $
 
 USETOOLS?=                     no
 NEED_OWN_INSTALL_TARGET?=      no
@@ -86,12 +86,12 @@
 ##
 
 .if !make(obj) && !make(clean) && !make(cleandir)
-.BEGIN:
-       @rm -f i386 && \
+.BEGIN::
+       -@rm -f i386 && \
                ln -s $S/arch/i386/include i386
-       @rm -f amd64 && \
+       -@rm -f amd64 && \
                ln -s $S/arch/amd64/include amd64
-       @rm -f arm && \
+       -@rm -f arm && \
                ln -s $S/arch/arm/include arm
 .endif
 
diff -r 5d595f7ec8f3 -r b4e928f6a547 sys/arch/xen/conf/Makefile.xen
--- a/sys/arch/xen/conf/Makefile.xen    Sun Dec 10 14:09:42 2017 +0000
+++ b/sys/arch/xen/conf/Makefile.xen    Sun Dec 10 14:29:47 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.xen,v 1.42 2017/08/09 19:11:13 maxv Exp $
+#      $NetBSD: Makefile.xen,v 1.43 2017/12/10 14:29:47 christos Exp $
 #      NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp 
 
 # Makefile for NetBSD
@@ -86,16 +86,15 @@
        ${NORMAL_S}
 .ifndef noBEGIN
 .if !make(obj) && !make(clean) && !make(cleandir)
-.BEGIN:
+.BEGIN::
 .for A in ${XEN_MACHINE_ARCHS}
-       rm -f ${A}
-       ln -s $S/arch/${A}/include ${A}
+       -@rm -f ${A} && \
+           ln -s $S/arch/${A}/include ${A}
 .endfor
-       -rm -rf xen-ma
-       mkdir xen-ma
-       ln -s ../${XEN_BUILD} xen-ma/machine
-       rm -f machine
-       ln -s ${ARCH_INC} machine
+       -@rm -rf xen-ma && \
+           mkdir xen-ma && ln -s ../${XEN_BUILD} xen-ma/machine &&
+       -@rm -f machine && \
+           ln -s ${ARCH_INC} machine
 .endif
 .endif
 
diff -r 5d595f7ec8f3 -r b4e928f6a547 sys/conf/dts.mk
--- a/sys/conf/dts.mk   Sun Dec 10 14:09:42 2017 +0000
+++ b/sys/conf/dts.mk   Sun Dec 10 14:29:47 2017 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: dts.mk,v 1.7 2017/12/06 02:08:03 christos Exp $
+# $NetBSD: dts.mk,v 1.8 2017/12/10 14:29:47 christos Exp $
 
 DTSARCH?=${MACHINE_CPU}
 DTSGNUARCH?=${DTSARCH}
 DTSPADDING?=1024
 
 .if !make(obj) && !make(clean) && !make(cleandir)
-.BEGIN:
+.BEGIN::
        -@mkdir -p dts
 .for _arch in ${DTSGNUARCH}
        -@ln -sf ${S:S@^../@../../@}/external/gpl2/dts/dist/arch/${_arch}/boot/dts dts/${_arch}



Home | Main Index | Thread Index | Old Index