# Proposal for a PHP-BASED Make facility

- Thread: https://externals.io/message/37658
- Original archive: https://news-web.php.net/php.internals/37658
- Started by Hector Santos on 2008-05-15T04:49:32+00:00
- Messages: 8
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #37658 — Hector Santos — 2008-05-15T04:49:32+00:00

URL: https://externals.io/message/37658#37658

Folks,

It has been suggested to me offlist that I should propose this idea on 
the list.

I've seem recent discussions about the multi-os complexities of the make 
system for PHP, and there talk of using this new CMake system.

Rather than YALTM (yet another language to master, we should have a 
PHP-BASED make facility for the following reasons:

   - PHP is cross platform already making it possible to easily
     and quickly to single source a PHP script based make system.

   - Everyone involved with PHP knows PHP so the scripts will be
     maintained and enhanced by the community.

   - All that is needed with a source distribution or as a
     separate distribution, is a PHPMAKE package that
     might include a root folder:

     phpmake/bin     minimum php binaries for the platform
                     i.e, php.exe, php5ts.dll for windows

     phpmake/scripts php scripts for the cross platform
                     make/build system

The beauty of this is that PHP is already cross platform so everyone 
involved with PHP at every OS have one thing in common, they know the 
PHP language! So there would be no need to learn another MAKE language, 
i.e., CMake, JavaScript, or some *nix make language, and it would offer 
an minimum learning curve for improvements and enhancements by PHP 
contributors where updates will immediately apply across the board for 
all platforms.

It will get people like me more involved to improve the configuration 
and automation of the PHP building process by developing cross platform 
Interactive Console and/or GUI based frontends.

-- 
Hector Santos, CTO
Santronics Software, Inc.

---

## #37659 — Alexey Zakhlestin — 2008-05-15T06:10:39+00:00

URL: https://externals.io/message/37658#37659 · In reply to: #37658

> Folks,
>
> It has been suggested to me offlist that I should propose this idea on the
> list.
>
> I've seem recent discussions about the multi-os complexities of the make
> system for PHP, and there talk of using this new CMake system.
>
> Rather than YALTM (yet another language to master, we should have a
> PHP-BASED make facility for the following reasons:

It was already proposed and declined, because the main complexity is
not actual "scripting" of build-process, but cross-platform
differences. Autotools and CMake already have solutions for these, but
if the build-systems is written from scratch we would have to
"reinvent the wheel"

>
>  - PHP is cross platform already making it possible to easily
>    and quickly to single source a PHP script based make system.
>
>  - Everyone involved with PHP knows PHP so the scripts will be
>    maintained and enhanced by the community.
>
>  - All that is needed with a source distribution or as a
>    separate distribution, is a PHPMAKE package that
>    might include a root folder:
>
>    phpmake/bin     minimum php binaries for the platform
>                    i.e, php.exe, php5ts.dll for windows
>
>    phpmake/scripts php scripts for the cross platform
>                    make/build system
>
> The beauty of this is that PHP is already cross platform so everyone
> involved with PHP at every OS have one thing in common, they know the PHP
> language! So there would be no need to learn another MAKE language, i.e.,
> CMake, JavaScript, or some *nix make language, and it would offer an minimum
> learning curve for improvements and enhancements by PHP contributors where
> updates will immediately apply across the board for all platforms.
>
> It will get people like me more involved to improve the configuration and
> automation of the PHP building process by developing cross platform
> Interactive Console and/or GUI based frontends.
>
> --
> Hector Santos, CTO
> Santronics Software, Inc.
>
>
>
> --
> 
> 
>
>



-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

---

## #37661 — Steph Fox — 2008-05-15T07:09:25+00:00

URL: https://externals.io/message/37658#37661 · In reply to: #37659

Hi Alexey,

> It was already proposed and declined,

This discussion seems to have passed me by... any idea when/where it was 
held?

Thanks,

- Steph

---

## #37662 — johannes@php.net — 2008-05-15T07:14:06+00:00

URL: https://externals.io/message/37658#37662 · In reply to: #37658

Hi,


>    - All that is needed with a source distribution or as a
>      separate distribution, is a PHPMAKE package that
>      might include a root folder:
> 
>      phpmake/bin     minimum php binaries for the platform
>                      i.e, php.exe, php5ts.dll for windows

That's a hen and egg problem then - one would need PHP to build PHP and
we don't have the infrastructure to provide binaries for all the
platforms we support (there's more than Linux and Windows)

And then you have to do quite some work others already did for finding
system difference - and keep the systems database and/or checks up to
date - that's far from our scope.

Please read about what the autotools, cmake and others are doing.

johannes

---

## #37663 — Pierre Joye — 2008-05-15T07:14:39+00:00

URL: https://externals.io/message/37658#37663 · In reply to: #37658

hi,


> Folks,
>
> It has been suggested to me offlist that I should propose this idea on the
> list.
>
> I've seem recent discussions about the multi-os complexities of the make
> system for PHP, and there talk of using this new CMake system.

It is not talks, it is a google summer of code project:

http://wiki.php.net/gsoc/2008

He has already began and he is doing great progress.


Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #37665 — Alexey Zakhlestin — 2008-05-15T08:11:02+00:00

URL: https://externals.io/message/37658#37665 · In reply to: #37661

> Hi Alexey,
>
> > […]
>
> This discussion seems to have passed me by... any idea when/where it was
> held?

I guess I made it sound too "loud". I remembered it to be larger than it was ;)
http://marc.info/?l=php-internals&m=120600893618730&w=4


-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

---

## #37667 — johannes@php.net — 2008-05-15T10:17:26+00:00

URL: https://externals.io/message/37658#37667

Hi,


> > […]
> 
> That's what I thought too, but you still still have the same 
> (chicken/egg) issues of PHP being dependent on what OS the 
> AutoTools/CMake facility works on.
> 
> The basic requirement of being able to port the minimal set of PHP files 
>   for an OS would still need to required in either case.
> 
> If the porting is simpler for autotools/cmake than raw PHP, then I can 
> see that as a plus.

Well the difference ist: For an own build system _we_ do to have it our
own and verify it on each platform, autotools/cmake are used by lots of
other projects with many many more contributors which keeps the things
running. Additional most OS packagers add these tool to their packages
themselves as they are essentially for compiling basically anything. 

Without autotools you can't compile many stuff PHP depends on on the
platform so the autotools have to be ported anyways before PHP can be
build there....

> Personally, as a side note, I think PHP makes should be separated (each 
> using a common/structure methodology for PHP).  I'm still catching up, 
> but there seems to to be a tremendous amount of complexity when trying 
> to auto configure and build it all as one big make. For example, it 
> would be ideal, IMO, if I can do:
> 
>         domake MYEXTENSION
>         domake PDO
>         domake MYSQL
>         domake PHP5TS_DLL
>         domake OFFICIAL_RELEASE_MODULES_ONLY
>         domake ALL

build extensions shared (--with-foo=shared) then you can do "make
$target" where target might be modules/$extension.so so it's all there
and works in a way everybody used to the autotools way of doing things
can understand witrhout reading any documentation. An own system would
need lot's of documentation so Joe Admin can compile it the way he wants
it.

> and not worry about all the erroneous errors and warnings you might get 
> with its attempt to build other parts that you don't need to rebuild.

make only compiles the things it has to compile for building the
specified target, if your target is all (which is the default) it
compiles the php executables and all modules requested (if sources have
changed after the last build).

In the end: our build system works (mostly) and I doubt a PHP based
system can fix the remaining issues in a sane way, especially not
without making it more complex. Every *nix admin knows how to use
autotools, no admin knows about PHP and a PHP-specific build system and
that's the main target group for a build system.

johannes

---

## #37679 — Alejandro Leiva — 2008-05-16T15:14:46+00:00

URL: https://externals.io/message/37658#37679 · In reply to: #37667

El 15/05/2008, a las 12:17, Johannes Schlüter escribió:
> Hi,
>
> 
> > […]
>
> Well the difference ist: For an own build system _we_ do to have it  
> our
> own and verify it on each platform, autotools/cmake are used by lots  
> of
> other projects with many many more contributors which keeps the things
> running. Additional most OS packagers add these tool to their packages
> themselves as they are essentially for compiling basically anything.
>
> Without autotools you can't compile many stuff PHP depends on on the
> platform so the autotools have to be ported anyways before PHP can be
> build there....


+1

Take other path is shoot yourself in the foot. Autotools and CMake are  
very mature and take care of many problems across differents  
architectures.

Regards,
--
Alejandro Leiva
