Source-Changes-HG archive

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

[src/trunk]: src/tools/make tools/make: build with -Wno-deprecated-declarations



details:   https://anonhg.NetBSD.org/src/rev/b532ed22da34
branches:  trunk
changeset: 378105:b532ed22da34
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jul 20 15:16:44 2023 +0000

description:
tools/make: build with -Wno-deprecated-declarations

Use NB_CHECK_CC_FLAG() from ../tools/compat to determine
if the compiler supports -Wno-deprecated-declarations.
Avoids sooking about vfork() on macOS.

diffstat:

 tools/make/Makefile.regen  |   4 ++--
 tools/make/buildmake.sh.in |   4 ++--
 tools/make/configure.ac    |  12 ++++++++++--
 3 files changed, 14 insertions(+), 6 deletions(-)

diffs (71 lines):

diff -r f6fbc1df4d0f -r b532ed22da34 tools/make/Makefile.regen
--- a/tools/make/Makefile.regen Thu Jul 20 15:15:23 2023 +0000
+++ b/tools/make/Makefile.regen Thu Jul 20 15:16:44 2023 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: Makefile.regen,v 1.1 2007/10/14 20:25:35 apb Exp $
+#      $NetBSD: Makefile.regen,v 1.2 2023/07/20 15:16:44 lukem Exp $
 
 .include "bsd.own.mk"
 
 # Run "${TOOLDIR}/bin/nbmake-${MACHINE} -f Makefile.regen" by hand after
 # editing configure.ac.  See more detailed instructions in configure.ac.
 regen:
-       cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
+       cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoreconf -I../compat/buildaux
diff -r f6fbc1df4d0f -r b532ed22da34 tools/make/buildmake.sh.in
--- a/tools/make/buildmake.sh.in        Thu Jul 20 15:15:23 2023 +0000
+++ b/tools/make/buildmake.sh.in        Thu Jul 20 15:16:44 2023 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-#      $NetBSD: buildmake.sh.in,v 1.17 2023/07/20 15:13:27 lukem Exp $
+#      $NetBSD: buildmake.sh.in,v 1.18 2023/07/20 15:16:44 lukem Exp $
 #
 # buildmake.sh.in - Autoconf-processed shell script for building make(1).
 #
@@ -24,7 +24,7 @@ docmd()
 }
 
 for f in $MKSRCDIR/*.c; do
-       docmd "compile " "$f" @CC@ @CPPFLAGS@ @DEFS@ @CFLAGS@ \
+       docmd "compile " "$f" @CC@ @CPPFLAGS@ @DEFS@ @CFLAGS@ @NOWARNFLAGS@ \
                -D_PATH_DEFSYSPATH=\"${NETBSDSRCDIR}/share/mk\" -c "$f"
 done
 
diff -r f6fbc1df4d0f -r b532ed22da34 tools/make/configure.ac
--- a/tools/make/configure.ac   Thu Jul 20 15:15:23 2023 +0000
+++ b/tools/make/configure.ac   Thu Jul 20 15:16:44 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: configure.ac,v 1.10 2023/07/20 15:12:36 lukem Exp $
+#      $NetBSD: configure.ac,v 1.11 2023/07/20 15:16:44 lukem Exp $
 #
 # Autoconf definition file for make.
 #
@@ -25,6 +25,9 @@
 AC_INIT([make], [noversion], [bin-bug-people%NetBSD.org@localhost])
 AC_CONFIG_FILES([buildmake.sh])
 
+m4_pattern_forbid([^AX_])
+m4_pattern_forbid([^NB_])
+
 AC_PATH_PROG([BSHELL], [sh])
 if test x"$BSHELL" = x; then
     AC_MSG_ERROR([sh must be somewhere on \$PATH, or BSHELL must be defined])
@@ -47,12 +50,17 @@ AC_SEARCH_LIBS([regfree], [rx posix])
 
 AC_CHECK_FUNCS([setenv strdup strerror strftime vsnprintf])
 
+dnl NOWARNFLAGS: compiler flags to suppress unnecessary warnings:
+dnl   -Wno-deprecated-declarations
+dnl
+NB_CHECK_CC_FLAG([-Wno-deprecated-declarations], [NOWARNFLAGS])
+
 AC_OUTPUT()
 
 dnl Display results
 dnl
 AC_MSG_NOTICE([========== configure results for make ===========])
-m4_foreach_w([NB_VAR], [CC CFLAGS CPPFLAGS DEFS LDFLAGS LIBS], [dnl
+m4_foreach_w([NB_VAR], [CC CFLAGS CPPFLAGS DEFS LDFLAGS LIBS NOWARNFLAGS], [dnl
 AC_MSG_NOTICE(m4_format([%-32s],NB_VAR)[$NB_VAR])
 ])
 AC_MSG_NOTICE([================================================])



Home | Main Index | Thread Index | Old Index