[openwrt/openwrt] tools/automake: do not delete Makefile in clean targets
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 26 05:38:31 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9ea963e471d642c94159ab484f84b88ee3844201
commit 9ea963e471d642c94159ab484f84b88ee3844201
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Fri Oct 4 01:25:13 2024 -0400
tools/automake: do not delete Makefile in clean targets
For the building of some packages, it is sometimes helpful
to completely clean the packaged release copy of the source,
however this usually both requires and deletes the Makefile,
causing the need to run the configure stage twice.
Not deleting the Makefile allows compilation to continue directly
after cleaning pre-generated files in the package distribution.
Signed-off-by: Michael Pratt <mcpratt at pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
tools/automake/patches/999-clean-am.patch | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tools/automake/patches/999-clean-am.patch b/tools/automake/patches/999-clean-am.patch
new file mode 100644
index 0000000000..87a0d6f3f6
--- /dev/null
+++ b/tools/automake/patches/999-clean-am.patch
@@ -0,0 +1,20 @@
+--- a/lib/am/clean.am
++++ b/lib/am/clean.am
+@@ -39,7 +39,7 @@ distclean-generic:
+ ## If you change distclean here, you probably also want to change
+ ## maintainer-clean below.
+ distclean:
+- -rm -f %MAKEFILE%
++ -touch %MAKEFILE%
+
+ maintainer-clean-am: maintainer-clean-generic distclean-am
+ maintainer-clean-generic:
+@@ -51,7 +51,7 @@ maintainer-clean-generic:
+
+ ## See comment for distclean.
+ maintainer-clean:
+- -rm -f %MAKEFILE%
++ -touch %MAKEFILE%
+
+ .PHONY: clean mostlyclean distclean maintainer-clean \
+ clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
More information about the lede-commits
mailing list