How to install a single changed file in asterisk

Hi,

The normal sequence of commands i found to install asterisk are -
make clean
./configure
make menuselect
make install

But i was trying to add some debug line in a file chan_sip.c. Do i need to reinstall the asterisk? Is there any way where I can compile only the edited source file and place it?

Thanx.
Tareq

Hi Taremy,

It should not take you very long to re-compile Asterisk.

Brett

Just do

make

this should build just the changed file and all files that depend on it, then with

make install

you install the version with your modifications.

Cheers.

Marco Bruni
www.marcobruni.net

If the file represents a module, and channels normally do, you can mv the newly built .so over the one in the modules directory and then restart Asterisk. I don’t believe there is any way of just unloading and reloading one module whilst keeping the core of Asterisk running.

(For things that build into the asterisk binary, you can move the new one over /usr/sbin/asterisk and restart.)

bwilks, yes you are right. it does not take more than 3/4 minutes. but i was trying to find a more efficient way. because i have only changed one file. thanx for replying. :smile:

thanx Bruni. i was exactly looking for the commands you mentioned. :smiley:

thanx david, your information will help me in future i hope. :smile:

tareq

I have another question. :smile: Which is the best IDE for debugging asterisk?

[quote=“david55”]If the file represents a module, and channels normally do, you can mv the newly built .so over the one in the modules directory and then restart Asterisk. I don’t believe there is any way of just unloading and reloading one module whilst keeping the core of Asterisk running.

(For things that build into the asterisk binary, you can move the new one over /usr/sbin/asterisk and restart.)[/quote]

In 1.4.22.1 you can use module [load|unload|reload] <module.so>