Hello there!
I am currently looking into alternative build systems - such as Ninja - and wanted to ask, in which steps PHP is compiled.
Currently I am working on a bigger system which utilizes Ninja to build stuff. But converting a makefile into a build.ninja file is not that easy at all,especially when you never learned how makefiles themselves work...like me, i don't know how makefiles work. o-o But, I know how build.ninja files work and are built.
So, could somebody give me some basic instructions on how PHP is built? The bulky GCC/G++ commands from 'make --dry-run' make it hard to understand what is going on.
Kind regards, Ingwie.
converting a makefile into a build.ninja file is not that easy at all,especially when you never learned how makefiles themselves work...like me, i don't know how makefiles work. o-o
I think it's quite unreasonable of you to ask us to explain our build
system to you without you doing even the most basic research yourself.
Makefiles are quite simple: They are map files to file dependencies and
commands to execute to create those files. But Wikipedia can explain it
far better than I can.
Regards,
Andrea Faulds
http://ajf.me/
Hello.
I have now taken some time and investigated some with a Makefile created with --disable-all. I noticed that basically everything seems to be compiled using Libtool, no stand-alone GCC at all. Is this normal? In the normal build process, it seems to always build with just GCC quite a lot of time.
Also I have started with basic conversions as well...getting somewhere. So maybe I can provide a PHP script to convert the Makefile to a build.ninja file, as to what I am looking towards to.
There is just one question I have left:
Zend/zend_language_scanner.lo: /Users/Ingwie/Work/drag0n-php/Zend/zend_language_parser.h
Zend/zend_ini_scanner.lo: /Users/Ingwie/Work/drag0n-php/Zend/zend_ini_parser.h
Do these lines just mean, that the .lo files depend on named .h files? The only thing I couldnt understand yet.
Kind regards, Ingwie
Am 28.10.2013 um 20:14 schrieb Andrea Faulds ajf@ajf.me:
converting a makefile into a build.ninja file is not that easy at all,especially when you never learned how makefiles themselves work...like me, i don't know how makefiles work. o-o
I think it's quite unreasonable of you to ask us to explain our build system to you without you doing even the most basic research yourself. Makefiles are quite simple: They are map files to file dependencies and commands to execute to create those files. But Wikipedia can explain it far better than I can.Regards,
Andrea Faulds
http://ajf.me/
do not top-post please
I have now taken some time and investigated some with a Makefile created with --disable-all. I noticed that basically everything seems to be compiled using Libtool, no stand-alone GCC at all. Is this normal? In the normal build process, it seems to always build with just GCC quite a lot of time.
Strictly speaking, php’s build system is driven by GNU Autotools (Autoconf, Automake). Makefiles are produced dynamically.
Automake uses libtool for building as it allows to get a nice cross-platform solution. “build with just gcc” won’t work as soon as you leave realm of linux.
Also I have started with basic conversions as well...getting somewhere. So maybe I can provide a PHP script to convert the Makefile to a build.ninja file, as to what I am looking towards to.
There is just one question I have left:
Zend/zend_language_scanner.lo: /Users/Ingwie/Work/drag0n-php/Zend/zend_language_parser.h
Zend/zend_ini_scanner.lo: /Users/Ingwie/Work/drag0n-php/Zend/zend_ini_parser.hDo these lines just mean, that the .lo files depend on named .h files? The only thing I couldnt understand yet.
yes
--
Alexey Zakhlestin
CTO at Grids.by/you
https://github.com/indeyets
PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 29/10/2013 11:28, Alexey Zakhlestin a écrit :
Strictly speaking, php’s build system is driven by GNU Autotools
(Autoconf, Automake). Makefiles are produced dynamically. Automake
uses libtool for building as it allows to get a nice cross-platform
solution. “build with just gcc” won’t work as soon as you leave
realm of linux.
And another important point: the autool stuff is ineherited but all C
extension which use the "phpize" command.
If you change the build system, without being able to build extension
anymore... doesn't make sense (imho).
Remi.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlJvj48ACgkQYUppBSnxahhfXQCfZYXMvW7UFV2xqpVweb/LnFlF
PrcAn01a2srake7B8CszaaNwC+oLFIDu
=j2sH
-----END PGP SIGNATURE
@Remi: I didn't (yet) think about how I can utilize extensions ... but it certainly is possible. Currently, I just want to get the basic stuff started, to get the Makefile converted into build.ninja.
Am 29.10.2013 um 11:35 schrieb Remi Collet remi@fedoraproject.org:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Le 29/10/2013 11:28, Alexey Zakhlestin a écrit :
Strictly speaking, php’s build system is driven by GNU Autotools
(Autoconf, Automake). Makefiles are produced dynamically. Automake
uses libtool for building as it allows to get a nice cross-platform
solution. “build with just gcc” won’t work as soon as you leave
realm of linux.And another important point: the autool stuff is ineherited but all C
extension which use the "phpize" command.If you change the build system, without being able to build extension
anymore... doesn't make sense (imho).Remi.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/iEYEARECAAYFAlJvj48ACgkQYUppBSnxahhfXQCfZYXMvW7UFV2xqpVweb/LnFlF
PrcAn01a2srake7B8CszaaNwC+oLFIDu
=j2sH
-----END PGP SIGNATURE