blob: 61b455818137bf471468bf86d71bb4bcf27f1a46 [file] [log] [blame] [edit]
#
# Copyright (c) 2010-2011 Nest, 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 tzcode and tzdata, executables and
# data required for the implementation of standard local time
# for many representative locations around the globe.
#
.NOTPARALLEL:
include pre.mak
SubMakefiles := tzcode.mak \
tzdata.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))
all: $(PackageDefaultGoal)
# Prepare the sources. While there's nothing to do here, we need to
# recurse through the sub-make files.
$(BuildDirectory)/source: $(SubMakefiles) | $(BuildDirectory)
$(Verbose)touch $@
# Patch the sources, if necessary (nothing to do, this is handled by
# the sub-make files).
$(BuildDirectory)/patch: $(BuildDirectory)/source | $(BuildDirectory)
$(Verbose)touch $@
# Configure the source for building (nothing to do, this is handled by
# the sub-make files).
$(BuildDirectory)/configure: $(BuildDirectory)/source | $(BuildDirectory)
$(Verbose)touch $@
# Build the source.
#
# We have to unset MAKEFLAGS since they confuse the package build otherwise.
$(BuildDirectory)/build: $(BuildDirectory)/configure | $(ResultDirectory) $(BuildDirectory)
$(Verbose)unset MAKEFLAGS && \
$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
TOPDIR=$(ResultDirectory) \
all
$(Verbose)touch $@
# Stage the build to a temporary installation area.
$(BuildDirectory)/stage: $(BuildDirectory)/stage-default $(BuildDirectory)/stage-header
# We have to unset MAKEFLAGS since they confuse the package build otherwise.
$(BuildDirectory)/stage-default: $(BuildDirectory)/build | $(ResultDirectory) $(BuildDirectory)
$(Verbose)unset MAKEFLAGS && \
$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
TOPDIR=$(ResultDirectory) \
install
$(Verbose)touch $@
# Other packages depend on the header, tzfile.h. Manually and
# explicitly stage this in the results directory so they can find it.
$(BuildDirectory)/stage-header: $(BuildDirectory)/build | $(ResultDirectory) $(BuildDirectory)
$(Verbose)$(INSTALL) $(INSTALLFLAGS) -d $(call GenerateResultPaths,,usr/include)
$(Verbose)$(INSTALL) $(INSTALLFLAGS) $(BuildDirectory)/tzfile.h $(call GenerateResultPaths,,usr/include/tzfile.h)
$(Verbose)touch $@
.PHONY: stage
stage: $(BuildDirectory)/stage
clean:
$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
include post.mak