From 07eea3aa496184bb763b7306e9de6a40a94605c9 Mon Sep 17 00:00:00 2001 From: Dmitry Goncharov Date: Sun, 24 Jul 2022 18:16:50 -0400 Subject: [SV 62706] Only second-expand targets that might be built Second-expand only the prerequisites of the targets being built. Defer second-expanding the prerequisites of targets until we need to decide if they should be built. * NEWS: Mention the change in behavior. * doc/make.texi (Secondary Expansion): Document the new behavior. * src/filedef.h (struct file): Add flag snapped. (expand_deps): Declare a function to second expand the prerequisites of a target. * src/file.c (rehash_file): Merge flag snapped. (expand_deps): Remove qualifier static. Check flag snapped. (snap_deps): Remove the loop which performed second expansion for all targets. * src/remake.c (update_file_1): Second expand the prerequisites of the considered target. * tests/scripts/features/se_explicit: Add tests. * tests/scripts/features/se_implicit: Ditto. * tests/scripts/features/se_statpat: Ditto. --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 752de7d0..3a437a27 100644 --- a/NEWS +++ b/NEWS @@ -83,6 +83,11 @@ https://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=109&se mentioned in other targets as "ought to exist". Implementation provided by Dmitry Goncharov +* GNU make was performing secondary expansion of all targets, even targets + which didn't need to be considered during the build. In this release + only targets which are considered will be secondarily expanded. + Implementation provided by Dmitry Goncharov + * If the MAKEFLAGS variable is modified in a makefile, it will be re-parsed immediately rather than after all makefiles have been read. Note that although all options are parsed immediately, some special effects won't -- cgit v1.2.1