Split portbuild into portbsdmake, portgnumake, and portpbxbuild.

git-svn-id: https://svn.macports.org/repository/macports/branches/kevin-target-api/base@2430 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
Kevin Van Vechten
2003-04-09 08:38:01 +00:00
parent 14c9cbb7c8
commit c3fca3c6c6
7 changed files with 249 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ INSTALLDIR= ${DESTDIR}${PREFIX}/share/darwinports/Tcl/port1.0
TARGETSDIR= ${INSTALLDIR}/targets
SRCS= port.tcl portutil.tcl
TARGETS= portconfigure.tcl portmain.tcl portbuild.tcl portpatch.tcl portinstall.tcl portinstall.tcl portclean.tcl portpackage.tcl portdestroot.tcl portdeploy.tcl portdistfiles.tcl portdistcache.tcl portcurl.tcl portwget.tcl portcvs.tcl portmd5.tcl portgzip.tcl portbzip2.tcl portzip.tcl portconfigure.tcl portautoconf.tcl portautomake.tcl portxmkmf.tcl portdistclean.tcl
TARGETS= portconfigure.tcl portmain.tcl portbuild.tcl portpatch.tcl portinstall.tcl portinstall.tcl portclean.tcl portpackage.tcl portdestroot.tcl portdeploy.tcl portdistfiles.tcl portdistcache.tcl portcurl.tcl portwget.tcl portcvs.tcl portmd5.tcl portgzip.tcl portbzip2.tcl portzip.tcl portconfigure.tcl portautoconf.tcl portautomake.tcl portxmkmf.tcl portdistclean.tcl portbsdmake.tcl portgnumake.tcl portpbxbuild.tcl
SUBDIR= resources
+1
View File
@@ -94,6 +94,7 @@ proc portinit {} {
# Target API
$worker alias name tname $ditem
$worker alias version noop
$worker alias maintainers noop
$worker alias description noop
$worker alias requires target_requires $ditem
+81
View File
@@ -0,0 +1,81 @@
# et:ts=4
# portbsdmake.tcl
#
# Copyright (c) 2002 - 2003 Apple Computer, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
PortTarget 1.0
name org.opendarwin.bsdmake
version 1.0
maintainers kevin@opendarwin.org
description Builds sources using bsdmake
requires configure
provides bsdmake
# define options
options build.target.all build.target
commands build
# defaults
default build.dir {[option workpath]/[option worksrcdir]}
default build.pre_args {[option build.target]}
option_deprecate build.target.all build.target
default build.target "all"
proc set_defaults {args} {
# If this gets called then somebody said "use bsdmake"
global use_bsdmake
set use_bsdmake yes
if {[option os.platform] == "darwin"} {
default build.cmd {bsdmake}
} else {
default build.cmd {make}
}
}
set UI_PREFIX "---> "
proc main {args} {
global UI_PREFIX use_bsdmake
if {![info exists use_bsdmake] || $use_bsdmake != "yes"} {
# We were not called upon.
return 1
}
ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s with bsdmake"] [option portname]]"
if {[catch {system "[command build]"} result]} {
return -code error "[format [msgcat::mc "%s failure: %s"] bsdmake $result]"
}
return 0
}
+6
View File
@@ -29,6 +29,12 @@
# POSSIBILITY OF SUCH DAMAGE.
#
return
#
#
# OBSOLETE
#
#
PortTarget 1.0
name org.opendarwin.build
+2 -2
View File
@@ -125,8 +125,8 @@ proc main {args} {
# Make the distfile globally visible.
option distfile $distfile
# Selects the download, checksum, and extract targets.
# extracts the distfile into the work directory.
# Selects the download and checksum targets.
# checksums the patch file.
# Don't keep state.
eval_targets checksum 0
}
+81
View File
@@ -0,0 +1,81 @@
# et:ts=4
# portgnumake.tcl
#
# Copyright (c) 2002 - 2003 Apple Computer, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
PortTarget 1.0
name org.opendarwin.gnumake
version 1.0
maintainers kevin@opendarwin.org
description Builds sources using gnumake
requires configure
provides gnumake
# define options
options build.target.all build.target
commands build
# defaults
default build.dir {[option workpath]/[option worksrcdir]}
default build.pre_args {[option build.target]}
option_deprecate build.target.all build.target
default build.target "all"
proc set_defaults {args} {
# If this gets called then somebody said "use gnumake"
global use_gnumake
set use_gnumake yes
if {[option os.platform] == "darwin"} {
default build.cmd {gnumake}
} else {
default build.cmd {gmake}
}
}
set UI_PREFIX "---> "
proc main {args} {
global UI_PREFIX use_gnumake
if {![info exists use_gnumake] || $use_gnumake != "yes"} {
# We were not called upon.
return 1
}
ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s with gnumake"] [option portname]]"
if {[catch {system "[command build]"} result]} {
return -code error "[format [msgcat::mc "%s failure: %s"] gnumake $result]"
}
return 0
}
+77
View File
@@ -0,0 +1,77 @@
# et:ts=4
# portpbxbuild.tcl
#
# Copyright (c) 2002 - 2003 Apple Computer, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
PortTarget 1.0
name org.opendarwin.gnumake
version 1.0
maintainers kevin@opendarwin.org
description Builds sources using gnumake
requires configure
provides pbxbuild
# define options
options build.target.all build.target
commands build
# defaults
default build.dir {[option workpath]/[option worksrcdir]}
default build.pre_args {[option build.target]}
option_deprecate build.target.all build.target
default build.target "all"
proc set_defaults {args} {
# If this gets called then somebody said "use bsdmake"
global use_pbxbuild
set use_pbxbuild yes
default build.cmd {pbxbuild}
}
set UI_PREFIX "---> "
proc main {args} {
global UI_PREFIX use_pbxbuild
if {![info exists use_pbxbuild] || $use_pbxbuild != "yes"} {
# We were not called upon.
return 1
}
ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s with pbxbuild"] [option portname]]"
if {[catch {system "[command build]"} result]} {
return -code error "[format [msgcat::mc "%s failure: %s"] pbxbuild $result]"
}
return 0
}