Re: How to override port Makefile to point to local directory?

From: Pat Maddox <>
Date: Mon, 16 May 2022 05:28:12 UTC
On 15 May 2022, at 20:49, Chris wrote:

> On 2022-05-15 20:29, Pat Maddox wrote:
>> I am writing software that I would eventually like to install on 
>> FreeBSD. I'm
>> currently stuck trying to write a Makefile that will point to my 
>> local git dir, so
>> I can build and install it while I'm developing. All of the finished 
>> Makefiles
>> reference tar packages, which makes sense. But when I'm actively 
>> developing, I
>> don't want to commit the code, push it, have it built, update the 
>> makefile with
>> the commit, and make.
>> Does anyone know of a way to override options to a port's Makefile to 
>> point to a
>> local directory on disk? I want to run "sudo make install" and "make 
>> package" from
>> my development directory, using the same Makefile that would be in 
>> the ports tree.
> You can perform make out of tree build/installs w/o issue. The ports 
> infrastructure
> will post a couple of warnings. But nothing to stop you from 
> development. I do it out
> of ~/DEV/<category>/port-im-developing all the time.
> Chris
>> Pat

Cool, how do I do that?

Here’s the Makefile in my project directory:

When I run `make install`, it downloads the zip from GitHub. That makes 
sense, because that’s what it’s configured to do, and I haven’t 
passed in any options to find the source elsewhere.

I don’t know how to tell make not to fetch & extract, because I 
already have the source locally.