'make' behavior in FreeBSD-10 ?

Michael Powell nightrecon at hotmail.com
Tue Mar 25 09:09:30 UTC 2014


Dominic Fandrey wrote:

> On 24/03/2014 19:36, Assaf Gordon wrote:
>> Hello,
>> 
>> On 03/24/2014 02:06 PM, Lowell Gilbert wrote:
>>>
>>>> I'm trying to track down an issue in compiling 'autotools' packages
>>>> that appears in FreeBSD-10 . (I'm not a frequent FreeBSD user, so it's
>>>> possible I'm missing something - any help would be appreciated).
>>>
>>> Is automake specifically what you're trying to build, or are the other
>>> questions relevant as well?
>>>
>>> This is relevant because it sounds as though you are not trying to use
>>> the FreeBSD ports (or pkg; they're really the same thing in terms of
>>> what gets installed) system. That's the usual way such a thing would be
>>> done, and the exceptions are almost entirely people who would be able to
>>> answer such questions for themselves.
>> 
>> I'm trying to build a package that uses autotools+automake, and should be
>> built with "./confgure && make".
> 
> Just use "./configure && gmake" and you'll be fine. The assumption that
> make == gmake is simply wrong on FreeBSD. And the syntactical differences
> are so huge that only the most primitive makefiles can be made compatible
> without a complete recode.
> 
>> To rephrase my previous question, to a very narrow technical issue:
>> Is there a way to make such a "makefile" complete successfully on
>> FreeBSD:
> 
> Yes, use gmake.
> 
When using the ports system to build/install third part apps, a port that 
needs gmake to build will contain a line such as USES= gmake in that ports' 
Makefile.

If you are trying to build something that has an existing port use the ports 
system. Don't just untar the tarball somewhere and expect it to always work. 
Even though in theory autotools-based build procedures should work all the 
time everywhere, the reality is sometimes they don't. Many times today the 
source has various "Linuxisms" which negate the expected portability. 

Sometimes a port needs to be patched in order to port it to FreeBSD and work 
around portability issues. For such a port there will be a directory named 
files which contains the patches. The devel/autoconf port contains such by 
the way of example. Autotools, autoconf, automake all build fine for most - 
hence the question about whether you are using the ports system to install 
software, as opposed to just untarring the tarball somewhere and doing 
./configure && make.

You cd to the port you want to build and just type make && make install && 
make clean, or just make install clean (same thing). If the Makefile 
requires gmake it will have the afore mentioned line it it. If portability 
is broken and needs patches they will automatically get applied. If the port 
needs gmake instead the Makefile will contain a line like mentioned above. 
You get gmake by installing the /usr/ports/devel/gmake/ port. 

How to install software on FreeBSD is covered in the Handbook.

-Mike




More information about the freebsd-questions mailing list