Ever since "make distcheck" began using sudo (i.e., running "make check"
as root, and then running it as non-root), the build-after-root would
often fail due to some derived files being owned by root.
This change adds a "chown -R $USER ." to restore order.
* Makefile.am (root-check): Run "chown -R $USER ." after sudo run.
(root_check): Rename variable from root-check, to avoid a warning
from automake about non-POSIX variable.
.PHONY: root-check
root-check:
- sudo $(MAKE) check
+ sudo sh -c '$(MAKE) check; t=$$?; chown -R $(USER) .; exit $$t'
# Not everyone who runs "make distcheck" will want to or even
# be able to run the root tests. If you want to skip them,
# run make like this: "make distcheck root-check="
-root-check ?= root-check
-distcheck-hook: $(root-check)
+root_check ?= root-check
+distcheck-hook: $(root_check)
$(MAKE) my-distcheck
### ABI Checking scripts ###