prep.mk revision 59
71N/A#
71N/A# CDDL HEADER START
71N/A#
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#
71N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
71N/A# or http://www.opensolaris.org/os/licensing.
71N/A# See the License for the specific language governing permissions
71N/A# and limitations under the License.
71N/A#
71N/A# When distributing Covered Code, include this CDDL HEADER in each
71N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
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]
71N/A#
71N/A# CDDL HEADER END
71N/A#
3996N/A# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
71N/A#
71N/A
71N/AUNPACK = $(WS_TOOLS)/userland-unpack
71N/AFETCH = $(WS_TOOLS)/userland-fetch
71N/A
618N/AARCHIVES += $(COMPONENT_ARCHIVE)
71N/ACLEAN_PATHS += $(SOURCE_DIR)
71N/ACLOBBER_PATHS += $(COMPONENT_ARCHIVE)
844N/A
844N/APATCHES = $(shell find . -type f -name '*.patch' | \
77N/A sed -e 's;^\./;;' | grep -v $(SOURCE_DIR) | sort)
1273N/ASTAMPS = $(PATCHES:%=$(SOURCE_DIR)/.%ed)
71N/A
3661N/A$(SOURCE_DIR)/.%ed: %
3661N/A $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $<
3996N/A $(TOUCH) $@
3996N/A
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 $(TOUCH) $@
71N/A
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 $(TOUCH) $@
71N/A
71N/A$(SOURCE_DIR)/.patched: $(SOURCE_DIR)/.unpacked $(STAMPS)
181N/A $(TOUCH) $@
181N/A
71N/A$(SOURCE_DIR)/.prep: $(SOURCE_DIR)/.patched
71N/A $(COMPONENT_PREP_ACTION)
3996N/A $(TOUCH) $@
prep:: $(SOURCE_DIR)/.prep
download:: $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE)
clean::
$(RM) -r $(CLEAN_PATHS)
clobber:: clean
$(RM) -r $(CLOBBER_PATHS)