[Commits] (markie) Correct calls to executeCommandReturnOutput

commits at osafoundation.org commits at osafoundation.org
Sat Apr 24 15:12:12 PDT 2004


Commit by: markie
Modified files:
osaf/hardhat/buildscripts/chandler-newbuild.py 1.20 1.21

Log message:
Correct calls to executeCommandReturnOutput


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/osaf/hardhat/buildscripts/chandler-newbuild.py.diff?r1=text&tr1=1.20&r2=text&tr2=1.21

Index: osaf/hardhat/buildscripts/chandler-newbuild.py
diff -u osaf/hardhat/buildscripts/chandler-newbuild.py:1.20 osaf/hardhat/buildscripts/chandler-newbuild.py:1.21
--- osaf/hardhat/buildscripts/chandler-newbuild.py:1.20	Sat Apr 24 15:02:44 2004
+++ osaf/hardhat/buildscripts/chandler-newbuild.py	Sat Apr 24 15:11:42 2004
@@ -41,6 +41,13 @@
     for releaseMode in ('debug', 'release'):
         releaseModeDir = os.path.join(workingDir, releaseMode)
         os.chdir(releaseModeDir)
+        if releaseMode == "debug":
+            dbgStr = "DEBUG=1"
+            relStr = "debug"
+        else:
+            dbgStr = ""
+            relStr = "release"
+        
         # Find out if the initialization was ever done
 
         extModuleDir = os.path.join(releaseModeDir, "external")
@@ -59,28 +66,26 @@
             hardhatutil.dumpOutputList(outputList, log)
 
             # Now need to do the setup for external - "expand" and "make"
-            os.chdir("external")
+            os.chdir(extModuleDir)
             os.putenv("BUILD_ROOT", os.path.join(outputDir, "debug", "external") )
-            print "Building debug"
+            print "Building " + relStr
             log.write("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")
-            log.write("Building debug..." + "\n")
+            log.write("Expanding external sources")
             outputList = hardhatutil.executeCommandReturnOutput(
-             ['make', "expand" ],
-             "Expanding external sources")
+             ['make', "expand" ])
             outputList = hardhatutil.executeCommandReturnOutput(
-             [buildenv['make'], "DEBUG=1" ],
-             "Making external (debug) programs")
+             [buildenv['make'], dbgStr ])
+            log.write("Making external (debug) binaries")
             outputList = hardhatutil.executeCommandReturnOutput(
-             [buildenv['make'], "DEBUG=1", "binaries" ],
-             "Making external (debug) binaries")
+             [buildenv['make'], dbgStr, "binaries" ])
 
-            os.chdir("../internal")
+            os.chdir(intModuleDir)
+            log.write("Making internal (debug) programs")
             outputList = hardhatutil.executeCommandReturnOutput(
-             [buildenv['make'], "DEBUG=1" ],
-             "Making internal (debug) programs")
+             [buildenv['make'], dbgStr ])
+            log.write("Making internal (debug) binaries")
             outputList = hardhatutil.executeCommandReturnOutput(
-             [buildenv['make'], "DEBUG=1", "binaries" ],
-             "Making internal (debug) binaries")
+             [buildenv['make'], dbgStr, "binaries" ])
 
     # do debug
     ret = Do(hardhatScript, "debug", workingDir, outputDir, cvsVintage, 
@@ -138,6 +143,13 @@
         if sys.platform == 'cygwin':
             osName = 'win'
 
+    if mode == "debug":
+        dbgStr = "DEBUG=1"
+        relStr = "debug"
+    else:
+        dbgStr = ""
+        relStr = "release"
+    
     if clobber:
         if os.path.exists(modeDir):
             hardhatutil.rmdirRecursive(modeDir)
@@ -211,19 +223,19 @@
         log.write("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")
         log.write("Scrubbing all modules" + "\n")
         try:
-            if mode == "debug":
-                os.chdir(extModuleDir)
-                log.write("Cleaning external")
-                outputList = hardhatutil.executeCommandReturnOutput(
-                 [buildenv['make'], "DEBUG=1", "clean" ])
-                os.chdir(intModuleDir)
-                log.write("Cleaning internal")
-                outputList = hardhatutil.executeCommandReturnOutput(
-                 [buildenv['make'], "DEBUG=1", "clean" ])
-                os.chdir(mainModuleDir)
-                log.write("Cleaning chandler")
-                outputList = hardhatutil.executeCommandReturnOutput(
-                 [hardhatScript, "-ns"])
+            os.chdir(extModuleDir)
+            log.write("Cleaning external")
+            outputList = hardhatutil.executeCommandReturnOutput(
+             [buildenv['make'], dbgStr, "clean" ])
+            os.chdir(intModuleDir)
+            log.write("Cleaning internal")
+            outputList = hardhatutil.executeCommandReturnOutput(
+             [buildenv['make'], dbgStr, "clean" ])
+            os.chdir(mainModuleDir)
+            log.write("Cleaning chandler")
+            outputList = hardhatutil.executeCommandReturnOutput(
+             [hardhatScript, "-ns"])
+
         except Exception, e:
             log.write("***Error during scrub***" + "\n")
             CopyLog(os.path.join(modeDir, logPath), log)
@@ -251,13 +263,6 @@
     
 
     try: # build
-        if mode == "debug":
-            dbgStr = "DEBUG=1"
-            relStr = "debug"
-        else:
-            dbgStr = ""
-            relStr = "release"
-        
         if needToScrubAll or newModules:
             print "Building all in " + relStr
             log.write("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")



More information about the Commits mailing list