Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Apr 2011 08:43:27 +0100
From:      Chris Rees <utisoft@gmail.com>
To:        Carl <k0802647@telus.net>
Cc:        freebsd@edvax.de, freebsd-questions@freebsd.org
Subject:   Re: building a port with very long list of build options
Message-ID:  <BANLkTi=KB2gkiJa3gcMrrLcB9erYh0v9HQ@mail.gmail.com>
In-Reply-To: <4DB1297E.6090205@telus.net>
References:  <4DB0F34B.9030008@telus.net> <BANLkTinn53mqc=2rkWqMAqZJvdK-vydP7A@mail.gmail.com> <4DB1297E.6090205@telus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22 April 2011 08:08, Carl <k0802647@telus.net> wrote:
> On 2011-04-21 8:52 PM, Polytropon wrote:
>>
>> This has been possible and common in the past. For example,
>> the many options for the mplayer and mencoder ports could
>> be specified in a file, so changing of a port's file was
>> not needed. I'm not fully sure this option is still present,
>> but at least on v7 it worked.
>>
>> Create a file Makefile.local in the port's directory and
>> specify all your options as desired. This file will be
>> sourced when you issue a "make" command and will override
>> settings of the regular Makefile (e. g. if you want
>> different CFLAGS for _this_ port). The file is to be in
>> the known syntax, NAME=3Dvalue.
>
> Does that solution allow for locating Makefile.local outside the ports tr=
ee
> so as not to contaminate builds for other targets using the same ports tr=
ee?
>
> On 2011-04-21 9:11 PM, Mehmet Erol Sanliturk wrote:
>>
>> If you read the make manual page , you will see the following option :
>>
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ...
>>
>> =A0 =A0 =A0*-f* *makefile*
>> =A0 =A0 =A0 =A0 =A0 =A0 Specify a makefile to read instead of the defaul=
t one.
>>
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0...
>>
>> =A0which is used as
>>
>> make -f your_own_make_file_name
>>
>> This form will override the Makefile present in the current directory
>> and will use the specified make file with name your_own_make_file_name .
>
> Yes, I did see that, but I interpreted that to mean my make file *replace=
s*
> the original, in which case I would need to populate my make file not onl=
y
> with the list of build options I want but also a copy of everything in th=
e
> original make file. If I'm correct, that doesn't seem to me to be a good
> idea from a maintenance perspective. I was hoping for something like the =
-f
> option that somehow inserted rather than replaced.
>

Or, at the bottom of your Makefile defining variables (including
BATCH=3D yes to skip the OPTIONS dialog), stick the line:

.include "Makefile"

and use make -f _my_Makefile

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTi=KB2gkiJa3gcMrrLcB9erYh0v9HQ>