1##
2# Makefile for TimeZoneData
3#
4# See http://www.gnu.org/manual/make/html_chapter/make_toc.html#SEC_Contents
5# for documentation on makefiles. Most of this was culled from the ncurses makefile.
6#
7##
8
9#################################
10#################################
11# MAKE VARS
12#################################
13#################################
14
15# ':=' denotes a "simply expanded" variable. Its value is
16# set at the time of definition and it never recursively expands
17# when used. This is in contrast to using '=' which denotes a
18# recursively expanded variable.
19
20SHELL := /bin/sh
21
22# Sane defaults, which are typically overridden on the command line.
23SRCROOT=$(shell pwd)
24OBJROOT=$(SRCROOT)/build
25DSTROOT=$(OBJROOT)
26SYMROOT=$(OBJROOT)
27RC_ARCHS=
28
29#################################
30# Install
31#################################
32
33INSTALL = /usr/bin/install
34ifeq "$(OS)" "Windows_NT"
35	INSTALLDIR = /AppleInternal/bin/tz
36else
37	INSTALLDIR = /usr/local/share/tz
38endif
39
40#################################
41# B&I TARGETS
42#################################
43
44installsrc :
45	if test ! -d $(SRCROOT); then mkdir $(SRCROOT); fi;
46	tar cf - ./makefile ./tz*.tar.gz ./boundaries | (cd $(SRCROOT) ; tar xfp -);
47
48installhdrs :
49	echo "Nothing to do for installhdrs"
50
51install : installhdrs
52	if test ! -d $(DSTROOT)$(INSTALLDIR)/; then \
53		$(INSTALL) -d -m 0755 $(DSTROOT)$(INSTALLDIR)/; \
54	fi;
55	if test ! -d $(DSTROOT)$(INSTALLDIR)/boundaries/; then \
56		$(INSTALL) -d -m 0755 $(DSTROOT)$(INSTALLDIR)/boundaries/; \
57	fi;
58	$(INSTALL) -b -m 0644 $(SRCROOT)/tz*.tar.gz $(DSTROOT)$(INSTALLDIR)
59	$(INSTALL) -b -m 0644 $(SRCROOT)/boundaries/*.gpx $(DSTROOT)$(INSTALLDIR)/boundaries
60	(cd $(DSTROOT)$(INSTALLDIR); \
61	ln -sf $(notdir $(lastword $(wildcard $(SRCROOT)/tzdata*.tar.gz))) latest_tzdata.tar.gz; \
62	ln -sf $(notdir $(lastword $(wildcard $(SRCROOT)/tzcode*.tar.gz))) latest_tzcode.tar.gz;);
63
64clean :
65