[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile-Run Cycle

From: Eric Blake
Subject: Re: Compile-Run Cycle
Date: Wed, 28 Dec 2016 09:35:48 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 12/27/2016 09:30 PM, Anarchean wrote:

>   I use two terminals, one is running vim from inside the
> src dir. The other one has a variable PREFIX=$project_root/sandbox,
> and I use it to compile and run the program, which is usually the
> follow command sequence:
> Once in a while:
> % ./configure --prefix="$PREFIX"
> And then every modification:
> % make
> % make install
> % "$PREFIX/bin/project_name"
>   Is there any way to automate this? How people usually do it?

That works. Another thing to try is to get your software to the point
that it will run when uninstalled, from a VPATH build tree.  Then you
can shorten the steps to

% make
% ./src/project_name

assuming that the 'make install' step is what copies src/project_name to
$PREFIX/bin/project_name.  If you have a good testsuite, and have
properly hooked it into automake, then 'make check' is a good way to
test the uninstalled project.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]