fix the binutils build with read-only source trees don't play with m68k-parse.c in tools/binutils/Makefile but disable the rules that rebuild it so we always use the upstream version, using the standard "NetBSD_DISABLED" method. this was necessary to build on linux in 2014 (which may or may not still ne necessary), but it also avoids triggering rebuild rules based upon the timestamps on .y vs .c. tested with amiga, amd64, and i386 "build.sh tools" builds. Index: tools/binutils/Makefile =================================================================== RCS file: /cvsroot/src/tools/binutils/Makefile,v retrieving revision 1.35 diff -p -u -r1.35 Makefile --- tools/binutils/Makefile 25 Dec 2022 17:25:22 -0000 1.35 +++ tools/binutils/Makefile 30 Dec 2022 21:12:49 -0000 @@ -16,21 +16,6 @@ CONFIGURE_ARGS= --target=${MACHINE_GNU_P --disable-werror --enable-initfini-array=yes \ ${BRANDING} -.if exists(${GNUHOSTDIST}/gas/config/m68k-parse.c) -M68K_PARSE=${GNUHOSTDIST}/gas/config/m68k-parse.c -.elif exists(${GNUHOSTDIST}/gas/m68k-parse.c) -M68K_PARSE=${GNUHOSTDIST}/gas/m68k-parse.c -.else -.error "Can't find m68k-parse.c -.endif - -build/gas/m68k-parse.c: ${M68K_PARSE} - @mkdir build 2>/dev/null || true - @mkdir build/gas 2>/dev/null || true - cat ${M68K_PARSE} > ${.TARGET} - -.configure_done: build/gas/m68k-parse.c - MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} ALL_TARGET= all-binutils all-gas all-ld Index: external/gpl3/binutils.old/dist/gas/Makefile.am =================================================================== RCS file: /cvsroot/src/external/gpl3/binutils.old/dist/gas/Makefile.am,v retrieving revision 1.7 diff -p -u -r1.7 Makefile.am --- external/gpl3/binutils.old/dist/gas/Makefile.am 23 Dec 2022 17:09:21 -0000 1.7 +++ external/gpl3/binutils.old/dist/gas/Makefile.am 30 Dec 2022 21:12:49 -0000 @@ -452,6 +452,8 @@ EXTRA_as_new_SOURCES += config/m68k-pars # the other hand it's good that people who use the prebuilt # m68k-parse.c don't get a spurious absolute path. m68k-parse.c: $(srcdir)/config/m68k-parse.y + @echo "NOT REBUILDING $@" +NetBSD_DISABLED_m68k-parse.c: f=$(srcdir)/config/m68k-parse.y; \ if [ $$f = "./config/m68k-parse.y" ]; then \ ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \ Index: external/gpl3/binutils.old/dist/gas/Makefile.in =================================================================== RCS file: /cvsroot/src/external/gpl3/binutils.old/dist/gas/Makefile.in,v retrieving revision 1.7 diff -p -u -r1.7 Makefile.in --- external/gpl3/binutils.old/dist/gas/Makefile.in 23 Dec 2022 17:09:21 -0000 1.7 +++ external/gpl3/binutils.old/dist/gas/Makefile.in 30 Dec 2022 21:12:49 -0000 @@ -1583,6 +1583,8 @@ development.exp: $(BFDDIR)/development.s # the other hand it's good that people who use the prebuilt # m68k-parse.c don't get a spurious absolute path. m68k-parse.c: $(srcdir)/config/m68k-parse.y + @echo "NOT REBUILDING $@" +NetBSD_DISABLED_m68k-parse.c: f=$(srcdir)/config/m68k-parse.y; \ if [ $$f = "./config/m68k-parse.y" ]; then \ ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \ Index: external/gpl3/binutils/dist/gas/Makefile.am =================================================================== RCS file: /cvsroot/src/external/gpl3/binutils/dist/gas/Makefile.am,v retrieving revision 1.9 diff -p -u -r1.9 Makefile.am --- external/gpl3/binutils/dist/gas/Makefile.am 24 Dec 2022 20:17:05 -0000 1.9 +++ external/gpl3/binutils/dist/gas/Makefile.am 30 Dec 2022 21:12:49 -0000 @@ -445,6 +445,8 @@ development.exp: $(BFDDIR)/development.s EXTRA_as_new_SOURCES += config/m68k-parse.y config/m68k-parse.c: $(srcdir)/config/m68k-parse.y + @echo "NOT REBUILDING $@" +NetBSD_DISABLED_config_m68k-parse.c: $(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE) config/m68k-parse.h: config/m68k-parse.c @true Index: external/gpl3/binutils/dist/gas/Makefile.in =================================================================== RCS file: /cvsroot/src/external/gpl3/binutils/dist/gas/Makefile.in,v retrieving revision 1.10 diff -p -u -r1.10 Makefile.in --- external/gpl3/binutils/dist/gas/Makefile.in 30 Dec 2022 15:41:35 -0000 1.10 +++ external/gpl3/binutils/dist/gas/Makefile.in 30 Dec 2022 21:12:49 -0000 @@ -2048,6 +2048,8 @@ development.exp: $(BFDDIR)/development.s $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ config/m68k-parse.c: $(srcdir)/config/m68k-parse.y + @echo "NOT REBUILDING $@" +NetBSD_DISABLED_config_m68k-parse.c: $(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE) config/m68k-parse.h: config/m68k-parse.c @true