Commits

Satish Balay  committed 88d0b7c

gnumake: use 'make --version' to check for gnumake

  • Participants
  • Parent commits af2272c

Comments (0)

Files changed (1)

File config/BuildSystem/config/packages/make.py

 
   def configureCheckGNUMake(self):
     '''Check for GNU make'''
-    self.getExecutable('strings', getFullPath = 1,setMakeMacro = 0)
-    if hasattr(self, 'strings'):
-      try:
-        (output, error, status) = config.base.Configure.executeShellCommand(self.strings+' '+self.make, log = self.framework.log)
-        if not status and output.find('GNU Make') >= 0:
-          self.haveGNUMake = 1
-      except RuntimeError, e:
-        self.framework.log.write('Make check failed: '+str(e)+'\n')
-      if not self.haveGNUMake:
-        try:
-          (output, error, status) = config.base.Configure.executeShellCommand(self.strings+' '+self.make+'.exe', log = self.framework.log)
-          if not status and output.find('GNU Make') >= 0:
-            self.haveGNUMake = 1
-        except RuntimeError, e:
-          self.framework.log.write('Make check failed: '+str(e)+'\n')
-    # mac has fat binaries where 'string' check fails
-    if not self.haveGNUMake:
-      try:
-        (output, error, status) = config.base.Configure.executeShellCommand(self.make+' -v dummy-foobar', log = self.framework.log)
-        if not status and output.find('GNU Make') >= 0:
-          self.haveGNUMake = 1
-      except RuntimeError, e:
-        self.framework.log.write('Make check failed: '+str(e)+'\n')
+    try:
+      (output, error, status) = config.base.Configure.executeShellCommand(self.make+' --version', log = self.framework.log)
+      if not status and output.find('GNU Make') >= 0:
+        self.haveGNUMake = 1
+    except RuntimeError, e:
+      self.framework.log.write('GNUMake check failed: '+str(e)+'\n')
 
     # Setup make flags
     if self.haveGNUMake: