summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-18 08:56:38 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-24 16:20:52 +0200
commit0b63544f25adc6517fc221ee925ff6f94b84d47d (patch)
tree9b1029a00bf7efdadb3034faf95a7d446079fa11 /.gitignore
parentb6ef8998d5ed8bc501a39a624c0d989ecd5a75d4 (diff)
downloadphp-git-0b63544f25adc6517fc221ee925ff6f94b84d47d.tar.gz
Normalize .gitignore
Changes: - Added introductory paragraph to explain the file for newcomers and where to ignore local editor configurations as a common practice when using Git. - Patterns organized into several main context sections for a better overview of the php-src directory structure and which files get generated where. - Added comments describing reasons for ignoring particular file(s). - Patterns normalized according to Git ignore blob patterns. Absolute paths are different than relative paths and similar fixes. - Folders patterns have appended ending slash for readability to distinguish them from files. Removed ignore patterns: - Removed `sapi/phpdbg/build` pattern since it doesn't seem to be relevant anymore in the php-src repository. - The `acconfig.h` pattern removed in favor of the more recent Autoconf versions. - Removed patterns for `.FBCIndex` `.FBCLockFolder` folders. These were generated on old Mac OS systems [1] using the Sherlock [2] software and can be today ignored using a global gitignore file if needed. Newer macOS systems don't generate these anymore. - Removed `php_version.h` pattern since the `main/php_version.h` file is tracked by Git. - Removed `*.mk` pattern since few *.mk files are tracked by Git and new ones aren't generated during build process. - Removed `**/tests/**/*.txt` pattern. This has been refactored via 595a395cb911a4ef54cbaf11cd0056d38316c87c and current tests also clean the generated `*.txt` files as soon as they are executed. Since there are several `*.txt` files in the repository tracked by Git already and renaming them would be counter productive so the pattern is now removed. In case there will be a need to adjust it, we can rename the generated `*.txt` into something else instead (ideally into `*.tmp`) to not conflict with already tracked `*.txt` files in tests. - Removed `ext/*/scan_makefile_in.awk` and `scan_makefile_in.awk` patterns since these are already included in the `/ext/*/build/` pattern. - Removed the `/ext/*/libs.mk` pattern since these auxilary Makefiles have been used in previous build system and made obsolete via the commit 9d9d39a0de3bec962c343051011f5a2ed7d7b242. - Removed pattern for configuration header `ext/pdo_sqlite/sqlite3.h` since it is not generated anymore in the current code. - Removed `main/streams/build-defs.h` pattern since this file is not generated. - Removed `test.php3` pattern. These don't seem to be present in the current PHP source code nor used since PHP 3. - Removed `/ext/oci8/tests/*.vglog` pattern since the tests don't seem to produce these files. - Removed pattern for Visual Studio's `*.ncb` files. Since the Visual Studio 2010 they are no longer used. - Removed `ext/sqlite3/tests/phpsql*` pattern. It was part of the `ext/sqlite/tests`. - Removed `shlibtool` pattern since the shlibtool file is not generated anymore. It was once part of the libtool usage and customized naming used in the previous build system in Makefiles. Such naming was later removed and only libtool was used. - Removed `meta_ccld` pattern since it is no longer relevant via a5b55416f4bf48e475b30bb86b120c83efccca53 - Pattern `meta_cc` has been removed via e5176fe60a9ffbe211ee016acdcddb18118e4487. - Pattern `dynlib.m4` removed since the file is no longer generated via 9d9d39a0de3bec962c343051011f5a2ed7d7b242 - Pattern `debug.log` removed since the Autoconf Macro PHP_DEBUG_MACRO is not called anymore and this file not generated anymore. - Pattern `results.txt` removed. It was once part of the logging results of test files by Netware and previous Windows builds. - Removed `_libs` pattern in favor of only `.libs`. These directories were once generated by Automake and Libtool on systems that didn't support the dot folder `.libs` (MS-DOS). - Removed `*.opt` pattern since it was used by Visual Studio 6. Later versions of Visual Studio don't use these anymore. - Removed `*.plg` pattern. It was build log generated by Visual Studio 6. - Removed `core` pattern since it was probably related to commit fd7153b0f3047e6a96344dc3b4ca2632d5acc898 and is today not used. - Removed ˙*.˙, ˙diff`, and ˙*.tgz` patterns since they don't seem to be generated in the current code on the first glance. In case these will be one day required to ignore again, they can be simply added back again. - Removed Emacs specific interlock files pattern `.#*`. The number of editors and IDEs specific files is very big. Emacs editors also produce some other files such as `#*#` for autosave feature, which were previously not ignored. To fully and properly support all additional patterns these could be added to .gitignore files. A much more sustainable and better practice is to use a global gitignore file on the local system or the `.git/info/exclude` per repository basis for these in particular. Added patterns: - Added new pattern for `*.obj` standard object files in the Windows section. These are generated by Visual Studio. - Added `/ext/*/run-tests.php` patterns for extensions. - Reversed patterns for particular tracked `/win32/build/Makefile`, `config.h` files and `.patch` files. - Added patterns for generated dtrace files `/ext/oci8/oci8_dtrace_gen.h` Other changes: - All `conftest*` patterns merged into a single one. - Pattern `*.mem` made more specific where the memory check files get generated by `run-tests.php -m`, i.e. `**/tests/**/*.mem`. - Fixed `/Zend/zend_dtrace_gen.h.bak` `hbak` typo. [1] http://www.westwind.com/reference/OS-X/invisibles.html [2] https://en.wikipedia.org/wiki/Sherlock_(software)
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore405
1 files changed, 251 insertions, 154 deletions
diff --git a/.gitignore b/.gitignore
index a23f574fef..b77c69880d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,177 +1,228 @@
-# General ignores
+# These files are generated during building or development and are intentionally
+# untracked to ignore by Git. For other development environment specific files,
+# such as editor configuration, a good practice is to exclude them using the
+# .git/info/exclude in the cloned repository or a global .gitignore file.
+
+# ------------------------------------------------------------------------------
+# Common files ignored across the repository
+# ------------------------------------------------------------------------------
+
+# Backup copies created by various editors or development tools
*~
-.#*
-*.
-*.mk
-*.mem
-*.gcda
-*.gcno
+
+# Patches downloaded to patch files or to apply open source contributions
+*.patch
+
+# Swap files created by editors and tools to indicate a locked file
+*.swp
+
+# ------------------------------------------------------------------------------
+# Generated by the PHP build system
+# ------------------------------------------------------------------------------
+
+# Archive library containing .o files, generated during build process
+*.a
+
+# Libtool library files generated during build process
*.la
+
+# Directories created by Libtool for storing generated library files
+.libs/
+
+# Library object files generated during build process
*.lo
+
+# Temporary library object files generated by compiler and libtool due to failure
*.loT
+
+# Standard object files generated during build process
*.o
-*.a
-*.ncb
-*.opt
-*.plg
-*swp
-*.patch
-*.tgz
-*.tar.gz
-*.tar.bz2
-*.tar.xz
-*.tar.gz.asc
-*.tar.bz2.asc
-*.tar.xz.asc
-.FBCIndex
-.FBCLockFolder
-.libs
-phpt.*
-core
-dynlib.m4
-Makefile
-Makefile.fragments
-Makefile.objects
-_libs
-acconfig.h
+
+# Generated by `./buildconf` or `phpize`
aclocal.m4
-autom4te.cache
-buildmk.stamp
-confdefs.h
-config.h
+
+# Cache directories generated by Autoconf tools - autoconf, autoreconf...
+autom4te.cache/
+
+# Stamp file generated by `./buildconf` to run `./build/buildcheck.sh`
+/buildmk.stamp
+
+# Cache file(s) generated by Autoconf's configure when run as `configure -C`
config.cache
-config.h.in
+
+# A log file(s) generated by Autoconf during *nix build system
config.log
+
+# Helper(s) generated by *nix build system to save the last configure command
config.nice
+
+# Generated by Autoconf's configure script for instantiating templates
config.status
+
+# Main *nix build system configuration script(s) generated by Autoconf
configure
-conftest
-conftest.c
-debug.log
-diff
-generated_lists
-include
-install-sh
-internal_functions.c
-lcov_data
-lcov_html
-libs
+
+# Generated by `./configure` when test programs create temporary files
+confdefs.h
+conftest*
+
+# Generated by `./buildconf` script as a helper for further build/build2.mk file
+/generated_lists
+
+# Generated by configure scripts on all systems
+/main/internal_functions.c
+/main/internal_functions_cli.c
+
+# The Libtool script(s) generated by the *nix build system
libtool
-meta_cc
-meta_ccld
+
+# Makefile(s) generated from Makefile fragment templates by `./configure`
+Makefile
+Makefile.fragments
+Makefile.objects
+
+# Generated by `./buildconf` or `cd ext/name && phpize`
+install-sh
missing
mkinstalldirs
-modules
+
+# RPM specification file generated by `./configure`
+/php7.spec
+
+# Directories for shared object files and headers generated by `./configure`
+include/
+libs/
+modules/
+
+# ------------------------------------------------------------------------------
+# Configuration headers generated by the PHP build system
+# ------------------------------------------------------------------------------
+config.h
+config.h.in
+/ext/date/lib/timelib_config.h
+/ext/iconv/php_have_bsd_iconv.h
+/ext/iconv/php_have_glibc_iconv.h
+/ext/iconv/php_have_ibm_iconv.h
+/ext/iconv/php_have_iconv.h
+/ext/iconv/php_have_libiconv.h
+/ext/iconv/php_iconv_aliased_libiconv.h
+/ext/iconv/php_iconv_broken_ignore.h
+/ext/iconv/php_iconv_supports_errno.h
+/ext/iconv/php_php_iconv_h_path.h
+/ext/iconv/php_php_iconv_impl.h
+/ext/mbstring/oniguruma/oniguruma.h
+/main/build-defs.h
+/main/php_config.h.in
+/main/php_config.h
+/TSRM/tsrm_config.h
+/Zend/zend_config.h
+
+# ------------------------------------------------------------------------------
+# Manual (man 1 and 8) pages generated from templates for *nix alike systems
+# ------------------------------------------------------------------------------
+/ext/phar/phar.1
+/ext/phar/phar.phar.1
+/sapi/cgi/php-cgi.1
+/sapi/cli/php.1
+/sapi/fpm/php-fpm.1
+/sapi/fpm/php-fpm.8
+/sapi/phpdbg/phpdbg.1
+/scripts/man1/*.1
+
+# ------------------------------------------------------------------------------
+# SAPIs specific ignores
+# ------------------------------------------------------------------------------
+/sapi/apache2handler/libphp7.module
+/sapi/fpm/fpm/php-cgi
+/sapi/fpm/init.d.php-fpm
+/sapi/fpm/php-fpm.conf
+/sapi/fpm/php-fpm.service
+/sapi/fpm/status.html
+/sapi/fpm/www.conf
+
+# ------------------------------------------------------------------------------
+# Executable binaries and scripts generated during the build process
+# ------------------------------------------------------------------------------
+/ext/phar/phar.phar
+/ext/phar/phar.php
+/pear/install-pear-nozlib.phar
+/sapi/cgi/php-cgi
+/sapi/fpm/php-fpm
+/sapi/phpdbg/phpdbg
+/scripts/php-config
+/scripts/phpize
php
-php7.spec
-php_lcov.info
-php_test_results_*.txt
-php_version.h
-results.txt
-shlibtool
-test.php3
-tmp-php.ini
-scan_makefile_in.awk
-main/php_config.h
-main/php_config.h.in
-main/build-defs.h
-main/internal_functions_cli.c
-main/config.w32.h
-main/streams/build-defs.h
-pear/install-pear-nozlib.phar
-sapi/apache2handler/libphp7.module
-sapi/cgi/php-cgi
-sapi/cgi/php-cgi.1
-sapi/cli/php.1
-sapi/fpm/php-fpm
-sapi/fpm/php-fpm.1
-sapi/fpm/init.d.php-fpm
-sapi/fpm/php-fpm.conf
-sapi/fpm/fpm/php-cgi
-sapi/fpm/php-fpm.8
-sapi/fpm/php-fpm.service
-sapi/fpm/status.html
-sapi/fpm/www.conf
-sapi/phpdbg/phpdbg_parser.c
-sapi/phpdbg/phpdbg_parser.h
-sapi/phpdbg/phpdbg
-sapi/phpdbg/phpdbg.1
-sapi/phpdbg/build
-sapi/phpdbg/*.output
-scripts/php-config
-scripts/phpize
-scripts/man1/*.1
-TSRM/tsrm_config.h
-win32/build/deplister.exe
-win32/build/deplister.obj
-win32/*.suo
-win32/*.aps
-win32/*.positions
-win32/ext
-win32/phpts.def
-win32/wsyslog.h
-Zend/zend_config.h
-Zend/zend_dtrace_gen.h
-Zend/zend_dtrace_gen.hbak
-Zend/zend_ini_parser.c
-Zend/zend_ini_parser.h
-Zend/zend_ini_parser.output
-Zend/zend_language_parser.c
-Zend/zend_language_parser.h
-Zend/zend_language_parser.output
-
-# Extension specific ignores
-ext/*/configure.ac
-ext/*/ltmain.sh
-ext/*/libs.mk
-ext/*/build
-ext/*/scan_makefile_in.awk
-ext/*/Makefile.global
-ext/*/acinclude.m4
-ext/*/config.guess
-ext/*/config.sub
-ext/date/lib/timelib_config.h
-ext/iconv/php_have_bsd_iconv.h
-ext/iconv/php_have_ibm_iconv.h
-ext/iconv/php_have_libiconv.h
-ext/iconv/php_php_iconv_h_path.h
-ext/iconv/php_have_glibc_iconv.h
-ext/iconv/php_php_iconv_impl.h
-ext/iconv/php_have_iconv.h
-ext/iconv/php_iconv_supports_errno.h
-ext/iconv/php_iconv_broken_ignore.h
-ext/iconv/php_iconv_aliased_libiconv.h
-ext/mbstring/oniguruma/oniguruma.h
-ext/oci8/tests/*.vglog
-ext/pdo/conftest*
-ext/pdo_firebird/conftest*
-ext/pdo_mysql/conftest*
-ext/pdo_oci/conftest*
-ext/pdo_odbc/tests/*.mdb
-ext/pdo_pgsql/conftest*
-ext/pdo_sqlite/conftest*
-ext/pdo_sqlite/sqlite3.h
-ext/phar/phar.phar
-ext/phar/phar.1
-ext/phar/phar.phar.1
-ext/phar/phar.php
-ext/sqlite3/tests/phpsql*
-
-# ------------------------------------------------------------------------------ Windows
+
+# ------------------------------------------------------------------------------
+# PHP parser files generated by bison during the build process
+# ------------------------------------------------------------------------------
+/sapi/phpdbg/phpdbg_parser.c
+/sapi/phpdbg/phpdbg_parser.h
+/sapi/phpdbg/phpdbg_parser.output
+/Zend/zend_ini_parser.c
+/Zend/zend_ini_parser.h
+/Zend/zend_ini_parser.output
+/Zend/zend_language_parser.c
+/Zend/zend_language_parser.h
+/Zend/zend_language_parser.output
+
+# ------------------------------------------------------------------------------
+# Extensions files additionally generated by `cd ext/name && phpize && ./configure`
+# ------------------------------------------------------------------------------
+/ext/*/acinclude.m4
+/ext/*/build/
+/ext/*/config.guess
+/ext/*/config.sub
+/ext/*/configure.ac
+/ext/*/ltmain.sh
+/ext/*/Makefile.global
+/ext/*/run-tests.php
+
+# ------------------------------------------------------------------------------
+# Generated by Windows build system
+# ------------------------------------------------------------------------------
+
# Generated by `/buildconf.bat`
/configure.bat
/configure.js
# Generated by `/configure.(bat|js)` (architecture dependend)
/config.nice.bat
+
+# NTS debug build x86
/Debug/
+
+# ZTS debug build x86
/Debug_TS/
+
+# NTS build x86
/Release/
+
+# ZTS build x86
/Release_TS/
+
+# Generated by x64 compiler, includes Debug, Debug_TS, Release, Release_TS
/x64/
-# ------------------------------------------------------------------------------ Tests
-# Generated by `/run-tests.php` upon failure
+# Miscellaneous files generated by Windows build sytem
+/main/config.w32.h
+/win32/build/deplister.exe
+/win32/build/deplister.obj
+/win32/*.aps
+/win32/*.positions
+/win32/*.suo
+/win32/ext
+/win32/phpts.def
+/win32/wsyslog.h
+
+# Standard object files generated by Visual Studio
+*.obj
+
+# ------------------------------------------------------------------------------
+# Tests
+# ------------------------------------------------------------------------------
+
+# Generated by `./run-tests.php` upon failure
**/tests/**/*.diff
**/tests/**/*.out*
**/tests/**/*.php
@@ -179,13 +230,59 @@ ext/sqlite3/tests/phpsql*
**/tests/**/*.log
**/tests/**/*.sh
-# Used by some test cases.
+# Generated by some test cases
**/tests/**/*.db
-**/tests/**/*.txt
**/tests/**/*.tmp
-# Special cases to invert previous ignore rules
-!ext/fileinfo/libmagic.patch
-!ext/fileinfo/magicdata.patch
-!ext/mbstring/oniguruma.patch
-!ext/pcre/pcre2lib/config.h
+# Microsoft Access database created for passing to tests
+/ext/pdo_odbc/tests/*.mdb
+
+# Files generated by `./run-tests.php -m` when checking for memory leaks
+**/tests/**/*.mem
+
+# Test results generated by `./run-tests.php`
+php_test_results_*.txt
+
+# Temporary POST data placeholder files generated by `./run-tests.php`
+phpt.*
+
+# Temporary PHP INI configuration file(s) for tests, generated by `make test`
+tmp-php.ini
+
+# ------------------------------------------------------------------------------
+# Generated by GCC's gcov and LCOV via Makefile.gcov and gcov.php.net
+# ------------------------------------------------------------------------------
+*.gcda
+*.gcno
+/lcov_data/
+/lcov_html/
+/php_lcov.info
+
+# ------------------------------------------------------------------------------
+# Archives generated during the PHP release process
+# ------------------------------------------------------------------------------
+/*.tar.gz
+/*.tar.bz2
+/*.tar.xz
+/*.tar.gz.asc
+/*.tar.bz2.asc
+/*.tar.xz.asc
+
+# ------------------------------------------------------------------------------
+# Generated by `./configure --enable-dtrace` for using DTrace framework
+# ------------------------------------------------------------------------------
+/ext/oci8/oci8_dtrace_gen.h
+/ext/oci8/oci8_dtrace_gen.h.bak
+/Zend/zend_dtrace_gen.h
+/Zend/zend_dtrace_gen.h.bak
+
+# ------------------------------------------------------------------------------
+# Special cases to invert previous ignore patterns
+# ------------------------------------------------------------------------------
+!/ext/bcmath/libbcmath/src/config.h
+!/ext/fileinfo/libmagic/config.h
+!/ext/fileinfo/libmagic.patch
+!/ext/fileinfo/magicdata.patch
+!/ext/mbstring/oniguruma.patch
+!/ext/pcre/pcre2lib/config.h
+!/win32/build/Makefile