71N/A# The contents of this file are subject to the terms of the
71N/A# Common Development and Distribution License (the "License").
71N/A# You may not use this file except in compliance with the License.
71N/A# See the License for the specific language governing permissions
71N/A# and limitations under the License.
71N/A# When distributing Covered Code, include this CDDL HEADER in each
71N/A# If applicable, add the following below this CDDL HEADER, with the
71N/A# fields enclosed by brackets "[]" replaced with your own identifying
71N/A# information: Portions Copyright [yyyy] [name of copyright owner]
3996N/A# Copyright (c) 2010, 2011, Oracle
and/or its affiliates. All rights reserved.
71N/AUNPACK = $(WS_TOOLS)/userland-unpack
71N/AFETCH = $(WS_TOOLS)/userland-fetch
618N/AARCHIVES += $(COMPONENT_ARCHIVE)
71N/ACLEAN_PATHS += $(SOURCE_DIR)
71N/ACLOBBER_PATHS += $(COMPONENT_ARCHIVE)
844N/APATCHES = $(shell find . -type f -name '*.patch' | \
77N/A sed -e 's;^\./;;' | grep -v $(SOURCE_DIR) | sort)
1273N/ASTAMPS = $(PATCHES:%=$(SOURCE_DIR)/.%ed)
3661N/A $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $<
3996N/A$(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE): Makefile
71N/A $(FETCH) --file $@ \
71N/A $(COMPONENT_ARCHIVE_URL:%=--url %) \
71N/A $(COMPONENT_ARCHIVE_HASH:%=--hash %)
71N/A$(SOURCE_DIR)/.unpacked: $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE) Makefile $(PATCHES)
71N/A $(RM) -r $(SOURCE_DIR)
71N/A $(UNPACK) $(UNPACK_ARGS) $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE)
71N/A$(SOURCE_DIR)/.patched: $(SOURCE_DIR)/.unpacked $(STAMPS)
71N/A$(SOURCE_DIR)/.prep: $(SOURCE_DIR)/.patched
71N/A $(COMPONENT_PREP_ACTION)
prep:: $(SOURCE_DIR)/.prep
download:: $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE)
$(RM) -r $(CLOBBER_PATHS)