]> granicus.if.org Git - php/commitdiff
Respect --program-prefix/suffix when installing phar
authorNathan Porter <nateporter@gmail.com>
Sat, 30 May 2020 22:39:11 +0000 (15:39 -0700)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 5 Jun 2020 08:10:40 +0000 (10:10 +0200)
Currently ./configure --enable-phar --program-suffix=7.4 will
result in binaries named php7.4 and phar but should instead
result in php7.4 and phar7.4

Closes GH-5650.

ext/phar/Makefile.frag

index 6442f3349332ef60171c352df9977e16d2d63132..58789cae25b5760a28cd983b2b7ae43ae796209c 100644 (file)
@@ -42,9 +42,9 @@ $(builddir)/phar.phar: $(builddir)/phar.php $(builddir)/phar/phar.inc $(srcdir)/
 
 install-pharcmd: pharcmd
        -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-       $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)
-       -@rm -f $(INSTALL_ROOT)$(bindir)/phar
-       $(LN_S) -f phar.phar $(INSTALL_ROOT)$(bindir)/phar
+       $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)/$(program_prefix)phar$(program_suffix).phar
+       -@rm -f $(INSTALL_ROOT)$(bindir)/$(program_prefix)phar$(program_suffix)
+       $(LN_S) -f $(program_prefix)phar$(program_suffix).phar $(INSTALL_ROOT)$(bindir)/$(program_prefix)phar$(program_suffix)
        @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
-       @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1
-       @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1
+       @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phar$(program_suffix).1
+       @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phar$(program_suffix).phar.1