cvs commit: ports/sysutils/tmux Makefile
b. f.
bf1783 at googlemail.com
Fri Jun 17 04:29:39 UTC 2011
On 6/17/11, wen heping <wenheping at gmail.com> wrote:
> 2011/6/17 b. f. <bf1783 at googlemail.com>:
>> On 6/17/11, Sahil Tandon <sahil at freebsd.org> wrote:
>>> On Thu, 2011-06-16 at 16:47:33 +0000, Alexey Dokuchaev wrote:
>>>
>>>> On Thu, Jun 16, 2011 at 08:42:28AM +0000, Wen Heping wrote:
>>>> > wen 2011-06-16 08:42:28 UTC
>>>> >
>>>> > Modified files:
>>>> > sysutils/tmux Makefile
>>>> > Log:
>>>> > - Fix build when CFLAGS is set in /etc/make.conf
>>>>
>>>> Hmm, default CPPFLAGS is empty. Judging just from the diff, instead of
>>>> introducing EXTRA_CPPFLAGS, setting CPPFLAGS instead of CFLAGS (which is
>>>> bogus in the first place: -I is preprocessor flag) should be enough (no
>>>> MAKE_ENV adjustment and extra REINPLACE_CMD hack would be required in
>>>> this
>>>> case as well). I am missing something obvious here?
>>>
>>> Because of the way upstream Makefile handles CPPFLAGS, it is not so
>>> straightforward. This was discussed on freebsd-ports:
>>>
>>> http://lists.freebsd.org/pipermail/freebsd-ports/2011-June/068218.html
>>> http://lists.freebsd.org/pipermail/freebsd-ports/2011-May/067930.html
>>
>> But this does not seem so different from the many other ports that set
>> or alter variables in the port Makefile. If a user overrides these
>> changes in an automatically and recursively-included Makefile like
>> __MAKE_CONF, or on the command-line, it it the user's problem. Users
>> should not pollute their port builds by unconditionally defining
>> variables in __MAKE_CONF, and I don't think that we should add
>> elaborations to ports to avoid such mistakes. If the submitter of
>> ports/157918 wanted non-default CFLAGS for sysutils/tmux, and he
>> wanted to define them in __MAKE_CONF, rather than in the other
>> automatically-included Makefiles (${.CURDIR}/../Makefile.inc,
>> ${MASTERDIR}/../Makefile.inc, ${MASTERDIR}/Makefile.${ARCH}-${OPSYS},
>> ${MASTERDIR}/Makefile.${OPSYS}, ${MASTERDIR}/Makefile.${ARCH}, or
>> ${MASTERDIR}/Makefile.local), then he could have defined them
>> conditionally. If he doesn't, he will break many other ports besides
>> systutils/tmux.
>>
>> So it seems to me that just fixing CPPFLAGS here is better.
>
> We tried just fixing CPPFLAGS, but it fail when define CPPFLAGS in
> /etc/make.conf.
>
I know, but what I tried to explain is that *no one should be doing
that* -- if they do, they'll break many other ports, and some software
that isn't in ports. Users need to be careful about defining things
unconditionally in __MAKE_CONF: it's a special file. (Some of the
examples in /usr/share/examples/etc/make.conf are misleading, because
while they may be appropriate for the building the base system, they
should not be used for ports or other software.) So you shouldn't
have to worry about that: if it happens, it's the fault of the user.
b.
More information about the cvs-all
mailing list