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