From 71a1b9942fd9bae2036bacf99ad6f42edec9a941 Mon Sep 17 00:00:00 2001
From: Mike Hommey <mh+mozilla@glandium.org>
Date: Mon, 28 Mar 2016 07:22:09 +0900
Subject: [PATCH] Bug 1260066 - Move last uses of check_prog that weren't in
 the global scope to the global scope. r=nalexander

---
 moz.configure | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/moz.configure b/moz.configure
index de52484b47d43..09b86440b5f0c 100644
--- a/moz.configure
+++ b/moz.configure
@@ -147,15 +147,21 @@ check_prog('XARGS', ('xargs',))
 check_prog('ZIP', ('zip',))
 
 @depends(target)
-def mac_programs(target):
+def extra_programs(target):
     if target.kernel == 'Darwin':
-        check_prog('DSYMUTIL', ('dsymutil', 'llvm-dsymutil'), allow_missing=True)
-        check_prog('GENISOIMAGE', ('genisoimage',), allow_missing=True)
-
-@depends(target)
-def linux_programs(target):
+        return namespace(
+            DSYMUTIL=('dsymutil', 'llvm-dsymutil'),
+            GENISOIMAGE=('genisoimage',),
+        )
     if target.os == 'GNU' and target.kernel == 'Linux':
-        check_prog('RPMBUILD', ('rpmbuild',), allow_missing=True)
+        return namespace(RPMBUILD=('rpmbuild',))
+
+check_prog('DSYMUTIL', delayed_getattr(extra_programs, 'DSYMUTIL'),
+           allow_missing=True)
+check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'),
+           allow_missing=True)
+check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'),
+           allow_missing=True)
 
 
 # Fallthrough to autoconf-based configure
-- 
GitLab