OSDN Git Service

maint: "make distcheck" now runs the root-only tests
authorJim Meyering <meyering@redhat.com>
Thu, 10 Nov 2011 11:11:24 +0000 (12:11 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 10 Nov 2011 11:11:24 +0000 (12:11 +0100)
* Makefile.am (root-check): New overridable variable and rule.
(distcheck-hook): Depend on it.

Makefile.am

index 3a69832..39c1d01 100644 (file)
@@ -28,7 +28,15 @@ parted.spec: parted.spec.in
        mv $@-tmp $@
 MAINTAINERCLEANFILES = parted.spec
 
-distcheck-hook:
+.PHONY: root-check
+root-check:
+       sudo $(MAKE) check
+
+# 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)
        $(MAKE) my-distcheck
 
 ### ABI Checking scripts ###