summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-08-22 06:31:02 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-08-22 06:31:02 +0200
commitea1aef3da3e68a062f28718a3e697b3148eef1fe (patch)
treedd24f8dc0c00c155059f5e74c7f7cf63760bb60e /mk
parent90f063cdaa362277b19eac3d3e3ebeb6227b4da3 (diff)
allow FETCH_STYLE=manual to succeed. simplify fetch loop.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildhlp.mk18
-rw-r--r--mk/fetch.mk7
2 files changed, 15 insertions, 10 deletions
diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk
index 3c79fc1e8..19b761f46 100644
--- a/mk/buildhlp.mk
+++ b/mk/buildhlp.mk
@@ -49,15 +49,27 @@ ifeq (${_CHECKSUM_COOKIE},)
endif
ifeq ($(EXTRACT_OVERRIDE),1)
${MAKE} do-extract
-else
+else
${EXTRACT_CMD}
endif
@${MAKE} post-extract $(MAKE_TRACE)
touch $@
__use_generic_patch_target:=42
-else ifeq ($(strip ${_IN_PACKAGE}),1)
-$(warning This package does not use the generic extraction and patch target; it's most likely to fail.)
+else
+include ${TOPDIR}/mk/fetch.mk
+${WRKDIST}/.extract_done: ${_CHECKSUM_COOKIE}
+ $(MAKE) fetch
+ifeq (${_CHECKSUM_COOKIE},)
+ rm -rf ${WRKDIST} ${WRKSRC} ${WRKBUILD}
+endif
+ifeq ($(EXTRACT_OVERRIDE),1)
+ ${MAKE} do-extract
+else
+ ${EXTRACT_CMD}
+endif
+ @${MAKE} post-extract $(MAKE_TRACE)
+ touch $@
endif
ifeq ($(strip ${__use_generic_patch_target}),42)
diff --git a/mk/fetch.mk b/mk/fetch.mk
index 5c3edf918..a2590d467 100644
--- a/mk/fetch.mk
+++ b/mk/fetch.mk
@@ -59,14 +59,7 @@ endif
define FETCH_template
$(1):
@fullname='$(1)'; \
- subname=$$$${fullname##$${DISTDIR}/}; \
filename=$$$${fullname##*/}; \
- i='$${LOCAL_DISTDIR}'; \
- if [[ -n $$$$i && -e $$$$i/$$$$subname ]]; then \
- cd "$$$$i"; \
- echo pax -rw "$$$$subname" '$${DISTDIR}/'; \
- exec pax -rw "$$$$subname" '$${DISTDIR}/'; \
- fi; \
mkdir -p "$$$${fullname%%/$$$$filename}"; \
cd "$$$${fullname%%/$$$$filename}"; \
for site in $${PKG_SITES} $${MASTER_SITE_BACKUP}; do \