diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-09 15:04:40 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-01-09 15:04:40 +0100 |
commit | 74a139ab42bb40f00d5196789d1646494f154967 (patch) | |
tree | f66ad4aff9d58ff4b3b7a711f17abfe0a70b3181 /Makefile.am | |
parent | 8762318d7415398e95dbf2546a7c6993bd4b5392 (diff) | |
download | parted-74a139ab42bb40f00d5196789d1646494f154967.tar.gz |
build: fix "make distcheck" failure
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.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 39c1d01..ae252bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,13 +30,13 @@ MAINTAINERCLEANFILES = parted.spec .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 ### |