prep.mk revision 2
220N/A#
220N/A# CDDL HEADER START
220N/A#
220N/A# The contents of this file are subject to the terms of the
220N/A# Common Development and Distribution License (the "License").
220N/A# You may not use this file except in compliance with the License.
220N/A#
220N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
220N/A# or http://www.opensolaris.org/os/licensing.
220N/A# See the License for the specific language governing permissions
220N/A# and limitations under the License.
220N/A#
220N/A# When distributing Covered Code, include this CDDL HEADER in each
220N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
220N/A# If applicable, add the following below this CDDL HEADER, with the
220N/A# fields enclosed by brackets "[]" replaced with your own identifying
220N/A# information: Portions Copyright [yyyy] [name of copyright owner]
220N/A#
220N/A# CDDL HEADER END
220N/A#
220N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
220N/A#
3996N/A
220N/AUNPACK = $(TOOLS)/unpack.py
220N/A
220N/AARCHIVES += $(COMPONENT_ARCHIVE)
220N/ACLEAN_PATHS += $(COMPONENT_SRC)
220N/ACLOBBER_PATHS += $(COMPONENT_ARCHIVE)
220N/A
220N/A#PATCHES = $(shell ls *.patch) #find . -type f -name '*.patch'
220N/APATCHES = $(shell find . -type f -name '*.patch' | \
844N/A sed -e 's;^\./;;' | sort)
844N/ASTAMPS = $(PATCHES:%=$(COMPONENT_SRC)/.patched.%)
220N/A
1273N/A$(COMPONENT_SRC)/.patched.%: %
220N/A $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $<
3661N/A $(TOUCH) $@
3661N/A
3996N/A$(COMPONENT_ARCHIVE):
3996N/A wget $(COMPONENT_ARCHIVE_URL)
3996N/A
220N/A$(COMPONENT_SRC)/.unpacked: $(COMPONENT_ARCHIVE)
220N/A $(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE)
220N/A $(TOUCH) $@
514N/A
514N/A$(COMPONENT_SRC)/.patched: $(COMPONENT_SRC)/.unpacked $(STAMPS)
514N/A $(TOUCH) $@
220N/A
220N/A$(COMPONENT_SRC)/.prep: $(COMPONENT_SRC)/.patched
220N/A $(COMPONENT_PREP_ACTION)
220N/A $(TOUCH) $@
220N/A
220N/Aprep:: $(COMPONENT_SRC)/.prep
220N/A
220N/Aclean::
220N/A $(RM) -r $(CLEAN_PATHS)
220N/A
220N/Aclobber:: clean
220N/A $(RM) -r $(CLOBBER_PATHS)
220N/A
220N/A