From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 2 Oct 2003 21:09:43 +0400 From: "Dmitry V. Levin" To: ALT Devel discussion list Subject: Re: [devel] ccache support in gcc-common Message-ID: <20031002170943.GA12664@basalt.office.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20030917182345.GA11890@basalt.office.altlinux.org> <20030918082900.GA15841@sam-solutions.net> <20030923081226.GA6859@basalt.office.altlinux.org> <20030923082158.GC29029@sam-solutions.net> <20030923082832.GB7186@basalt.office.altlinux.org> <20030923085035.GD29029@sam-solutions.net> <20030930164309.GA6605@basalt.office.altlinux.org> <20030930164829.GE16341@sam-solutions.net> <20030930165830.GB6605@basalt.office.altlinux.org> <20031002140258.GL10067@sam-solutions.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: <20031002140258.GL10067@sam-solutions.net> X-fingerprint: 9658 398D 181B 1200 8FC5 26B8 F6F8 846B C1E2 3429 X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.2 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 17:09:44 -0000 Archived-At: List-Archive: List-Post: --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Oct 02, 2003 at 05:02:58PM +0300, Alexander Bokovoy wrote: > On Tue, Sep 30, 2003 at 08:58:30PM +0400, Dmitry V. Levin wrote: > > On Tue, Sep 30, 2003 at 07:48:29PM +0300, Alexander Bokovoy wrote: > > > On Tue, Sep 30, 2003 at 08:43:09PM +0400, Dmitry V. Levin wrote: > > [...] > > > > Идея красивая, осталось только её реализовать. > > > > Желающие есть? > > > в /etc/rpm/macros.d/ccache? Так я это реализую в ccache-2.3-alt1. > > > > Это я уже понял. :) > > > > > Или ты про %build_add_variable_expand ? > > > > Про него. > Пожалуйста: > > %_variable_expand_list %nil > %set_variable_expand() %global _variable_expand_list %* ^ > %add_variable_expand() %global _variable_expand_list %_variable_expand_list %* ^ > %___pre_variable_extender() %{expand:%(echo %_variable_expand_list | \ > while read -d^ var1 var2 ; do \ > echo -e "\\tunset $var2 ||:\\\\" ; \ > echo -e "\\t%%{?$var1:export $var2=\\\"%$var1\\\"}\\\\"\ > done \ > )} > > Результат работы: > > $ rpm -v --define '__ccache_use 1' --define '__ccache_dir /foo/bar' --eval ' > %add_variable_expand __ccache_use GCC_USE_CCACHE > %add_variable_expand __ccache_dir CCACHE_DIR > %add_variable_expand __ccache_false GCC_FALSE_CCACHE > %___pre_variable_extender' > > unset GCC_USE_CCACHE ||:\ > export GCC_USE_CCACHE="1"\ > unset CCACHE_DIR ||:\ > export CCACHE_DIR="/foo/bar"\ > unset GCC_FALSE_CCACHE ||:\ > \ Только это не будет работать, если перенести %add_variable_expand __ccache_use GCC_USE_CCACHE %add_variable_expand __ccache_dir CCACHE_DIR %add_variable_expand __ccache_false GCC_FALSE_CCACHE в ~/.rpmmacros -- ldv --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/fFvX9viEa8HiNCkRAur0AJ9OAD/9dzVVp0WH61vpofB7rDhMNACeI4gf o7iMHzlnMn/J0KwudTWPbOc= =lccM -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e--