Commit Graph

336 Commits

Author SHA1 Message Date
Peter Kokot
3207741df0 Refactor PHP_PROG_BISON and PHP_PROG_RE2C
This patch refactors these macros to also checks for the required given
versions of bison and re2c.

- PHP_PROG_RE2C and PHP_PROG_BISON take optional args - minmimum version
  required, and bison also excluded versions.
- Instead of caching values this uses manual checking and messaging
  outputs.
- It looks like the minimum version of RE2C 0.13.4 is working ok so far.

The genfiles script improvements:
- Add make override in genfiles
- Move checkings from makedist to genfiles
- Refactored output messages
- Various minor enhancements
2019-03-30 02:01:02 +01:00
Peter Kokot
864366ef20 Upgrade deprecated directives and use non-posix bison
With Bison 3.0 some directives are deprecated:
- %name-prefix "x" should be %define api.prefix {x}
- %error-verbose should be %define parse.error verbose

Bison 3.3 also started emiting more warnings and since PHP souce parsers
are not POSIX compliant this patch fixes this as pointed out via
495a46aa1d.
2019-03-19 20:29:20 +01:00
Peter Kokot
abfab2148d Leave bundled generated files untouched
When building lexer and parser files leave bundled files untouched as
are tracked in the Git. *.orig files also don't need to be cleaned
anymore.
2019-03-18 23:02:57 +01:00
Peter Kokot
e525ce30a5 Move distribution generator script to scripts/dev
The more proper place for shell scripts dedicated for development, and
releasing PHP should be the scripts/dev directory. Having a cleaner root
project directory helps find the main README.md and files relevant to
install PHP.

These scripts are also used by the release managers mostly who create
release packages and aren't used often by the majority of developers
working on and installing PHP.
2019-03-16 23:51:05 +01:00
Peter Kokot
78596973b3 Make credits script executable from other paths 2019-03-16 01:37:34 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
2957651c5c Move Makefile.global and Makefile.gcov to build directory
These files can be stored in the build directory instead of bloating the
project root directory.
2019-03-04 12:30:42 +01:00
Peter Kokot
1c32d751c7 Remove mkinstalldirs, install-sh and missing
These scripts are part of Automake [1] and are in current *nix build
system not used anymore nor empty files need to be created.

[1] https://www.gnu.org/software/automake/manual/html_node/Auxiliary-Programs.html
2019-03-04 12:10:50 +01:00
Peter Kokot
6bb657fc34 Remove AC_PROG_CC_C_O
The AC_PROG_CC_C_O macro checks if compiler can use both -c and -o
options together and if not it defines the NO_MINUS_C_MINUS_O symbol.
It is not used in current codebase and therefore removed.
2019-03-03 14:47:49 +01:00
Peter Kokot
3aeb7b0e77 Remove deprecated PHP_EXTENSION m4 macro
The PHP_EXTENSION macro was used before the introduction of the updated
build system in the 9d9d39a0de. The
extensions at that time possibly still used the Makefile.in and Automake
and the PHP_EXTENSION macro has been replaced with the PHP_NEW_EXTENSION
macro.

Today, the once deprecated macro can be removed in favor of only
PHP_NEW_EXTENSION macro.
2019-02-27 20:12:53 +01:00
Nikita Popov
e53e753c0e Support passing single file to bless_tests.php
Or a mix of multiple directories/files. Also make the file executable.
2019-02-20 12:45:27 +01:00
Nikita Popov
cc0e01a2fa Handle exception patterns in bless_tests.php 2019-02-18 11:03:38 +01:00
Peter Kokot
e0c88039b6 Move some scripts from root directory to scripts/dev/
At the time of this commit, there is a dedicated folder for development
related tools and such scripts might fit better there to not bloat the
project root directory too much.

Move snapshot to scripts/dev/snapshot
2019-02-16 16:58:48 +01:00
Nikita Popov
7a17be7f31 Add bless_tests.php
Helper script to perform certain kinds of trivial test updates.
2019-02-11 15:35:34 +01:00
Peter Kokot
c245898bfa Update and fix remaining year ranges (2019)
This patch follows previous license year ranges updates. With new
approach source code files now have simplified headers with license
information without year ranges.
2019-02-08 23:14:29 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Nikita Popov
8eeb1102d0 Avoid mention of php7 in credits script 2019-01-28 11:26:45 +01:00
Peter Kokot
7e445ef3b1 Set AC_CONFIG_AUX_DIR to build directory
The Autoconf macro AC_CONFIG_AUX_DIR can set the location of the
auxiliary build tools such as config.guess, config.sub, and bundled
libtool scripts and moves these bundled files from the root directory
to the build subdirectory.

Additionally some changes in this context or as a part of obsoletion:
- The LT_TARGETS variable in build/build2.mk file was once used as a part
  of the Automake step. It's not used anymore and has been refactored to
  separate makedist script directly.
- ltconfig is not used anymore since libtool 1.4+
  cf8d1563c2
- phpize file locations for the config.guess, config.sub, and ltmain.sh
  has been refactored accordingly.
2018-12-10 08:11:44 +01:00
Eli Schwartz
2d03197749 ext/gd: Use pkg-config to detect the availability of freetype2
The latest version of freetype2 does not install freetype-config by
default, but pkg-config support has been there for approximately 15
years. In order to reliably detect freetype2, pkg-config *must* be used.

See:
https://savannah.nongnu.org/bugs/?53093
https://bugs.php.net/bug.php?id=76324
2018-11-07 13:05:47 +01:00
Peter Kokot
addcf2402d Remove mkdep.awk
The `mkdep.awk` file was part of the previous *nix build system and was
used to create a .deps file with a list of dependencies that could be
processed by Automake further on.

Newer build system was done via 9d9d39a0de
and outdated files removed via 22815419f8
so the current file in the PHP source code is not used anymore.

Additionally, the *.slo files were processed by this file. The *.slo
files also used to be generated by older libtool so today, these don't
get generated anymore.
2018-10-20 10:08:54 +02:00
Peter Kokot
1257664ca2 Merge branch 'PHP-7.3'
* PHP-7.3:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
  [ci skip] Update NEWS
  Fix #77035: The phpize and ./configure create redundant .deps file
2018-10-19 00:12:48 +02:00
Peter Kokot
74131ca342 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
  Fix #77035: The phpize and ./configure create redundant .deps file
2018-10-19 00:10:22 +02:00
Peter Kokot
5531dde5e9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
  Fix #77035: The phpize and ./configure create redundant .deps file
2018-10-19 00:07:42 +02:00
Peter Kokot
447b41f6bb Fix #77035: The phpize and ./configure create redundant .deps file
The `.deps` file(s) was once used by Automake and created to write
dependencies to it. The file creation has been removed via the commit
779c11af21.

The phpize and ./configure script create a redundant .deps file in a
PECL extension directory which might cause confusions why is it used.
Today it is no longer relevant so this redundant artefact can be
removed in the phpize configure script.
2018-10-19 00:02:09 +02:00
Peter Kokot
066b5b7881 Remove some obsolete config_vars.mk occurrences
The `config_vars.mk` file was a part of previous *nix build system and
has been removed via 9d9d39a0de.
2018-10-16 18:05:06 +02:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
03f3b8479b Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:51:01 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
9bbf9967bd Modernize the AC_PRESERVE_HELP_ORDER macro call
The Autoconf AC_PRESERVE_HELP_ORDER macro has been available since
Autoconf 2.59c [1] and in PHP it has been called conditionally on two places
to support older Autoconf versions. With recent updates and the macro
can be called unconditionally.

[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
2018-10-11 12:58:41 +02:00
Peter Kokot
77c85b3119 Merge branch 'PHP-7.3'
* PHP-7.3:
  [ci skip] Update UPGRADING about Autoconf version
  Bump minimum Autoconf requirement to 2.68
2018-10-09 21:17:19 +02:00
Peter Kokot
0b0d4b5f0d Bump minimum Autoconf requirement to 2.68
This patch syncs and bumps the minimum required version of Autoconf for
the `phpize.m4` script and the main `configure.ac` from previously mixed
2.64 and 2.59 to 2.68.

At the time of this writing Autoconf 2.63 is still the version on
Centos 6, however by the PHP 7.3 release current systems out there
should all have pretty much updated Autoconf versions to 2.64+ at
least. Centos 7 already has Autoconf 2.69, for example.

This provides more options to update and get current with the *nix
build system and also avoids broken builds in certain cases as pointed
out in the relevant discussion [1].

Additionally, phpize also already provides the `AX_CHECK_COMPILE_FLAG`
Autoconf Archive m4 file that has Autoconf 2.64 minimum requirement.

Autoconf 2.68 was released in 2010, 8 years ago, relative to this patch.

[1] https://github.com/php/php-src/pull/3562
2018-10-09 21:06:10 +02:00
Anatol Belski
8a5ababea2 Add missing packaging entries 2018-10-08 18:42:09 +02:00
Peter Kokot
02294f0c84 Make PHP development tools files and scripts executable
This patch makes several scripts and PHP development tools files
executable and adds more proper shebangs to the PHP scripts.

The `#!/usr/bin/env php` shebang provides running the script via
`./script.php` and uses env to find PHP script location on the system.
At the same time it still provides running the script with a user
defined PHP location using `php script.php`.
2018-08-29 20:58:17 +02:00
Christoph M. Becker
23aa355bf2 Merge branch 'PHP-7.3'
* PHP-7.3:
  Remove some old parts of the php
2018-08-25 11:58:50 +02:00
Peter Kokot
fcf4088d3f Remove some old parts of the php
Since ba138a3746 the generate-phpt library
has been unbundled from the php-src. This patch cleans two remaining
parts.
2018-08-25 11:58:17 +02:00
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Peter Kokot
daaf706df0 Upgrade deprecated AC_OUTPUT macro calls
Autoconf 2.50 made several changes to macro calls. These include also
arguments passed to AC_OUTPUT macro. The upgrading chapter in Autoconf
documentation include an example of using AC_OUTPUT with
AC_CONFIG_FILES and AC_CONFIG_COMMANDS:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html

PHP 5.4 to 7.1 require Autoconf 2.59+, PHP 7.2+ require Autoconf 2.64+,
and PHP 7.2 phpize script requires Autoconf 2.59+ which are all greater
than above mentioned 2.50 version. Systems out there should well support
this by now.

This patch was created with the help of autoupdate script:
autoupdate <file>

More info on where exactly this got deprecated:
- ftp://ftp.gnu.org/old-gnu/Manuals/autoconf-2.13/html_mono/autoconf.html
- ftp://ftp.auckland.ac.nz/pub/gnu/Manuals/autoconf-2.52/html_chapter/autoconf_15.html
- http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
2018-07-29 16:04:39 +02:00
Peter Kokot
cf3b852109 Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Kalle Sommer Nielsen
ba138a3746 Removed the generated-tests library, this is a left Zöe's phpruntests repository it seems and never fully implemented. The only times this part of the code has been touched throughout the years has been minor PRs and entire php-src grep commits.
If anything this belongs to the phpruntests.git repository.
2018-07-23 17:38:26 +02:00
Peter Kokot
491f1477be Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS
Autoconf doesn't mention the AC_CONFIG_HEADER macro since the v2.13
released in 1999 anywhere in the documentation. Future of this macro is
unclear and commented as possible candidate for obsoletion in the
autoconf source code. Since it is just a wrapper around the main
AC_CONFIG_HEADERS macro, the functionality is the same, and also more
clear to find it in the autoconf documentation and avoid possible future
obsoletion.
2018-07-07 12:10:53 +02:00
Christoph M. Becker
3f16a43d74 [ci skip] Remove trailing WS
Since commit 2238403 removed respective trailing WS in files generated
by this script, we remove the trailing WS in the first place, to avoid
further mundane merge conflicts.

[1] http://git.php.net/?p=php-src.git;a=commit;h=2238403892ccf87143a59814538d9f764509d9e7
2018-06-05 00:21:36 +02:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Gabriel Caruso
c0ef58e9fe Simplify returns in generate-phpt 2018-01-26 22:19:08 +01:00
Xinchen Hui
518a9f8bfd Fixed build extension by phpize 2018-01-17 15:09:04 +08:00