Re: how to set/unset env variables in spec file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/09/15 17:29 +0200, arnaud gaboury wrote:
I can see in your spec file you use %global. I couldn't find any entry
in the Fedora documentation about rpmbuild.
My issue is a variable environment one. If I source manually the two
scripts, build goes well. When sourcing from the spec file, it fails.

As already pointed out elsewhere in the thread, you probably just need
to use 'export' i.e.

export CC=icc
export LDFLAGS='-lblah'

Bash (and traditional Bourne sh) do not export shell variables to
child processes by default, so if you just add CC=icc to the spec file
then it only sets it in the parent shell process, not in the child
processes that run configure, make, etc.

By using export you tell the shell to also set those variables in the
environment of child processes.

See "man bash" or "bash -c 'help export'" for more information.
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux