]> granicus.if.org Git - php/commitdiff
* install Archive_Tar and Console_Getopt too
authorStig Bakken <ssb@php.net>
Sat, 11 May 2002 01:35:23 +0000 (01:35 +0000)
committerStig Bakken <ssb@php.net>
Sat, 11 May 2002 01:35:23 +0000 (01:35 +0000)
pear/Makefile.frag

index e3d2f02760b42f4c27b717ac9a7ea3acc50ba597..f49b7d7650a29f97fb4b03d6e3092982351f36fd 100644 (file)
@@ -98,18 +98,18 @@ peardir=$(PEAR_INSTALLDIR)
 PEARCMD=$(top_builddir)/sapi/cli/php -d include_path=$(top_srcdir)/pear pear/scripts/pear.in
 
 install-pear-installer: $(top_builddir)/sapi/cli/php
-       @if $(PEARCMD) shell-test PEAR; then \
-           version=`grep '<version>' $(srcdir)/package-PEAR.xml|head -1|cut -d\> -f2|cut -d\< -f1`; \
-           if ! $(PEARCMD) shell-test PEAR $$version; then \
-               echo "Found an older version of the PEAR Installer, upgrading..."; \
-               $(PEARCMD) -q upgrade $(srcdir)/package-PEAR.xml; \
+       @for descfile in $(srcdir)/package-*.xml; do \
+           tmp="$${descfile%.xml}"; \
+           pkgname="$${tmp#*-}"; \
+           pkgver=`grep '<version>' $$descfile|head -1|cut -d\> -f2|cut -d\< -f1`; \
+           if $(PEARCMD) shell-test $$pkgname; then \
+               if ! $(PEARCMD) shell-test $$pkgname $$pkgver; then \
+                   $(PEARCMD) -q upgrade $$descfile | sed -e "s/^/$$pkgname $$pkgver: /"; \
+               fi; \
            else \
-               echo "No need to install or upgrade the PEAR Installer..."; \
+               $(PEARCMD) -q install $$descfile | sed -e "s/^/$$pkgname $$pkgver: /"; \
            fi; \
-       else \
-           echo "PEAR Installer not found, installing..."; \
-           $(PEARCMD) -q install $(srcdir)/package-PEAR.xml; \
-       fi
+       done
 
 install-pear-packages: # requires cli installed
        @/bin/ls -1 $(srcdir)/packages | while read package; do \