From 91996e7ee504311ff4eca9dbd5840114f75acbad Mon Sep 17 00:00:00 2001 From: Kevin Abel Date: Sun, 8 Jul 2018 20:37:21 -0500 Subject: [PATCH] Fix bug 76595: Update phpdbg man page Send phpdbg.1 man page through configure replacements Update phpdbg.1 man page to include all options Fixes formatting to be more consistent with php.1 Fix paragraph whitespace and ignore phpdbg.1 --- .gitignore | 1 + Makefile.global | 2 +- sapi/phpdbg/config.m4 | 8 ++- sapi/phpdbg/phpdbg.1 | 59 ---------------- sapi/phpdbg/phpdbg.1.in | 150 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 157 insertions(+), 63 deletions(-) delete mode 100644 sapi/phpdbg/phpdbg.1 create mode 100644 sapi/phpdbg/phpdbg.1.in diff --git a/.gitignore b/.gitignore index bb6c1a6c438..2e95e2510f8 100644 --- a/.gitignore +++ b/.gitignore @@ -274,6 +274,7 @@ sapi/fpm/fpm/php-cgi sapi/phpdbg/phpdbg_parser.c sapi/phpdbg/phpdbg_parser.h sapi/phpdbg/phpdbg +sapi/phpdbg/phpdbg.1 scripts/php-config scripts/phpize scripts/man1/*.1 diff --git a/Makefile.global b/Makefile.global index 6b49f3844fc..5728060e3cb 100644 --- a/Makefile.global +++ b/Makefile.global @@ -121,7 +121,7 @@ distclean: clean rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h rm -f php7.spec main/build-defs.h scripts/phpize rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak - rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1 + rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1 rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html rm -f 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_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h rm -f ext/phar/phar.phar ext/phar/phar.php diff --git a/sapi/phpdbg/config.m4 b/sapi/phpdbg/config.m4 index 9fb4e629844..223c1827f18 100644 --- a/sapi/phpdbg/config.m4 +++ b/sapi/phpdbg/config.m4 @@ -27,17 +27,17 @@ if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS" fi - + PHP_SUBST(PHP_PHPDBG_CFLAGS) PHP_SUBST(PHP_PHPDBG_FILES) PHP_SUBST(PHPDBG_EXTRA_LIBS) - + PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/phpdbg/Makefile.frag], [$abs_srcdir/sapi/phpdbg], [$abs_builddir/sapi/phpdbg]) PHP_SELECT_SAPI(phpdbg, program, $PHP_PHPDBG_FILES, $PHP_PHPDBG_CFLAGS, [$(SAPI_PHPDBG_PATH)]) BUILD_BINARY="sapi/phpdbg/phpdbg" BUILD_SHARED="sapi/phpdbg/libphpdbg.la" - + BUILD_PHPDBG="\$(LIBTOOL) --mode=link \ \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \ \$(PHP_GLOBAL_OBJS) \ @@ -63,6 +63,8 @@ if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then PHP_SUBST(BUILD_SHARED) PHP_SUBST(BUILD_PHPDBG) PHP_SUBST(BUILD_PHPDBG_SHARED) + + PHP_OUTPUT(sapi/phpdbg/phpdbg.1) fi if test "$PHP_PHPDBG_WEBHELPER" != "no"; then diff --git a/sapi/phpdbg/phpdbg.1 b/sapi/phpdbg/phpdbg.1 deleted file mode 100644 index 5e4d144c838..00000000000 --- a/sapi/phpdbg/phpdbg.1 +++ /dev/null @@ -1,59 +0,0 @@ -.TH PHPDBG 1 -.SH NAME -phpdbg \- The interactive PHP debugger -.SH SYNOPSIS -.B phpdbg -[OPTION] -[\fB\-e\fIFILE\fR] -.SH DESCRIPTION -.B phpdbg -a lightweight, powerful, easy to use debugging platform for PHP5. -.SH OPTIONS -The following switches are implemented (just like cli SAPI): -.TP -.BR \-n -No \fBphp.ini\fR file will be used -.TP -.BR \-c \fIpath\fB|\fIfile\fR -Look for \fBphp.ini\fR file in the directory \fIpath\fR or use the specified \fIfile\fR -.TP -.BR \-z \fIfile\fR -Load Zend extension \fIfile\fR -.TP -.BR \-d \fIfoo\fB[=\fIbar\fB]\fR -Define INI entry \fIfoo\fR with value \fIbar\fR -.PP The following switches change the default behaviour of phpdbg: -.TP -.BR \-v -Disables quietness -.TP -.BR \-s -Enabled stepping -.TP -.BR -e \fIfile\fR -Sets execution context -.TP -.BR \-b -Disables use of colour on the console -.TP -.BR \-I -Ignore .phpdbginit (default init file) -.TP -.BR \-i \fIpath\fB|\ffile\fR -Override .phpgdbinit location (implies -I) -.TP -.BR \-O \fIfile\fR -Set oplog output to \fIfile\fR -.TP -.BR \-q -Do not print banner on startup -.TP -.BR \-r -Jump straight to run -.TP -.BR \-E -Enable step through eval() -.SH NOTES -Passing -rr will cause phpdbg to quit after execution, rather than returning to the console -.SH AUTHOR -Written by Felipe Pena, Joe Watkins and Bob Weinand, formatted by Ondřej Surý for Debian project. diff --git a/sapi/phpdbg/phpdbg.1.in b/sapi/phpdbg/phpdbg.1.in new file mode 100644 index 00000000000..80c14941d36 --- /dev/null +++ b/sapi/phpdbg/phpdbg.1.in @@ -0,0 +1,150 @@ +.TH @program_prefix@phpdbg 1 "2018" "The PHP Group" "Scripting Language" +.SH NAME +@program_prefix@phpdbg \- The interactive PHP debugger +.SH SYNOPSIS +.B @program_prefix@phpdbg +[options] +[\fIfile\fP] +[\fIargs...\fP] +.SH DESCRIPTION +.B phpdbg +is a lightweight, powerful, easy to use debugging platform for PHP. +.SH OPTIONS +.TP 15 +.B \-c \fIpath\fB|\fIfile\fR +Look for +.B php.ini +file in the directory +.IR path +or use the specified +.IR file +.TP +.B \-d \fIfoo\fP[=\fIbar\fP] +Define INI entry +.IR foo +with value +.IR bar +.TP +.B \-n +No +.B php.ini +file will be used +.TP +.B \-z \fIfile\fR +Load Zend extension +.IR file +.TP +.BR \-q +Do not print banner on startup +.TP +.B \-v +Enable oplog output +.TP +.B \-b +Disables use of color on the console +.TP +.B \-i \fIpath\fB|\fIfile\fR +Override .phpgdbinit location (implies -I) +.TP +.B \-I +Ignore .phpdbginit (default init file) +.TP +.B \-O \fIfile\fR +Set oplog output to +.IR file +.TP +.B \-r +Jump straight to run +.TP +.B -e +Generate extended information for debugger/profiler +.TP +.B \-E +Enable step through eval() +.TP +.B \-s \fIdelimiter\fP +Read code to execute from stdin with an optional +.IR delimiter +.TP +.B \-S \fIsapi_name\fP +Override SAPI name +.TP +.B \-l \fIport\fP +Setup remote console port +.TP +.B \-a \fIaddress\fP +Setup remote console bind address +.TP +.B \-x +Enable XML output +.TP +.B \-p \fIopcode\fP +Output opcodes and quit +.TP +.B \-h +Print the help overview +.TP +.B \-V +Version number +.TP +.IR args.\|.\|. +Arguments passed to script. Use +.B '\-\-' +.IR args +when first argument starts with +.B '\-' +or script is read from stdin +.SH NOTES +Passing +.B \-rr +will cause +.B phpdbg +to quit after execution, rather than returning to the console +.SH FILES +.TP 15 +.B php.ini +The standard configuration file +.TP +.B .phpdbginit +The init file +.SH SEE ALSO +The online manual can be found at +.PD 0 +.P +.B http://php.net/manual/book.phpdbg.php +.PD 1 +.SH BUGS +You can view the list of known bugs or report any new bug you +found at +.PD 0 +.P +.B http://bugs.php.net/ +.PD 1 +.SH AUTHORS +Written by Felipe Pena, Joe Watkins and Bob Weinand, formatted by Ondřej Surý for Debian project. +.P +A List of active developers can be found at +.PD 0 +.P +.B http://www.php.net/credits.php +.PD 1 +.P +And last but not least PHP was developed with the help of a huge amount of +contributors all around the world. +.SH VERSION INFORMATION +This manpage describes \fBphpdbg\fP, for PHP version @PHP_VERSION@. +.SH COPYRIGHT +Copyright \(co 1997\-2018 The PHP Group +.LP +This source file is subject to version 3.01 of the PHP license, +that is bundled with this package in the file LICENSE, and is +available through the world-wide-web at the following url: +.PD 0 +.P +.B http://www.php.net/license/3_01.txt +.PD 1 +.P +If you did not receive a copy of the PHP license and are unable to +obtain it through the world-wide-web, please send a note to +.B license@php.net +so we can mail you a copy immediately.