Quoting Bob Tanner ([EMAIL PROTECTED]):
> I'm wondering if anyone has "integrated" rpm/rpmbuild + distcc + ccache?
> 
> I'd prefer not to alter all the .spec file in the existing rpms, if possible.
> 
> I post here (distcc) because I successfully was able to get ccache to work
> with rpm without any changes to the .spec files.

This seems to be working for me.

vi ~/.rpmmacros

Add to it

%_smp_mflags -j5
%configure \
  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
  FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
  CCACHE_DISTCC=1; export CCACHE_DISTCC ; \
  DISTCC_HOST="host1 host2 host3 host4" ; export DISTCC_HOST ; \
  CC="ccache" ; export CC ; \
  CXX="ccache" ; export CXX ; \
  MAKEOPTS="%{_smp_mflags}" ; export MAKEOPTS ; \
  ./configure \\\
        %{?_gnu: --target=%{_target_platform}} \\\
        %{!?_gnu: --target=%{_target_platform}} \\\
        --prefix=%{_prefix} \\\
        --exec-prefix=%{_exec_prefix} \\\
        --bindir=%{_bindir} \\\
        --sbindir=%{_sbindir} \\\
        --sysconfdir=%{_sysconfdir} \\\
        --datadir=%{_datadir} \\\
        --includedir=%{_includedir} \\\
        --libdir=%{_libdir} \\\
        --libexecdir=%{_libexecdir} \\\
        --localstatedir=%{_localstatedir} \\\
        --sharedstatedir=%{_sharedstatedir} \\\
        --mandir=%{_mandir} \\\
        --infodir=%{_infodir}

Since many of the more modern .spec files using %configure, this will setup
everything for ccache and distcc.

Make sure you change DISTCC_HOST to your hostname.
Change _smp_mflags to whatever -j you want passed to make.
-- 
Bob Tanner <[EMAIL PROTECTED]>         | Phone : (952)943-8700
http://www.mn-linux.org, Minnesota, Linux | Fax   : (952)943-8500
http://www.tcwug.org, Minnesota, Wireless | Coding isn't a crime. 
Fingerprint: 02E0 2734 A1A1 DBA1 0E15  623D 0036 7327 93D9 7DA3
_______________________________________________
distcc mailing list
[EMAIL PROTECTED]
http://lists.samba.org/cgi-bin/mailman/listinfo/distcc

Reply via email to