blob: cc85fb70407b0b2d6bd86fcd7318fcc8721801fe [file] [log] [blame]
#
# Copyright (c) 2010-2012 Nest Labs, Inc.
# All rights reserved.
#
# This document is the property of Nest. It is considered
# confidential and proprietary information.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Nest.
#
# Description:
# This file is the make file tzdata, data required for
# the implementation of standard local time for many
# representative locations around the globe.
#
BuildConfigSpecialized := No
BuildProductSpecialized := No
include pre.mak
# Override the build directory so that the three make files that make
# up this collective package all build in the same directory.
BuildDirectory := $(call GenerateConditionalBuildQualifiedDirectory,$(BuildBaseDirectory))
PackageName := tzdata
PackageExtension := tar.gz
PackageSeparator :=
PackagePatchArgs := -p1
PackageArchive := $(PackageName).$(PackageExtension)
PackageSourceDir := $(PackageName)$(PackageSeparator)$(PackageVersion)
PackageBuildScript := $(call GenerateBuildPaths,yearistype.sh)
all: $(PackageDefaultGoal)
# Extract the source from the archive and apply patches, if any.
#
# Unlike most third-party software packages, the tzdata archive does not
# contain a directory that encloses its sources. So, we have to create one
# manually to avoid cluttering up our "glue" directory with its sources.
$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
$(create-directory)
$(call expand-archive,$(PackageArchive),$(@))
$(Verbose)touch $(@)
$(call patch-directory,$(@),$(PackagePatchArgs),$(PackagePatchPaths))
# Prepare the sources.
.PHONY: source
source: | $(PackageSourceDir)
# Patch the sources, if necessary.
.PHONY: patch
patch: source
# Generate the package build makefile.
$(PackageBuildScript): | $(PackageSourceDir) $(BuildDirectory)
$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
# Configure the source for building.
.PHONY: configure
configure: source $(PackageBuildScript)
# Build the source (there's nothing to do here).
.PHONY: build
build: configure
# Stage the build to a temporary installation area (there's nothing to
# do here).
.PHONY: stage
stage: build
clean:
$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
include post.mak