Fix issues with bundled pjproject cached download.

Previously when testing I had a preexisting makeopts in ASTTOPDIR.  The
ordering of configure.ac causes --with-externals-cache to be processed
after third-party configure.  In cases where the Asterisk clone is
cleaned it would cause pjproject to be downloaded to /tmp.  This
moves processing of the externals cache and sounds cache to happen
before third-party configure.

This also addresses a possible issue with the third-party Makefile.  If
TMPDIR is set by the environment it would override the path given to
--with-externals-cache.

ASTERISK-26416

Change-Id: Ifab7f35bfcd5a31a31a3a4353cc26a68c8c6592d
This commit is contained in:
Corey Farrell
2016-10-14 01:18:50 -04:00
committed by George Joseph
parent dd6fc1bb7d
commit aa39a87697
4 changed files with 66 additions and 65 deletions

View File

@@ -74,13 +74,13 @@ ECHO_PREFIX := $(ECHO_PREFIX) echo '[pjproject] '
_all: $(TARGETS)
TMPDIR ?= $(or $(EXTERNALS_CACHE_DIR),$(wildcard /tmp),.)
EXTERNALS_CACHE_DIR ?= $(or $(TMPDIR),$(wildcard /tmp),.)
$(TMPDIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2 : ../versions.mak
$(EXTERNALS_CACHE_DIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2 : ../versions.mak
$(ECHO_PREFIX) Downloading $(PJPROJECT_URL)/$(@F) to $@
$(CMD_PREFIX) $(DOWNLOAD_TO_STDOUT) $(PJPROJECT_URL)/$(@F) > $@
source/.unpacked: $(TMPDIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2
source/.unpacked: $(EXTERNALS_CACHE_DIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2
$(ECHO_PREFIX) Unpacking $<
-@rm -rf source >/dev/null 2>&1
-@mkdir source >/dev/null 2>&1