xref: /original-bsd/share/zoneinfo/Makefile (revision 792e4f5f)
1# @(#)Makefile	4.31
2
3# Change the line below for your time zone (after finding the zone you want in
4# the time zone files, or adding it to a time zone file).
5# Alternately, if you discover you've got the wrong time zone, you can just
6#	zic -l rightzone
7
8LOCALTIME=	US/Pacific
9
10# If you want something other than Eastern United States time as a template
11# for handling POSIX-style time zone environment variables,
12# change the line below (after finding the zone you want in the
13# time zone files, or adding it to a time zone file).
14# Alternately, if you discover you've got the wrong time zone, you can just
15#	zic -p rightzone
16
17POSIXRULES=	US/Pacific
18
19# Use an absolute path name for TZDIR unless you're just testing the software.
20
21TZDIR=	${DESTDIR}/usr/share/zoneinfo
22
23# If you always want time values interpreted as "seconds since the epoch
24# (not counting leap seconds)", use
25# 	REDO=		posix_only
26# below.  If you always want right time values interpreted as "seconds since
27# the epoch" (counting leap seconds)", use
28#	REDO=		right_only
29# below.  If you want both sets of data available, with leap seconds not
30# counted normally, use
31#	REDO=		posix_right
32# below.  If you want both sets of data available, with leap seconds counted
33# normally, use
34#	REDO=		right_posix
35# below.
36
37REDO=		right_only
38
39# If you're running on a System V-style system and don't want lint grief,
40# add
41#	-DUSG
42# to the end of the "CFLAGS=" line.
43#
44# If you're running on a system where "strchr" is known as "index",
45# (for example, a 4.[012]BSD system), add
46#	-Dstrchr=index
47# to the end of the "CFLAGS=" line.
48#
49# If you're running on a system with a "mkdir" function, feel free to add
50#	-Demkdir=mkdir
51# to the end of the "CFLAGS=" line
52#
53# If you want to use System V compatibility code, add
54#	-DUSG_COMPAT
55# to the end of the "CFLAGS=" line.
56#
57# If your system has a "GMT offset" field in its "struct tm"s
58# (or if you decide to add such a field in your system's "time.h" file),
59# add the name to a define such as
60#	-DTM_GMTOFF=tm_gmtoff
61# or
62#	-DTM_GMTOFF=_tm_gmtoff
63# to the end of the "CFLAGS=" line.
64#
65# If your system has a "GMT offset" field in its "struct tm"s
66# (or if you decide to add such a field in your system's "time.h" file),
67# add the name to a define such as
68#	-DTM_ZONE=tm_zone
69# or
70#	-DTM_ZONE=_tm_zone
71# to the end of the "CFLAGS=" line.
72#
73# If you want code inspired by certain emerging standards, add
74#	-DSTD_INSPIRED
75# to the end of the "CFLAGS=" line.
76#
77# If you want Source Code Control System ID's left out of object modules, add
78#	-DNOID
79# to the end of the "CFLAGS=" line.
80#
81# If you'll never want to handle solar-time-based time zones, add
82#	-DNOSOLAR
83# to the end of the "CFLAGS=" line
84# (and comment out the "SDATA=" line below).
85#
86# If you want to allocate state structures in localtime, add
87#	-DALL_STATE
88# to the end of the "CFLAGS=" line.
89#
90# If you want an "altzone" variable (a la System V Release 3.1), add
91#	-DALTZONE
92# to the end of the "CFLAGS=" line.
93#
94# If you want a "gtime" function (a la MACH), add
95#	-DCMUCS
96# to the end of the "CFLAGS=" line
97
98VPATH=	data
99CFLAGS=	-Demkdir=mkdir -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DNOSOLAR \
100	-DTZDIR=\"$(TZDIR)\"
101MAN=	tzfile.0
102
103OBJS=	zic.o scheck.o ialloc.o
104SRCS=	zic.c scheck.c ialloc.c
105
106YDATA=	africa antarctica asia australasia europe northamerica \
107	southamerica pacificnew etcetera factory
108NDATA=	systemv
109#SDATA=	solar87 solar88 solar89
110TDATA=	$(YDATA) $(NDATA) $(SDATA)
111DATA=	$(YDATA) $(NDATA) $(SDATA) leapseconds
112USNO=	usno1988 usno1989
113
114all: zic
115
116zic: $(OBJS)
117	$(CC) $(CFLAGS) $(LFLAGS) $(OBJS) -o $@
118
119posix_only: $(TDATA)
120	./zic -d $(TZDIR) -L /dev/null $(TDATA)
121
122right_only: leapseconds $(TDATA)
123	./zic -d $(TZDIR) -L leapseconds $(TDATA)
124
125other_two: leapseconds $(TDATA)
126	./zic -d $(TZDIR)/posix -L /dev/null $(TDATA)
127	./zic -d $(TZDIR)/right -L leapseconds $(TDATA)
128
129posix_right: posix_only other_two
130
131right_posix: right_only other_two
132
133install: ${MAN} $(DATA) $(REDO)
134	./zic -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
135	install -c -o bin -g bin -m 444 tzfile.0 ${DESTDIR}/usr/man/man5
136	chown -R bin.bin $(TZDIR)
137	chmod 775 $(TZDIR)
138
139clean:
140	rm -f core *.o zic
141
142cleandir: clean
143	rm -f ${MAN} tags .depend
144
145depend: $(SRCS)
146	mkdep $(CFLAGS) $(SRCS)
147
148lint:
149