From 5ae3ba932439eba36f6e224367f93c97653ca3c0 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 30 Jan 2024 23:20:13 -0500 Subject: [PATCH] Fix incremental rebuild after deleted scan.c. It is important that the .stamp.c rule is checked first, before the .l.c or .y.c rules (which do nothing) in order to trigger a rebuild if scan.c or parse.c are inadvertently deleted. Make considers suffix rules in the same order as the .SUFFIXES list. Presently, this list is generated by Automake so we are at the mercy of whatever order they happen to be in, which is perl sort order. As far as I can see it has always been this way, so the rebuild for scan.c has probably never worked (but parse.c is OK, since .y sorts later). Automake puts user-specified SUFFIXES first, so adding .stamp there should suffice to resolve the problem. --- Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.am b/Makefile.am index 452e811..4776ec7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,6 +11,9 @@ MOSTLYCLEANFILES = EXTRA_LTLIBRARIES = EXTRA_PROGRAMS = +# Ensure .stamp rules are handled first +SUFFIXES = .stamp + AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_builddir)/lib -I$(top_srcdir)/lib \ -I$(DX_BASEDIR)/src -I$(top_builddir)/t \ -- 2.43.2