Bug 1256568 - Move doxygen, zip, unzip, xargs, rpmbuild, genisoimage and dsymutil detection to moz.configure. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 15 Mar 2016 11:38:06 +0900
changeset 288752 7fd99a35ac93c34fd9f2a03330942f9763f42c8a
parent 288751 4a2a46087a28a0b061f1f68be74d0182910b0c83
child 288753 66a65bdec004abadac9f1611f4f17bc277831674
push id30089
push userkwierso@gmail.com
push dateWed, 16 Mar 2016 00:26:08 +0000
treeherdermozilla-central@7773387a9a2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1256568
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1256568 - Move doxygen, zip, unzip, xargs, rpmbuild, genisoimage and dsymutil detection to moz.configure. r=gps
build/moz.configure/checks.configure
build/moz.configure/init.configure
js/src/old-configure.in
moz.configure
old-configure.in
--- a/build/moz.configure/checks.configure
+++ b/build/moz.configure/checks.configure
@@ -63,16 +63,15 @@ def check_prog(var, progs, allow_missing
             result = find_program(prog)
             if result:
                 return result
         return not_found
 
     @depends(check)
     @advanced
     def postcheck(value):
-        if value is not not_found:
-            set_config(var, value)
-        elif not allow_missing:
+        set_config(var, ':' if value is not_found else value)
+        if not value and not allow_missing:
             from mozbuild.shellutil import quote
             error('Cannot find %s (tried: %s)'
                   % (var.lower(), ', '.join(quote(p) for p in progs)))
 
     return check
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -246,21 +246,28 @@ early_options = early_options()
 # processed). This is tedious but necessary for now.
 @depends('--help')
 def wanted_mozconfig_variables(help):
      return set([
          'AUTOCONF',
          'AWK',
          'DISABLE_EXPORT_JS',
          'DISABLE_SHARED_JS',
+         'DOXYGEN',
+         'DSYMUTIL',
          'EXTERNAL_SOURCE_DIR',
+         'GENISOIMAGE',
          'MOZILLABUILD',
          'MOZ_ARTIFACT_BUILDS',
          'MOZ_BUILD_APP',
          'PERL',
+         'RPMBUILD',
+         'UNZIP',
+         'XARGS',
+         'ZIP',
      ])
 
 
 @depends(mozconfig, wanted_mozconfig_variables)
 def mozconfig_options(mozconfig, wanted_mozconfig_variables):
     if mozconfig['path']:
         helper = command_line_helper()
         warn('Adding configure options from %s' % mozconfig['path'])
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -465,22 +465,16 @@ fi
 AC_MSG_RESULT([$TAR])
 AC_SUBST(TAR)
 
 if test -z "$COMPILE_ENVIRONMENT"; then
     NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py'
 fi
 AC_SUBST(NSINSTALL_BIN)
 
-MOZ_PATH_PROG(DOXYGEN, doxygen, :)
-MOZ_PATH_PROG(XARGS, xargs)
-if test -z "$XARGS" -o "$XARGS" = ":"; then
-    AC_MSG_ERROR([xargs not found in \$PATH .])
-fi
-
 if test "$COMPILE_ENVIRONMENT"; then
 
 dnl ========================================================
 dnl = Mac OS X toolchain support
 dnl ========================================================
 
 dnl The universal machinery sets UNIVERSAL_BINARY to inform packager.mk
 dnl that a universal binary is being produced and MOZ_CAN_RUN_PROGRAMS
@@ -1097,18 +1091,16 @@ case "$target" in
             AS="$(basename "$AS_BIN")"
         fi
         AR='lib'
         AR_FLAGS='-NOLOGO -OUT:$@'
         AR_EXTRACT=
         RANLIB='echo not_ranlib'
         STRIP='echo not_strip'
         PKG_SKIP_STRIP=1
-        XARGS=xargs
-        DOXYGEN=:
         OBJ_SUFFIX=obj
         LIB_SUFFIX=lib
         DLL_PREFIX=
         LIB_PREFIX=
         IMPORT_LIB_SUFFIX=lib
         MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
         MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
         dnl Set subsystem version 5 for Windows XP.
--- a/moz.configure
+++ b/moz.configure
@@ -106,10 +106,21 @@ def perl_version_check(min_version):
     def require_full_perl_installation(has_full_perl_installation):
         if not has_full_perl_installation:
             error('Cannot find Config.pm or $Config{archlib}. '
                   'A full perl installation is required.')
 
 perl_version_check('5.006')
 
 
+# Miscellaneous programs
+# ==============================================================
+check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
+check_prog('DSYMUTIL', ('dsymutil', 'llvm-dsymutil'), allow_missing=True)
+check_prog('GENISOIMAGE', ('genisoimage',), allow_missing=True)
+check_prog('RPMBUILD', ('rpmbuild',), allow_missing=True)
+check_prog('UNZIP', ('unzip',))
+check_prog('XARGS', ('xargs',))
+check_prog('ZIP', ('zip',))
+
+
 # Fallthrough to autoconf-based configure
 include('build/moz.configure/old.configure')
--- a/old-configure.in
+++ b/old-configure.in
@@ -694,36 +694,16 @@ dnl ====================================
 AC_PROG_INSTALL
 AC_PROG_LN_S
 
 if test -z "$COMPILE_ENVIRONMENT"; then
     NSINSTALL_BIN='$(PYTHON) $(MOZILLA_DIR)/config/nsinstall.py'
 fi
 AC_SUBST(NSINSTALL_BIN)
 
-MOZ_PATH_PROG(DOXYGEN, doxygen, :)
-MOZ_PATH_PROGS(UNZIP, unzip)
-if test -z "$UNZIP" -o "$UNZIP" = ":"; then
-    AC_MSG_ERROR([unzip not found in \$PATH])
-fi
-MOZ_PATH_PROGS(ZIP, zip)
-if test -z "$ZIP" -o "$ZIP" = ":"; then
-    AC_MSG_ERROR([zip not found in \$PATH])
-fi
-MOZ_PATH_PROG(XARGS, xargs)
-if test -z "$XARGS" -o "$XARGS" = ":"; then
-    AC_MSG_ERROR([xargs not found in \$PATH .])
-fi
-
-MOZ_PATH_PROG(RPMBUILD, rpmbuild, :)
-AC_SUBST(RPMBUILD)
-
-MOZ_PATH_PROG(GENISOIMAGE, genisoimage, :)
-MOZ_PATH_PROG(DSYMUTIL, dsymutil, llvm-dsymutil :)
-
 if test "$COMPILE_ENVIRONMENT"; then
 
 dnl ========================================================
 dnl = Mac OS X toolchain support
 dnl ========================================================
 
 dnl The universal machinery sets UNIVERSAL_BINARY to inform packager.mk
 dnl that a universal binary is being produced and MOZ_CAN_RUN_PROGRAMS
@@ -1663,20 +1643,16 @@ case "$target" in
             AS="$(basename "$AS_BIN")"
         fi
         AR='lib'
         AR_FLAGS='-NOLOGO -OUT:$@'
         AR_EXTRACT=
         RANLIB='echo not_ranlib'
         STRIP='echo not_strip'
         PKG_SKIP_STRIP=1
-        XARGS=xargs
-        ZIP=zip
-        UNZIP=unzip
-        DOXYGEN=:
         OBJ_SUFFIX=obj
         LIB_SUFFIX=lib
         DLL_PREFIX=
         LIB_PREFIX=
         IMPORT_LIB_SUFFIX=lib
         MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
         MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
         dnl Set subsystem version 5 for Windows XP.