Makefile revision 1574
55e5c51e661e23e24573db84114a3837817745c9Evan Hunt# CDDL HEADER START
55e5c51e661e23e24573db84114a3837817745c9Evan Hunt# The contents of this file are subject to the terms of the
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt# Common Development and Distribution License (the "License").
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt# You may not use this file except in compliance with the License.
df925e6c66d45d960fbac0383169763967d2111cEvan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
df925e6c66d45d960fbac0383169763967d2111cEvan Hunt# See the License for the specific language governing permissions
a81ae06ed3081753a73e7638919673be57eaf47fEvan Hunt# and limitations under the License.
a81ae06ed3081753a73e7638919673be57eaf47fEvan Hunt# When distributing Covered Code, include this CDDL HEADER in each
2425d8bb7ccf5dc956ad12d64d97b5a42e022930Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2425d8bb7ccf5dc956ad12d64d97b5a42e022930Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
2425d8bb7ccf5dc956ad12d64d97b5a42e022930Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
740e7340c55e9f0cf80c6fbbf7e8d3c1bdeaa255Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
740e7340c55e9f0cf80c6fbbf7e8d3c1bdeaa255Mark Andrews# CDDL HEADER END
740e7340c55e9f0cf80c6fbbf7e8d3c1bdeaa255Mark Andrews# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
0b8bd3a4ae3efd91f88e8901323faf99b5b06136Evan Hunt# Since upstream only offers the latest snapshot for download, without
7e9ccec63889f2aabee59b94307be492a77fa93bMark Andrews# any way to retrieve a specific version, we just keep the currently
7e9ccec63889f2aabee59b94307be492a77fa93bMark Andrews# shipped versions of these two text files directly in the gate and
b748b5e2c2fa40f758e3b35ad4f1fde99ab5e11fEvan Hunt# simply check in new versions to update them.
b748b5e2c2fa40f758e3b35ad4f1fde99ab5e11fEvan Hunt# When it's time to update, you can use these rules to download with
8d21efc150998f9643f98ce5a4f0b17460e12043Evan Hunt# 'gmake -B pci.ids usb.ids' After updating the data files, ensure
8d21efc150998f9643f98ce5a4f0b17460e12043Evan Hunt# that the header with version/date and license info is still being
ab7a67829ffe2a7b3220a1cd366bc6255235923aJINMEI Tatuya# correctly extracted and copied into the generated license files.
ab7a67829ffe2a7b3220a1cd366bc6255235923aJINMEI Tatuya @echo 'No downloads for this component'
9dac1de625301aeb520cb1e83723d98cd65999eeEvan HuntCOMPONENT_ARCHIVE_URL_pci.ids = http://pciids.sourceforge.net/v2.2/pci.ids
9dac1de625301aeb520cb1e83723d98cd65999eeEvan HuntCOMPONENT_ARCHIVE_URL_usb.ids = http://www.linux-usb.org/usb.ids
9c9b75c43566058727cb89204d36977559cb99afMark AndrewsCOMPONENT_ARCHIVE_URLS = $(foreach i,$(ID_FILES),$(COMPONENT_ARCHIVE_URL_$(i)))
cd63e943104ab4f7f8b37da8d49738e91a8db1ddEvan Hunt# Retrieve version from ids file
cd63e943104ab4f7f8b37da8d49738e91a8db1ddEvan HuntID_VERSION_EXTRACT_COMMAND=$(GSED) -n -e '/Version:/ { s/^.*: //p' -e ' q }'
c91c439f80c555f016cce8e9fd910630f81bb5c9Curtis BlackburnPKG_OPTIONS += -D COMPONENT_ARCHIVE_URLS='$(COMPONENT_ARCHIVE_URLS:%=value="%")'
6225380ca6dd045302fd5cb22d1dbbe6a88a7509Evan Hunt COMPONENT_VERSION_$(i)='$(shell $(ID_VERSION_EXTRACT_COMMAND) $(i))')
6225380ca6dd045302fd5cb22d1dbbe6a88a7509Evan Hunt# Since we have two separately licensed components we don't use the default
c9611b45736af157e2993c6ef852e55e8e24ca83Evan Hunt# license transform rules, but handle the license info metadata directly
9a0dd99a757c469d9530acd5cb11789b3b0af5ceEvan Hunt# License files for packaging are generated during the build
641e87a1a0ee716f46b4d0f529e73b58f19aee4eEvan Hunt# Extract the header up to the first blank line
2154c019124246199c7fe494b86860461c8a5f40Evan Hunt# Generate license files for each document by substituting in templates:
2154c019124246199c7fe494b86860461c8a5f40Evan Hunt# __HEADER__ - read in contents of generated header file, then delete the
214836c18496e0d2630df1cda5eeee13c38b9068Evan Hunt# __HEADER__ line
214836c18496e0d2630df1cda5eeee13c38b9068Evan Hunt $(GSED) -e '/__HEADER__/ r $<' -e '/__HEADER__/ d' ids.license.tmpl > $@