We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Partial Rebuild

From only the Readme-Documentation and looking plain at the build-sources, I was able to tweak the code within phalcon.c in the build-folders.

Of course, tweaking that file and doing a sudo ./install is a bit uncosy w.r.t. build times and overview.

I was able to find via looking at git log <different params> to see that the amalgam-phalcon.c file is generated by gen-build.php. However, this still comes down to a full rebuild.

This is where I am at my wits' end.

tl;dr Usecase: Change a few lines of code and re-build and -install phalcon.

Question: Is a partial rebuild and installation of phalcon possible?



98.9k
Accepted
answer

You can just compile from the ext directory:

cd cphalcon/ext
phpize
./configure --enable-phalcon
make
sudo make install

Nice, thank you. I think this info in a contributor's readme would be nice.

Just to complete your suggestion, this is what I do now:

# prepare
cd cphalcon/ext
phpize
./configure --enable-phalcon

# hacking
make -j4 && make && sudo make install && sudo service apache2 reload

The basic difference is in parallel building (the -j parameter to make) and reloading apache2 in one line.