Commit 7c42e7a8 authored by Andrés G. Aragoneses's avatar Andrés G. Aragoneses

build: simplify uninstall-hook target in root folder

The way to check if $(pkglibdir) exists can be simplified to just
check for its existence now. I guess `find` was used in combination
with `wc` before because it could happen that there were leftover
subfolders not properly uninstalled, which would make `rmdir` error
out.

However, this situation has been fixed in [1], so we can now
assume that $(pkglibdir) doesn't contain any elements when this
hook happens (if it contains any elements, it will be a bug in the
build infrastructure, so with this `rmdir` would fail fast, which
is a good thing).

[1] https://git.gnome.org/browse/banshee/commit/?id=50257fafdc0077754cb2cb155db048261fdfbb73
parent 50257faf
......@@ -15,9 +15,7 @@ clean-local:
uninstall-hook:
if test -d $(pkglibdir); then \
if test `find $(pkglibdir) | wc -l` -eq 1; then \
rmdir $(pkglibdir); \
fi \
rmdir $(pkglibdir); \
fi
dist-hook:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment