Makefile revision 1638
11638Srgrimes#	@(#)Makefile	8.1 (Berkeley) 6/8/93
21638Srgrimes
31638Srgrimes# Change the line below for your time zone (after finding the zone you want in
41638Srgrimes# the time zone files, or adding it to a time zone file).
51638Srgrimes# Alternately, if you discover you've got the wrong time zone, you can just
61638Srgrimes#	zic -l rightzone
71638Srgrimes
81638SrgrimesLOCALTIME=	US/Pacific
91638Srgrimes
101638Srgrimes# If you want something other than Eastern United States time as a template
111638Srgrimes# for handling POSIX-style time zone environment variables,
121638Srgrimes# change the line below (after finding the zone you want in the
131638Srgrimes# time zone files, or adding it to a time zone file).
141638Srgrimes# Alternately, if you discover you've got the wrong time zone, you can just
151638Srgrimes#	zic -p rightzone
161638Srgrimes
171638SrgrimesPOSIXRULES=	US/Pacific
181638Srgrimes
191638Srgrimes# Use an absolute path name for TZDIR unless you're just testing the software.
201638Srgrimes
211638SrgrimesTZDIR=	${DESTDIR}/usr/share/zoneinfo
221638Srgrimes
231638Srgrimes# If you always want time values interpreted as "seconds since the epoch
241638Srgrimes# (not counting leap seconds)", use
251638Srgrimes# 	REDO=		posix_only
261638Srgrimes# below.  If you always want right time values interpreted as "seconds since
271638Srgrimes# the epoch" (counting leap seconds)", use
281638Srgrimes#	REDO=		right_only
291638Srgrimes# below.  If you want both sets of data available, with leap seconds not
301638Srgrimes# counted normally, use
311638Srgrimes#	REDO=		posix_right
321638Srgrimes# below.  If you want both sets of data available, with leap seconds counted
331638Srgrimes# normally, use
341638Srgrimes#	REDO=		right_posix
351638Srgrimes# below.
361638Srgrimes
371638SrgrimesREDO=		right_only
381638Srgrimes
391638Srgrimes# If you're running on a System V-style system and don't want lint grief,
401638Srgrimes# add
411638Srgrimes#	-DUSG
421638Srgrimes# to the end of the "CFLAGS=" line.
431638Srgrimes#
441638Srgrimes# If you're running on a system where "strchr" is known as "index",
451638Srgrimes# (for example, a 4.[012]BSD system), add
461638Srgrimes#	-Dstrchr=index
471638Srgrimes# to the end of the "CFLAGS=" line.
481638Srgrimes#
491638Srgrimes# If you're running on a system with a "mkdir" function, feel free to add
501638Srgrimes#	-Demkdir=mkdir
511638Srgrimes# to the end of the "CFLAGS=" line
521638Srgrimes#
531638Srgrimes# If you want to use System V compatibility code, add
541638Srgrimes#	-DUSG_COMPAT
551638Srgrimes# to the end of the "CFLAGS=" line.
561638Srgrimes#
571638Srgrimes# If your system has a "GMT offset" field in its "struct tm"s
581638Srgrimes# (or if you decide to add such a field in your system's "time.h" file),
591638Srgrimes# add the name to a define such as
601638Srgrimes#	-DTM_GMTOFF=tm_gmtoff
611638Srgrimes# or
621638Srgrimes#	-DTM_GMTOFF=_tm_gmtoff
631638Srgrimes# to the end of the "CFLAGS=" line.
641638Srgrimes#
651638Srgrimes# If your system has a "GMT offset" field in its "struct tm"s
661638Srgrimes# (or if you decide to add such a field in your system's "time.h" file),
671638Srgrimes# add the name to a define such as
681638Srgrimes#	-DTM_ZONE=tm_zone
691638Srgrimes# or
701638Srgrimes#	-DTM_ZONE=_tm_zone
711638Srgrimes# to the end of the "CFLAGS=" line.
721638Srgrimes#
731638Srgrimes# If you want code inspired by certain emerging standards, add
741638Srgrimes#	-DSTD_INSPIRED
751638Srgrimes# to the end of the "CFLAGS=" line.
761638Srgrimes#
771638Srgrimes# If you want Source Code Control System ID's left out of object modules, add
781638Srgrimes#	-DNOID
791638Srgrimes# to the end of the "CFLAGS=" line.
801638Srgrimes#
811638Srgrimes# If you'll never want to handle solar-time-based time zones, add
821638Srgrimes#	-DNOSOLAR
831638Srgrimes# to the end of the "CFLAGS=" line
841638Srgrimes# (and comment out the "SDATA=" line below).
851638Srgrimes#
861638Srgrimes# If you want to allocate state structures in localtime, add
871638Srgrimes#	-DALL_STATE
881638Srgrimes# to the end of the "CFLAGS=" line.
891638Srgrimes#
901638Srgrimes# If you want an "altzone" variable (a la System V Release 3.1), add
911638Srgrimes#	-DALTZONE
921638Srgrimes# to the end of the "CFLAGS=" line.
931638Srgrimes#
941638Srgrimes# If you want a "gtime" function (a la MACH), add
951638Srgrimes#	-DCMUCS
961638Srgrimes# to the end of the "CFLAGS=" line
971638Srgrimes
981638Srgrimes.PATH:	${.CURDIR}/datfiles
991638SrgrimesCFLAGS=	-DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
1001638SrgrimesPROG=	zic
1011638SrgrimesMAN5=	tzfile.0
1021638Srgrimes
1031638SrgrimesSRCS=	zic.c scheck.c ialloc.c
1041638Srgrimes
1051638SrgrimesYDATA=	africa antarctica asia australasia europe northamerica \
1061638Srgrimes	southamerica pacificnew etcetera factory
1071638SrgrimesNDATA=	systemv
1081638Srgrimes#SDATA=	solar87 solar88 solar89
1091638SrgrimesTDATA=	${YDATA} ${NDATA} ${SDATA}
1101638SrgrimesDATA=	${YDATA} ${NDATA} ${SDATA} leapseconds
1111638SrgrimesUSNO=	usno1988 usno1989
1121638Srgrimes
1131638Srgrimesposix_only: ${TDATA}
1141638Srgrimes	(cd ${.CURDIR}/datfiles; \
1151638Srgrimes	    ../obj/zic -d ${TZDIR} -L /dev/null ${TDATA})
1161638Srgrimes
1171638Srgrimesright_only: leapseconds ${TDATA}
1181638Srgrimes	(cd ${.CURDIR}/datfiles; \
1191638Srgrimes	    ../obj/zic -d ${TZDIR} -L leapseconds ${TDATA})
1201638Srgrimes
1211638Srgrimesother_two: leapseconds ${TDATA}
1221638Srgrimes	(cd ${.CURDIR}/datfiles; \
1231638Srgrimes	    ../obj/zic -d ${TZDIR}/posix -L /dev/null ${TDATA})
1241638Srgrimes	(cd ${.CURDIR}/datfiles; \
1251638Srgrimes	    ../obj/zic -d ${TZDIR}/right -L leapseconds ${TDATA})
1261638Srgrimes
1271638Srgrimesposix_right: posix_only other_two
1281638Srgrimes
1291638Srgrimesright_posix: right_only other_two
1301638Srgrimes
1311638Srgrimesinstall: maninstall ${DATA} ${REDO}
1321638Srgrimes	(cd ${.CURDIR}/datfiles && ../obj/zic -d ${TZDIR} -p ${POSIXRULES})
1331638Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1341638Srgrimes	    ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
1351638Srgrimes	chown -R ${BINOWN}.${BINGRP} ${TZDIR}
1361638Srgrimes	chmod -R a-w ${TZDIR}
1371638Srgrimes
1381638Srgrimes.include <bsd.prog.mk>
139