Remove empty base dirs when uninstalling
[cc0/argeo-build.git] / repackage.mk
index c1ca8ac7f505bed51e1fcd122f714ded9127a609..e0ed18a57d654ec5bd9a6a1b51515d3b8d29991c 100644 (file)
@@ -40,7 +40,9 @@ uninstall:
        )
        @echo Uninstalled arch binaries \'$(ARCH_CATEGORIES)\' to $(A2_NATIVE_INSTALL_TARGET)
        @find $(A2_INSTALL_TARGET) -empty -type d -delete
-
+       @rmdir --ignore-fail-on-non-empty $(A2_INSTALL_TARGET)
+       @find $(A2_NATIVE_INSTALL_TARGET) -empty -type d -delete
+       @rmdir --ignore-fail-on-non-empty $(A2_NATIVE_INSTALL_TARGET)
 .SECONDEXPANSION:
 # We use .SECONDEXPANSION and CATEGORIES_TO_REPACKAGE instead of directly CATEGORIES
 # so that we don't repackage a category if it hasn't changed