]> granicus.if.org Git - php/commitdiff
Fix #61345: fix install of CGI binary
authorMichael Heimpold <mhei@heimpold.de>
Fri, 9 Aug 2013 19:06:17 +0000 (21:06 +0200)
committerStanislav Malyshev <stas@php.net>
Sun, 11 Aug 2013 00:33:24 +0000 (17:33 -0700)
When CLI was not built but only CGI binary, then a sequence of

$ ./buildconf
$ ./configure  --prefix=/usr/local/phpcgi --disable-cli
$ make -j8
$ sudo rm -rf /usr/local/phpcgi
$ sudo make install

results in the following error:

/bin/bash /srv/smb/php-src.test/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /srv/smb/php-src.test/modules
Installing shared extensions:     /usr/local/phpcgi/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CGI binary:        /usr/local/phpcgi/bin/
cp: cannot create regular file `/usr/local/phpcgi/bin/#INST@28245#': No such file or directory
make: *** [install-cgi] Fehler 1

The solution is to create the binary directory before copying the
CGI binary as e.g. CLI does.

Signed-off-by: Oliver Metz <oliver.metz@gmx.de>
[extensive commit message]

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
sapi/cgi/Makefile.frag

index d54dd40808e09e3109f293d1bbd4c33ff241c3f9..d3d7cb3553ab613b7641dd205c6c33ceb0a76a2d 100644 (file)
@@ -5,6 +5,7 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CGI_OBJS)
 
 install-cgi: $(SAPI_CGI_PATH)
        @echo "Installing PHP CGI binary:        $(INSTALL_ROOT)$(bindir)/"
+       @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
        @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
        @echo "Installing PHP CGI man page:      $(INSTALL_ROOT)$(mandir)/man1/"
        @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1