Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): move .include lines as far down as pos...



details:   https://anonhg.NetBSD.org/src/rev/8ba46c808773
branches:  trunk
changeset: 957657:8ba46c808773
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Dec 06 13:29:34 2020 +0000

description:
make(1): move .include lines as far down as possible

diffstat:

 usr.bin/make/Makefile |  27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diffs (66 lines):

diff -r 4b1db79d14da -r 8ba46c808773 usr.bin/make/Makefile
--- a/usr.bin/make/Makefile     Sun Dec 06 12:54:32 2020 +0000
+++ b/usr.bin/make/Makefile     Sun Dec 06 13:29:34 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.108 2020/12/06 12:54:32 rillig Exp $
+#      $NetBSD: Makefile,v 1.109 2020/12/06 13:29:34 rillig Exp $
 #      @(#)Makefile    5.2 (Berkeley) 12/28/90
 
 PROG=  make
@@ -134,26 +134,23 @@
 COPTS.parse.c+=        -Wno-format-nonliteral
 COPTS.var.c+=  -Wno-format-nonliteral
 
-.include <bsd.prog.mk>
-.include <bsd.subdir.mk>
-
 CPPFLAGS+=     -DMAKE_NATIVE
 
 .if ${USE_GCC10} == "yes"
 GCC10BASE?=    /usr/pkg/gcc10
-CC=            ${GCC10BASE}/bin/gcc
+LATE_CC=       ${GCC10BASE}/bin/gcc
 GCOV=          ${GCC10BASE}/bin/gcov
 .endif
 
 .if ${USE_GCC9} == "yes"
 GCC9BASE?=     /usr/pkg/gcc9
-CC=            ${GCC9BASE}/bin/gcc
+LATE_CC=       ${GCC9BASE}/bin/gcc
 GCOV=          ${GCC9BASE}/bin/gcov
 .endif
 
 .if ${USE_GCC8} == "yes"
 GCC8BASE?=     /usr/pkg/gcc8
-CC=            ${GCC8BASE}/bin/gcc
+LATE_CC=       ${GCC8BASE}/bin/gcc
 GCOV=          ${GCC8BASE}/bin/gcov
 .endif
 
@@ -166,11 +163,6 @@
 
 COPTS+=                -Wdeclaration-after-statement
 
-# For -DCLEANUP and similar feature toggles.
-CPPFLAGS+=     ${USER_CPPFLAGS}
-# For overriding -std=gnu99 or similar options.
-CFLAGS+=       ${USER_CFLAGS}
-
 # A simple unit-test driver to help catch regressions
 TEST_MAKE ?= ${.OBJDIR}/${PROG:T}
 test: .MAKE
@@ -197,3 +189,14 @@
        ${COMPILE.c:S,^-c$,-E,} ${COPTS.${.IMPSRC}} ${.IMPSRC} -o ${.TARGET}
 .c.casm:
        ${COMPILE.c:S,^-c$,-S,} ${COPTS.${.IMPSRC}} ${.IMPSRC} -o ${.TARGET}
+
+.include <bsd.prog.mk>
+.include <bsd.subdir.mk>
+
+# For -DCLEANUP and similar feature toggles.
+CPPFLAGS+=     ${USER_CPPFLAGS}
+# For overriding -std=gnu99 or similar options.
+CFLAGS+=       ${USER_CFLAGS}
+.if defined(LATE_CC)
+CC=            ${LATE_CC}
+.endif



Home | Main Index | Thread Index | Old Index