Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jul 2015 09:54:56 +0500
From:      =?UTF-8?B?0JLQsNGB0LjQu9C40Lkg0JjQstCw0L3QvtCy0LjRhw==?= <vasya.pupkin.bsd@gmail.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How set CFLAGS for individual port?
Message-ID:  <CAG0PcJX71nn3T-fw6CagARoGdcd0JvgqiDnfn_biP%2B=Q6HeXWQ@mail.gmail.com>
In-Reply-To: <20150714063511.6e167ffb.freebsd@edvax.de>
References:  <CAG0PcJV_SYNLLi=2zzDfArFpDBd7rSnBwc%2BHshiyoCDTto%2B4UA@mail.gmail.com> <20150714063511.6e167ffb.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
2015-07-14 9:35 GMT+05:00 Polytropon <freebsd@edvax.de>:

> On Tue, 14 Jul 2015 09:08:18 +0500, =D0=92=D0=B0=D1=81=D0=B8=D0=BB=D0=B8=
=D0=B9 =D0=98=D0=B2=D0=B0=D0=BD=D0=BE=D0=B2=D0=B8=D1=87 wrote:
> > Hi!
> >
> > I have a -CURRENT i386 machine. And my make.conf have build options:
> > CFLAGS=3D -Os -pipe
> > But some ports not builds by clang 3.6.1 with any optimizations except
> -O0
> > (for example devel/gettext-tools), and solution for older BSD versions:
> > .if ${.CURDIR} =3D=3D "/usr/ports/devel/gettext-tools"
> >     CFLAGS=3D -O0 -pipe
> > .endif
> >
> > not works now. It give that error:
> > make: "/etc/make.conf" line 26: Unassociated shell command "CFLAGS     =
 =3D
> > -O0 -pipe -march=3Dpentium-m"
> > make: Fatal errors encountered -- cannot continuemake: "/etc/make.conf"
> > line 26: Unassociated shell command "CFLAGS     =3D -O0 -pipe
> > -march=3Dpentium-m"
> > make: Fatal errors encountered -- cannot continue=3D=3D=3D>>> Launching=
 'make
> > checksum' for devel/gettext-tools in background
> > make: make: ""/etc/make.conf/etc/make.conf" line 26: " line 26:
> > Unassociated shell command "CFLAGS      =3D -O0 -pipe
> > -march=3Dpentium-m"Unassociated shell command "CFLAGS =3D -O0 -pipe
> > -march=3Dpentium-m"
> >
> > make: Fatal errors encountered -- cannot continuemake: Fatal errors
> > encountered -- cannot continue
> > make: stopped in /usr/ports/devel/gettext-tools
> > =3D=3D=3D>>> Gathering dependency list for devel/gettext-tools from por=
ts
> > make: "/etc/make.conf" line 26: Unassociated shell command "CFLAGS     =
 =3D
> > -O0 -pipe -march=3Dpentium-m"
> > make: Fatal errors encountered -- cannot continue
> > =3D=3D=3D>>> Cannot cd to make:
> > =3D=3D=3D>>> Aborting update
> >
> > How can i set various build options for individual ports?
>
> Try this:
>
> .if ${.CURDIR:M*/devel/gettext-tools*}
> CFLAGS=3D -O0 -pipe
> .endif
>
> This will apply CFLAGS as intended (and therefore discard any
> other CFLAGS setting) for the port at its top level as well as
> any subdirectories.
>
>
>
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
>

Thanks Polytropon!

I'm tryin your suggestion and it gives me error againg. After that I'm
tryin to delete TAB aligment before CFLAGS=3D... and it works!

Sorry for my mistake :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG0PcJX71nn3T-fw6CagARoGdcd0JvgqiDnfn_biP%2B=Q6HeXWQ>