From a103e367c4fd6bd073c324253833289f6a8ecc3a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Mar 2024 10:04:34 +0000 Subject: [PATCH] build: Use DISTCLEANFILES for a generated but few rarely updated files We rarely change the generated test scripts or the sysprep mli files, so we only need to delete them in 'make distclean', not 'make clean'. (cherry picked from commit 35e15c68ac9c4e5361e4cf8a49a60a4bc2708d89) --- builder/Makefile.am | 4 +++- customize/Makefile.am | 6 ++++-- sysprep/Makefile.am | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/builder/Makefile.am b/builder/Makefile.am index 42606aaf3..b474f0c9d 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -412,8 +412,10 @@ test-console-%.sh: chmod 0755 $@-t mv $@-t $@ +DISTCLEANFILES += \ + $(console_test_scripts) + CLEANFILES += \ - $(console_test_scripts) \ console-*.img \ console-*.out diff --git a/customize/Makefile.am b/customize/Makefile.am index 3a974590f..461629062 100644 --- a/customize/Makefile.am +++ b/customize/Makefile.am @@ -285,9 +285,11 @@ test-settings-%.sh: chmod 0755 $@-t mv $@-t $@ +DISTCLEANFILES += \ + $(password_test_scripts) \ + $(settings_test_scripts) + CLEANFILES += \ - $(password_test_scripts) \ - $(settings_test_scripts) \ password-*.img \ password-*.log \ settings-*.img diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am index 4b29d4e10..4b1c23ce0 100644 --- a/sysprep/Makefile.am +++ b/sysprep/Makefile.am @@ -179,7 +179,7 @@ virt_sysprep_LINK = \ $(OBJECTS) -o $@ # The sysprep_operation_*.mli files are all empty and autogenerated. -CLEANFILES += \ +DISTCLEANFILES += \ $(patsubst %,sysprep_operation_%.mli,$(operations)) sysprep_operation_%.mli: