[31807] trunk/base/src/port1.0/portbuild.tcl
jmpp at macports.org
jmpp at macports.org
Fri Dec 7 22:14:01 PST 2007
Revision: 31807
http://trac.macosforge.org/projects/macports/changeset/31807
Author: jmpp at macports.org
Date: 2007-12-07 22:13:59 -0800 (Fri, 07 Dec 2007)
Log Message:
-----------
Whitespace cleanup to portbuilt.tcl, add modeline.
Modified Paths:
--------------
trunk/base/src/port1.0/portbuild.tcl
Modified: trunk/base/src/port1.0/portbuild.tcl
===================================================================
--- trunk/base/src/port1.0/portbuild.tcl 2007-12-08 05:41:46 UTC (rev 31806)
+++ trunk/base/src/port1.0/portbuild.tcl 2007-12-08 06:13:59 UTC (rev 31807)
@@ -1,4 +1,4 @@
-# eti:ts=4
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# portbuild.tcl
# $Id$
#
@@ -55,57 +55,57 @@
proc build_getmaketype {args} {
if {![exists build.type]} {
- return make
+ return make
}
switch -exact -- [option build.type] {
- bsd {
- if {[option os.platform] == "darwin"} {
- return bsdmake
- } elseif {[option os.platform] == "freebsd"} {
- return make
- } else {
- return pmake
- }
- }
- gnu {
- if {[option os.platform] == "darwin"} {
- return gnumake
- } elseif {[option os.platform] == "linux"} {
- return make
- } else {
- return gmake
- }
- }
- pbx {
- set pbxbuild "pbxbuild"
- set xcodebuild "xcodebuild"
-
- if {[option os.platform] != "darwin"} {
- return -code error "[format [msgcat::mc "This port requires 'pbxbuild/xcodebuild', which is not available on %s."] [option os.platform]]"
- }
-
- if {[catch {set xcodebuild [binaryInPath $xcodebuild]}] == 0} {
- return $xcodebuild
- } elseif {[catch {set pbxbuild [binaryInPath $pbxbuild]}] == 0} {
- return $pbxbuild
- } else {
- return -code error "Neither pbxbuild nor xcodebuild were found on this system!"
- }
- }
- default {
- ui_warn "[format [msgcat::mc "Unknown build.type %s, using 'gnumake'"] [option build.type]]"
- return gnumake
- }
+ bsd {
+ if {[option os.platform] == "darwin"} {
+ return bsdmake
+ } elseif {[option os.platform] == "freebsd"} {
+ return make
+ } else {
+ return pmake
+ }
+ }
+ gnu {
+ if {[option os.platform] == "darwin"} {
+ return gnumake
+ } elseif {[option os.platform] == "linux"} {
+ return make
+ } else {
+ return gmake
+ }
+ }
+ pbx {
+ set pbxbuild "pbxbuild"
+ set xcodebuild "xcodebuild"
+
+ if {[option os.platform] != "darwin"} {
+ return -code error "[format [msgcat::mc "This port requires 'pbxbuild/xcodebuild', which is not available on %s."] [option os.platform]]"
+ }
+
+ if {[catch {set xcodebuild [binaryInPath $xcodebuild]}] == 0} {
+ return $xcodebuild
+ } elseif {[catch {set pbxbuild [binaryInPath $pbxbuild]}] == 0} {
+ return $pbxbuild
+ } else {
+ return -code error "Neither pbxbuild nor xcodebuild were found on this system!"
+ }
+ }
+ default {
+ ui_warn "[format [msgcat::mc "Unknown build.type %s, using 'gnumake'"] [option build.type]]"
+ return gnumake
+ }
}
}
proc build_getnicevalue {args} {
if {![exists build.nice]} {
- return ""
+ return ""
}
set nice [option build.nice]
if {![string is integer -strict $nice] || $nice <= 0} {
- return ""
+ return ""
}
return "nice -n $nice "
}
@@ -114,12 +114,12 @@
# check if port allows a parallel build
global use_parallel_build
if {![tbool use_parallel_build]} {
- return ""
+ return ""
}
ui_debug "port allows a parallel build"
if {![exists build.jobs] || ![string match "*make*" [build_getmaketype]]} {
- return ""
+ return ""
}
set jobs [option build.jobs]
# if set to '0', use the number of cores for the number of jobs
@@ -127,7 +127,7 @@
set jobs [exec "/usr/sbin/sysctl" "-n" "hw.ncpu"]
}
if {![string is integer -strict $jobs] || $jobs <= 1} {
- return ""
+ return ""
}
return " -j$jobs"
}
@@ -136,9 +136,9 @@
global UI_PREFIX
if {[string length [option build.target]]} {
- ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s with target %s"] [option portname] [option build.target]]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s with target %s"] [option portname] [option build.target]]"
} else {
- ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s"] [option portname]]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s"] [option portname]]"
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071207/a55f4610/attachment.html
More information about the macports-changes
mailing list