[71370] trunk/base/src/port1.0

raimue at macports.org raimue at macports.org
Fri Sep 10 14:54:44 PDT 2010


Revision: 71370
          http://trac.macports.org/changeset/71370
Author:   raimue at macports.org
Date:     2010-09-10 14:54:41 -0700 (Fri, 10 Sep 2010)
Log Message:
-----------
port1.0: Add -w to build.cmd and destroot.cmd if using gnumake,
adds "Entering directory" debug log output

Modified Paths:
--------------
    trunk/base/src/port1.0/portbuild.tcl
    trunk/base/src/port1.0/portdestroot.tcl

Modified: trunk/base/src/port1.0/portbuild.tcl
===================================================================
--- trunk/base/src/port1.0/portbuild.tcl	2010-09-10 20:58:40 UTC (rev 71369)
+++ trunk/base/src/port1.0/portbuild.tcl	2010-09-10 21:54:41 UTC (rev 71370)
@@ -53,7 +53,7 @@
 default build.cmd {[portbuild::build_getmaketype]}
 default build.nice {${buildnicevalue}}
 default build.jobs {[portbuild::build_getjobs]}
-default build.pre_args {${build.target}}
+default build.pre_args {[portbuild::build_getargs]}
 default build.target "all"
 default use_parallel_build yes
 
@@ -122,6 +122,16 @@
     return $jobs
 }
 
+proc portbuild::build_getargs {args} {
+    if {(![exists build.type] || [option build.type] == "gnu") \
+        && [regexp "^(/\\S+/|)(g|gnu|)make(\\s+.*|)$" [option build.cmd]]} {
+        # Print "Entering directory" lines for better log debugging
+        return "-w [option build.target]"
+    }
+
+    return "[option build.target]"
+}
+
 proc portbuild::build_getjobsarg {args} {
     # check if port allows a parallel build
     global use_parallel_build

Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl	2010-09-10 20:58:40 UTC (rev 71369)
+++ trunk/base/src/port1.0/portdestroot.tcl	2010-09-10 21:54:41 UTC (rev 71370)
@@ -59,7 +59,7 @@
 default destroot.asroot no
 default destroot.dir {${build.dir}}
 default destroot.cmd {${build.cmd}}
-default destroot.pre_args {${destroot.target}}
+default destroot.pre_args {[portdestroot::destroot_getargs]}
 default destroot.target install
 default destroot.post_args {${destroot.destdir}}
 default destroot.destdir {DESTDIR=${destroot}}
@@ -87,6 +87,16 @@
 
 set_ui_prefix
 
+proc portdestroot::destroot_getargs {args} {
+    if {(![exists build.type] || [option build.type] == "gnu") \
+        && [regexp "^(/\\S+/|)(g|gnu|)make(\\s+.*|)$" [option destroot.cmd]]} {
+        # Print "Entering directory" lines for better log debugging
+        return "-w [option build.target]"
+    }
+
+    return "[option build.target]"
+}
+
 proc portdestroot::destroot_start {args} {
     global UI_PREFIX prefix name porturl destroot os.platform destroot.clean portsharepath
     global destroot.umask destroot.asroot euid egid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100910/1f95a828/attachment.html>


More information about the macports-changes mailing list