FAQ
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.

Search Discussions

  • Andrea Faulds at Oct 28, 2013 at 7:14 pm

    On 27/10/13 18:30, Kevin Ingwersen wrote:
    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/
  • Kevin Ingwersen at Oct 29, 2013 at 10:13 am
    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>:
    On 27/10/13 18:30, Kevin Ingwersen wrote:
    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/

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: http://www.php.net/unsub.php
  • Alexey Zakhlestin at Oct 29, 2013 at 10:28 am
    do not top-post please
    On 29 окт. 2013 г., at 14:13, Kevin Ingwersen wrote:

    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.h

    Do these lines just mean, that the .lo files depend on named .h files? The only thing I couldnt understand yet.
    yes
  • Remi Collet at Oct 29, 2013 at 10:36 am

    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.
  • Kevin Ingwersen at Oct 29, 2013 at 11:16 am
    @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: 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.




    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: http://www.php.net/unsub.php

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedOct 27, '13 at 6:30p
activeOct 29, '13 at 11:16a
posts6
users4
websitephp.net

People

Translate

site design / logo © 2022 Grokbase