Changeset 29438


Ignore:
Timestamp:
Sep 23, 2007, 7:27:11 PM (12 years ago)
Author:
afb@…
Message:

configure.ccache and configure.distcc, optional configuration

Location:
trunk/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/doc/macports.conf.5

    r28634 r29438  
    122122.Ic Default:
    123123tgz
     124.It Va configureccache
     125Use ccache (C/C++ compiler cache). Requires that ccache has been installed.
     126.br
     127.Ic Default:
     128no
     129.It Va configuredistcc
     130Use distcc (distributed compiler). Requires that distcc has been installed.
     131.br
     132.Ic Default:
     133no
    124134.It Va buildnicevalue
    125135Lowered scheduling priority (0-20) to use for make when building ports
  • trunk/base/doc/macports.conf.in

    r28634 r29438  
    4141portarchivetype         tgz
    4242
     43# Use ccache (C/C++ compiler cache) - see http://ccache.samba.org/
     44configureccache         no
     45
     46# Use distcc (distributed compiler) - see http://distcc.samba.org/
     47configuredistcc         no
     48
    4349# Lowered scheduling priority (0-20) to use for make when building ports
    4450buildnicevalue          0
  • trunk/base/src/macports1.0/macports.tcl

    r29223 r29438  
    4545        porttrace portverbose destroot_umask variants_conf rsync_server rsync_options \
    4646        rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \
    47         mp_remote_url mp_remote_submit_url buildnicevalue buildmakejobs"
     47        mp_remote_url mp_remote_submit_url configureccache configuredistcc buildnicevalue buildmakejobs"
    4848    variable user_options "submitter_name submitter_email submitter_key"
    4949    variable portinterp_options "\
     
    5252        portarchivetype portautoclean porttrace portverbose destroot_umask rsync_server \
    5353        rsync_options rsync_dir startupitem_type place_worksymlink \
    54         mp_remote_url mp_remote_submit_url buildnicevalue buildmakejobs \
     54        mp_remote_url mp_remote_submit_url configureccache configuredistcc buildnicevalue buildmakejobs \
    5555        $user_options"
    5656   
     
    314314    global macports::xcodebuildcmd
    315315    global macports::xcodeversion
     316    global macports::configureccache
     317    global macports::configuredistcc
    316318    global macports::buildnicevalue
    317319    global macports::buildmakejobs
     
    590592    }
    591593   
     594    # Default mp configure options
     595    if {![info exists macports::configureccache]} {
     596        set macports::configureccache no
     597    }
     598    if {![info exists macports::configuredistcc]} {
     599        set macports::configuredistcc no
     600    }
     601
    592602    # Default mp build options
    593603    if {![info exists macports::buildnicevalue]} {
  • trunk/base/src/port1.0/portconfigure.tcl

    r28677 r29438  
    7676
    7777# Select a distinct compiler (C, C preprocessor, C++)
    78 options configure.cc configure.cxx configure.cpp configure.objc configure.f77 configure.f90 configure.fc configure.javac configure.compiler
     78options configure.ccache configure.distcc configure.cc configure.cxx configure.cpp configure.objc configure.f77 configure.f90 configure.fc configure.javac configure.compiler
     79default configure.ccache                {${configureccache}}
     80default configure.distcc                {${configuredistcc}}
    7981default configure.cc                    {}
    8082default configure.cxx                   {}
     
    124126    global worksrcpath use_configure use_autoconf use_automake use_xmkmf
    125127    global configure.env configure.cflags configure.cppflags configure.cxxflags configure.objcflags configure.ldflags configure.fflags configure.f90flags configure.fcflags configure.classpath configure.macosx_deployment_target
    126     global configure.cc configure.cxx configure.cpp configure.objc configure.f77 configure.f90 configure.fc configure.javac configure.compiler prefix
     128    global configure.ccache configure.distcc configure.cc configure.cxx configure.cpp configure.objc configure.f77 configure.f90 configure.fc configure.javac configure.compiler prefix
    127129    global os.platform os.major
    128130   
     
    236238        parse_environment configure
    237239
     240                # Set pre-compiler filter to use (ccache/distcc), if any.
     241                if {[tbool configure.ccache] && [tbool configure.distcc]} {
     242                        set filter "ccache "
     243                    append_list_to_environment_value configure "CCACHE_PREFIX" "distcc"
     244                } elseif {[tbool configure.ccache]} {
     245                        set filter "ccache "
     246                } elseif {[tbool configure.distcc]} {
     247                        set filter "distcc "
     248                } else {
     249                        set filter ""
     250                }
     251
    238252        # Append configure flags.
    239                 append_list_to_environment_value configure "CC" ${configure.cc}
    240                 append_list_to_environment_value configure "CPP" ${configure.cpp}
    241                 append_list_to_environment_value configure "CXX" ${configure.cxx}
    242                 append_list_to_environment_value configure "OBJC" ${configure.objc}
     253                append_list_to_environment_value configure "CC" ${filter}${configure.cc}
     254                append_list_to_environment_value configure "CPP" ${filter}${configure.cpp}
     255                append_list_to_environment_value configure "CXX" ${filter}${configure.cxx}
     256                append_list_to_environment_value configure "OBJC" ${filter}${configure.objc}
    243257                append_list_to_environment_value configure "FC" ${configure.fc}
    244258                append_list_to_environment_value configure "F77" ${configure.f77}
Note: See TracChangeset for help on using the changeset viewer.