commit a25700fc78d9d14be6c2d5ffc68fe1f02a186410
parent e67dd1916400e4893ae243efcffca55940afa27d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Sun, 21 May 2023 15:50:28 +0200
Update the "uninstall" target of git Makefiles
Until now, "uninstall" of the project was only invoked if its sources
were retrieved locally. We now make sure that "uninstall" is always
executed, and therefore make the "fetch" target a prerequisite of the
"uninstall" target. This change allows the files installed by a git
project to be deleted when the "uninstall" target is invoked, even if
the local copy of the project sources has been deleted in the meantime.
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/git.mk.in b/git.mk.in
@@ -24,10 +24,8 @@ clean_@NAME@:
cd -- @NAME@_dir && make clean;\
fi
-uninstall_@NAME@: prefix
- @if [ -d @NAME@_dir ]; then\
- cd -- @NAME@_dir && make PREFIX="$$(cat ../.prefix)" uninstall;\
- fi
+uninstall_@NAME@: fetch_@NAME@ prefix
+ cd -- @NAME@_dir && make PREFIX="$$(cat ../.prefix)" uninstall
distclean_@NAME@:
@rm -rf @NAME@_dir