head	1.5;
access;
symbols
	netbsd-11-0-RC4:1.3.2.1
	TZDATA2026BGTZ:1.1.1.43
	netbsd-11-0-RC3:1.3.2.1
	TZDATA2026AGTZ:1.1.1.43
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	TZDATA2025CGTZ:1.1.1.42
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.2
	netbsd-11-base:1.3
	TZDATA2025BGTZ:1.1.1.41
	TZDATA2025AGTZ:1.1.1.41
	TZDATA2025A:1.1.1.40
	netbsd-10-1-RELEASE:1.1.1.35.2.3
	TZDATA2024BGTZ:1.1.1.39
	perseant-exfatfs-base-20240630:1.1.1.38
	perseant-exfatfs:1.1.1.38.0.2
	perseant-exfatfs-base:1.1.1.38
	netbsd-8-3-RELEASE:1.1.1.17.4.11
	netbsd-9-4-RELEASE:1.1.1.24.2.9
	netbsd-10-0-RELEASE:1.1.1.35.2.3
	netbsd-10-0-RC6:1.1.1.35.2.3
	netbsd-10-0-RC5:1.1.1.35.2.3
	netbsd-10-0-RC4:1.1.1.35.2.3
	TZDATA2024AGTZ:1.1.1.38
	netbsd-10-0-RC3:1.1.1.35.2.2
	netbsd-10-0-RC2:1.1.1.35.2.2
	TZDATA2023DGTZ:1.1.1.37
	netbsd-10-0-RC1:1.1.1.35.2.1
	TZDATA2023CGTZ:1.1.1.36
	TZDATA2023BGTZ:1.1.1.36
	TZDATA2023AGTZ:1.1.1.36
	netbsd-10:1.1.1.35.0.2
	netbsd-10-base:1.1.1.35
	TZDATA2022GGTZ:1.1.1.35
	TZDATA2022FGTZ:1.1.1.34
	TZDATA2022EGTZ:1.1.1.33
	TZDATA2022DGTZ:1.1.1.33
	TZDATA2022CGTZ:1.1.1.32
	netbsd-9-3-RELEASE:1.1.1.24.2.6
	TZDATA2022AGTZ:1.1.1.31
	cjep_sun2x-base1:1.1.1.30
	cjep_sun2x:1.1.1.30.0.4
	cjep_sun2x-base:1.1.1.30
	cjep_staticlib_x-base1:1.1.1.30
	netbsd-9-2-RELEASE:1.1.1.24.2.6
	cjep_staticlib_x:1.1.1.30.0.2
	cjep_staticlib_x-base:1.1.1.30
	TZDATA2021A:1.1.1.30
	TZDATA2020F:1.1.1.30
	TZDATA2020D:1.1.1.29
	netbsd-9-1-RELEASE:1.1.1.24.2.4
	TZDATA2020C:1.1.1.28
	TZDATA2020B:1.1.1.27
	TZDATA2020A:1.1.1.26
	phil-wifi-20200421:1.1.1.25
	phil-wifi-20200411:1.1.1.25
	is-mlppp:1.1.1.25.0.2
	is-mlppp-base:1.1.1.25
	phil-wifi-20200406:1.1.1.25
	netbsd-8-2-RELEASE:1.1.1.17.4.6
	netbsd-9-0-RELEASE:1.1.1.24.2.1
	netbsd-9-0-RC2:1.1.1.24.2.1
	netbsd-9-0-RC1:1.1.1.24.2.1
	phil-wifi-20191119:1.1.1.25
	TZDATA2019C:1.1.1.25
	netbsd-9:1.1.1.24.0.2
	netbsd-9-base:1.1.1.24
	phil-wifi-20190609:1.1.1.24
	netbsd-8-1-RELEASE:1.1.1.17.4.6
	netbsd-8-1-RC1:1.1.1.17.4.6
	TZDATA2019A:1.1.1.24
	pgoyette-compat-merge-20190127:1.1.1.19.2.4
	pgoyette-compat-20190127:1.1.1.23
	pgoyette-compat-20190118:1.1.1.23
	TZDATA2018I:1.1.1.23
	TZDATA2018H:1.1.1.23
	pgoyette-compat-1226:1.1.1.22
	pgoyette-compat-1126:1.1.1.22
	TZDATA2018G:1.1.1.22
	pgoyette-compat-1020:1.1.1.22
	TZDATA2018F:1.1.1.22
	pgoyette-compat-0930:1.1.1.21
	pgoyette-compat-0906:1.1.1.21
	netbsd-7-2-RELEASE:1.1.1.1.4.10
	pgoyette-compat-0728:1.1.1.21
	netbsd-8-0-RELEASE:1.1.1.17.4.4
	phil-wifi:1.1.1.21.0.2
	phil-wifi-base:1.1.1.21
	pgoyette-compat-0625:1.1.1.21
	netbsd-8-0-RC2:1.1.1.17.4.4
	pgoyette-compat-0521:1.1.1.21
	TZDATA2018E:1.1.1.21
	pgoyette-compat-0502:1.1.1.20
	pgoyette-compat-0422:1.1.1.20
	netbsd-8-0-RC1:1.1.1.17.4.3
	pgoyette-compat-0415:1.1.1.20
	pgoyette-compat-0407:1.1.1.20
	pgoyette-compat-0330:1.1.1.20
	TZDATA2018D:1.1.1.20
	pgoyette-compat-0322:1.1.1.19
	pgoyette-compat-0315:1.1.1.19
	netbsd-7-1-2-RELEASE:1.1.1.1.4.7.2.1
	pgoyette-compat:1.1.1.19.0.2
	pgoyette-compat-base:1.1.1.19
	TZDATA2018C:1.1.1.19
	netbsd-7-1-1-RELEASE:1.1.1.1.4.7.2.1
	matt-nb8-mediatek:1.1.1.17.4.1.0.2
	matt-nb8-mediatek-base:1.1.1.17.4.1
	TZDATA2017C:1.1.1.18
	perseant-stdc-iso10646:1.1.1.17.0.6
	perseant-stdc-iso10646-base:1.1.1.17
	netbsd-8:1.1.1.17.0.4
	netbsd-8-base:1.1.1.17
	prg-localcount2-base3:1.1.1.17
	prg-localcount2-base2:1.1.1.17
	prg-localcount2-base1:1.1.1.17
	prg-localcount2:1.1.1.17.0.2
	prg-localcount2-base:1.1.1.17
	pgoyette-localcount-20170426:1.1.1.17
	bouyer-socketcan-base1:1.1.1.17
	TZDATA2017B:1.1.1.17
	pgoyette-localcount-20170320:1.1.1.17
	netbsd-7-1:1.1.1.1.4.7.0.2
	netbsd-7-1-RELEASE:1.1.1.1.4.7
	TZDATA2017A:1.1.1.17
	netbsd-7-1-RC2:1.1.1.1.4.6
	netbsd-7-nhusb-base-20170116:1.1.1.1.4.6
	bouyer-socketcan:1.1.1.16.0.2
	bouyer-socketcan-base:1.1.1.16
	pgoyette-localcount-20170107:1.1.1.16
	netbsd-7-1-RC1:1.1.1.1.4.6
	TZDATA2016J:1.1.1.16
	pgoyette-localcount-20161104:1.1.1.15
	TZDATA2016I:1.1.1.15
	netbsd-7-0-2-RELEASE:1.1.1.1.4.4.2.1
	TZDATA2016H:1.1.1.14
	TZDATA2016G:1.1.1.13
	localcount-20160914:1.1.1.12
	netbsd-7-nhusb:1.1.1.1.4.5.0.2
	netbsd-7-nhusb-base:1.1.1.1.4.5
	TZDATA2016F:1.1.1.12
	pgoyette-localcount-20160806:1.1.1.11
	pgoyette-localcount-20160726:1.1.1.11
	pgoyette-localcount:1.1.1.11.0.2
	pgoyette-localcount-base:1.1.1.11
	TZDATA2016D:1.1.1.11
	netbsd-7-0-1-RELEASE:1.1.1.1.4.4.2.1
	TZDATA2016B:1.1.1.10
	netbsd-7-0:1.1.1.1.4.4.0.2
	netbsd-7-0-RELEASE:1.1.1.1.4.4
	TZDATA2015F:1.1.1.9
	netbsd-7-0-RC3:1.1.1.1.4.3
	netbsd-7-0-RC2:1.1.1.1.4.3
	TZDATA2015E:1.1.1.8
	netbsd-7-0-RC1:1.1.1.1.4.3
	TZDATA2015B:1.1.1.7
	TZDATA2015A:1.1.1.6
	TZDATA2014J:1.1.1.5
	TZDATA2014I:1.1.1.4
	TZDATA2014H:1.1.1.3
	TZDATA2014G:1.1.1.2
	tls-maxphys-base:1.1.1.1
	tls-maxphys:1.1.1.1.0.6
	netbsd-7:1.1.1.1.0.4
	netbsd-7-base:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.2
	tls-earlyentropy-base:1.1.1.1
	TZDATA2014F:1.1.1.1
	TZDATA:1.1.1;
locks; strict;
comment	@# @;


1.5
date	2026.03.09.17.29.56;	author kre;	state Exp;
branches;
next	1.4;
commitid	828wPnPnB7JNbkxG;

1.4
date	2025.12.19.00.59.25;	author kre;	state Exp;
branches;
next	1.3;
commitid	ZpAAKqYivWTshXmG;

1.3
date	2025.02.03.04.47.13;	author kre;	state Exp;
branches
	1.3.2.1;
next	1.2;
commitid	I5GdBIKhQShiNYHF;

1.2
date	2025.02.02.00.39.55;	author kre;	state Exp;
branches;
next	1.1;
commitid	XKzhe1dLOb7gsPHF;

1.1
date	2014.08.08.08.56.48;	author apb;	state Exp;
branches
	1.1.1.1;
next	;
commitid	iGXhXh3Wpi6OlxLx;

1.3.2.1
date	2026.04.02.16.33.43;	author martin;	state Exp;
branches;
next	;
commitid	aup4agd012686pAG;

1.1.1.1
date	2014.08.08.08.56.48;	author apb;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.4.1
	1.1.1.1.6.1;
next	1.1.1.2;
commitid	iGXhXh3Wpi6OlxLx;

1.1.1.2
date	2014.08.31.06.46.20;	author apb;	state Exp;
branches;
next	1.1.1.3;
commitid	97niuh41EisdTtOx;

1.1.1.3
date	2014.10.04.11.42.09;	author apb;	state Exp;
branches;
next	1.1.1.4;
commitid	3DEqqETZ5KmWqSSx;

1.1.1.4
date	2014.10.23.03.37.19;	author apb;	state Exp;
branches;
next	1.1.1.5;
commitid	jKnsSpMUSkPJ8hVx;

1.1.1.5
date	2014.11.16.07.08.08;	author apb;	state Exp;
branches;
next	1.1.1.6;
commitid	3SkT3wPXTpSexnYx;

1.1.1.6
date	2015.01.31.18.23.14;	author apb;	state Exp;
branches;
next	1.1.1.7;
commitid	bjXoHWtuRrKnPc8y;

1.1.1.7
date	2015.03.21.15.45.34;	author apb;	state Exp;
branches;
next	1.1.1.8;
commitid	GIz4juHFOXHDnuey;

1.1.1.8
date	2015.06.21.15.18.52;	author apb;	state Exp;
branches;
next	1.1.1.9;
commitid	ASMPsep5T29Kgjqy;

1.1.1.9
date	2015.08.11.18.07.01;	author apb;	state Exp;
branches;
next	1.1.1.10;
commitid	kmpTo6XW4QHazSwy;

1.1.1.10
date	2016.03.15.17.10.27;	author christos;	state Exp;
branches;
next	1.1.1.11;
commitid	LgY9iK53zwvbgLYy;

1.1.1.11
date	2016.06.01.00.03.14;	author agc;	state Exp;
branches
	1.1.1.11.2.1;
next	1.1.1.12;
commitid	SOPsfX18yKYt5H8z;

1.1.1.12
date	2016.08.07.00.48.59;	author kre;	state Exp;
branches;
next	1.1.1.13;
commitid	rhYGciKcCLWDbjhz;

1.1.1.13
date	2016.09.29.20.40.49;	author kre;	state Exp;
branches;
next	1.1.1.14;
commitid	AKHKNrnsUu7T4eoz;

1.1.1.14
date	2016.10.20.23.12.25;	author kre;	state Exp;
branches;
next	1.1.1.15;
commitid	3et8Pru6nxO2fWqz;

1.1.1.15
date	2016.11.03.09.52.33;	author kre;	state Exp;
branches;
next	1.1.1.16;
commitid	MiCzk6brxTdKmFsz;

1.1.1.16
date	2016.11.24.05.43.11;	author kre;	state Exp;
branches
	1.1.1.16.2.1;
next	1.1.1.17;
commitid	iDuhgxvdwCTkjlvz;

1.1.1.17
date	2017.03.01.00.37.15;	author kre;	state Exp;
branches
	1.1.1.17.4.1;
next	1.1.1.18;
commitid	G61CluXIjUN4vMHz;

1.1.1.18
date	2017.10.24.01.25.56;	author kre;	state Exp;
branches;
next	1.1.1.19;
commitid	mbHKYe3Y2Ihs9fcA;

1.1.1.19
date	2018.01.24.13.51.57;	author kre;	state Exp;
branches
	1.1.1.19.2.1;
next	1.1.1.20;
commitid	PPD9y1NZfop2k8oA;

1.1.1.20
date	2018.03.24.01.44.52;	author kre;	state Exp;
branches;
next	1.1.1.21;
commitid	IWaIjLBDDMC1pEvA;

1.1.1.21
date	2018.05.04.10.53.16;	author kre;	state Exp;
branches
	1.1.1.21.2.1;
next	1.1.1.22;
commitid	T65I1ypytjur7YAA;

1.1.1.22
date	2018.10.19.04.31.34;	author kre;	state Exp;
branches;
next	1.1.1.23;
commitid	iPAtPIMEH88HBwWA;

1.1.1.23
date	2018.12.30.00.40.41;	author kre;	state Exp;
branches;
next	1.1.1.24;
commitid	2NsExeiOIm301L5B;

1.1.1.24
date	2019.03.26.10.06.12;	author kre;	state Exp;
branches
	1.1.1.24.2.1;
next	1.1.1.25;
commitid	0PGwXCYDuCdCnRgB;

1.1.1.25
date	2019.10.08.02.43.57;	author kre;	state Exp;
branches;
next	1.1.1.26;
commitid	1AlmCKr6wQbiD0GB;

1.1.1.26
date	2020.04.25.12.16.58;	author kre;	state Exp;
branches;
next	1.1.1.27;
commitid	ABpciWj76gKinL5C;

1.1.1.27
date	2020.10.08.04.27.24;	author kre;	state Exp;
branches;
next	1.1.1.28;
commitid	tv1N52yw9rdnr3rC;

1.1.1.28
date	2020.10.17.08.27.22;	author kre;	state Exp;
branches;
next	1.1.1.29;
commitid	cBKle9eY0XvLtesC;

1.1.1.29
date	2020.10.22.08.23.32;	author kre;	state Exp;
branches;
next	1.1.1.30;
commitid	tk3xk48iapjuiSsC;

1.1.1.30
date	2020.12.31.07.49.54;	author kre;	state Exp;
branches;
next	1.1.1.31;
commitid	ZiQZHrT9SnNrRRBC;

1.1.1.31
date	2022.03.20.17.59.49;	author kre;	state Exp;
branches;
next	1.1.1.32;
commitid	2CSshxT0svJPXYwD;

1.1.1.32
date	2022.08.17.12.17.43;	author kre;	state Exp;
branches;
next	1.1.1.33;
commitid	u6rSFtMNjFhyfeQD;

1.1.1.33
date	2022.09.28.11.05.35;	author kre;	state Exp;
branches;
next	1.1.1.34;
commitid	3PdVZgcK4U46vCVD;

1.1.1.34
date	2022.10.30.01.02.50;	author kre;	state Exp;
branches;
next	1.1.1.35;
commitid	Amc6tVs2mojy8GZD;

1.1.1.35
date	2022.12.11.06.46.49;	author kre;	state Exp;
branches
	1.1.1.35.2.1;
next	1.1.1.36;
commitid	GVY8e8XbxvXQG65E;

1.1.1.36
date	2023.03.23.16.31.09;	author kre;	state Exp;
branches;
next	1.1.1.37;
commitid	Wi2azCEtD4c2EgiE;

1.1.1.37
date	2023.12.23.15.38.05;	author kre;	state Exp;
branches;
next	1.1.1.38;
commitid	7McRjQIF7CaNvBRE;

1.1.1.38
date	2024.02.05.21.34.27;	author kre;	state Exp;
branches
	1.1.1.38.2.1;
next	1.1.1.39;
commitid	Ig2l9D6xJLMl4iXE;

1.1.1.39
date	2024.10.29.21.24.42;	author kre;	state Exp;
branches;
next	1.1.1.40;
commitid	vTpQ269FGpZTqBvF;

1.1.1.40
date	2025.02.01.23.00.18;	author kre;	state Exp;
branches;
next	1.1.1.41;
commitid	mdTcRyY35YinUOHF;

1.1.1.41
date	2025.02.02.00.42.58;	author kre;	state Exp;
branches;
next	1.1.1.42;
commitid	pskpHkzc1w3BtPHF;

1.1.1.42
date	2025.12.19.00.58.37;	author kre;	state Exp;
branches;
next	1.1.1.43;
commitid	VAKtOMN53YKehXmG;

1.1.1.43
date	2026.03.09.17.24.10;	author kre;	state Exp;
branches;
next	;
commitid	cTUY34sPy6nU9kxG;

1.1.1.1.2.1
date	2014.08.08.08.56.48;	author tls;	state dead;
branches;
next	1.1.1.1.2.2;
commitid	igbBQGexpTfGAMLx;

1.1.1.1.2.2
date	2014.08.10.06.51.01;	author tls;	state Exp;
branches;
next	;
commitid	igbBQGexpTfGAMLx;

1.1.1.1.4.1
date	2014.09.21.18.50.41;	author snj;	state Exp;
branches;
next	1.1.1.1.4.2;
commitid	VVDYrvzaZp7ccfRx;

1.1.1.1.4.2
date	2014.11.18.18.32.29;	author snj;	state Exp;
branches;
next	1.1.1.1.4.3;
commitid	9Tbhffn21gxrfHYx;

1.1.1.1.4.3
date	2015.03.25.17.09.59;	author snj;	state Exp;
branches;
next	1.1.1.1.4.4;
commitid	Wjq3hLIIKowiH0fy;

1.1.1.1.4.4
date	2015.09.10.03.00.37;	author snj;	state Exp;
branches
	1.1.1.1.4.4.2.1;
next	1.1.1.1.4.5;
commitid	lDxmggelKO4mAEAy;

1.1.1.1.4.5
date	2016.04.11.09.59.00;	author snj;	state Exp;
branches
	1.1.1.1.4.5.2.1;
next	1.1.1.1.4.6;
commitid	t5XKjevTgDnb1c2z;

1.1.1.1.4.6
date	2016.12.13.07.29.24;	author snj;	state Exp;
branches;
next	1.1.1.1.4.7;
commitid	IyKxG8PcDdpGhNxz;

1.1.1.1.4.7
date	2017.03.02.07.46.02;	author snj;	state Exp;
branches
	1.1.1.1.4.7.2.1;
next	1.1.1.1.4.8;
commitid	jG5UaWqOyo95QWHz;

1.1.1.1.4.8
date	2017.11.05.20.42.18;	author snj;	state Exp;
branches;
next	1.1.1.1.4.9;
commitid	lUyNKQaJmTIaaTdA;

1.1.1.1.4.9
date	2018.03.25.14.06.32;	author martin;	state Exp;
branches;
next	1.1.1.1.4.10;
commitid	9bv6yBXyEFjntQvA;

1.1.1.1.4.10
date	2018.08.25.15.11.43;	author martin;	state Exp;
branches;
next	1.1.1.1.4.11;
commitid	vuSV7k7TN3teUvPA;

1.1.1.1.4.11
date	2018.10.30.19.29.39;	author martin;	state Exp;
branches;
next	1.1.1.1.4.12;
commitid	ezVFlUIpUFyOd1YA;

1.1.1.1.4.12
date	2019.01.07.14.00.31;	author martin;	state Exp;
branches;
next	;
commitid	N8FDNZdjMEmmbR6B;

1.1.1.1.4.4.2.1
date	2016.04.11.09.59.57;	author snj;	state Exp;
branches;
next	1.1.1.1.4.4.2.2;
commitid	TSwDz64NMxnG1c2z;

1.1.1.1.4.4.2.2
date	2016.12.13.07.28.23;	author snj;	state Exp;
branches;
next	1.1.1.1.4.4.2.3;
commitid	zc2ZPU46EscrhNxz;

1.1.1.1.4.4.2.3
date	2017.03.02.07.44.13;	author snj;	state Exp;
branches;
next	1.1.1.1.4.4.2.4;
commitid	IzENadUfmsFmPWHz;

1.1.1.1.4.4.2.4
date	2017.11.05.20.44.41;	author snj;	state Exp;
branches;
next	1.1.1.1.4.4.2.5;
commitid	CwYTRqFsgKE0bTdA;

1.1.1.1.4.4.2.5
date	2018.03.25.14.11.39;	author martin;	state Exp;
branches;
next	1.1.1.1.4.4.2.6;
commitid	tixpPUjkrqqavQvA;

1.1.1.1.4.4.2.6
date	2018.10.30.19.36.51;	author martin;	state Exp;
branches;
next	1.1.1.1.4.4.2.7;
commitid	jr5eATXwdQGhg1YA;

1.1.1.1.4.4.2.7
date	2019.01.07.14.04.55;	author martin;	state Exp;
branches;
next	;
commitid	hXICEH5aawLUcR6B;

1.1.1.1.4.5.2.1
date	2017.01.18.08.46.22;	author skrll;	state Exp;
branches;
next	1.1.1.1.4.5.2.2;
commitid	M6f3RyDtiAR3wqCz;

1.1.1.1.4.5.2.2
date	2017.03.13.07.41.25;	author skrll;	state Exp;
branches;
next	;
commitid	vH6VFbpxnMy7rmJz;

1.1.1.1.4.7.2.1
date	2017.11.05.20.43.37;	author snj;	state Exp;
branches;
next	1.1.1.1.4.7.2.2;
commitid	4GjqsuHWRN3DaTdA;

1.1.1.1.4.7.2.2
date	2018.03.25.14.09.31;	author martin;	state Exp;
branches;
next	1.1.1.1.4.7.2.3;
commitid	y4vLirt4t2sruQvA;

1.1.1.1.4.7.2.3
date	2018.10.30.19.31.47;	author martin;	state Exp;
branches;
next	1.1.1.1.4.7.2.4;
commitid	umzgDrJ1I3mze1YA;

1.1.1.1.4.7.2.4
date	2019.01.07.14.03.21;	author martin;	state Exp;
branches;
next	;
commitid	fL1PAPiDXb9mcR6B;

1.1.1.1.6.1
date	2014.08.08.08.56.48;	author tls;	state dead;
branches;
next	1.1.1.1.6.2;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.1.6.2
date	2014.08.20.00.00.20;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.11.2.1
date	2016.11.04.14.48.51;	author pgoyette;	state Exp;
branches;
next	1.1.1.11.2.2;
commitid	2m1JRwYmpwPkOOsz;

1.1.1.11.2.2
date	2017.01.07.08.56.02;	author pgoyette;	state Exp;
branches;
next	1.1.1.11.2.3;
commitid	uEL0C1YuiJrlV0Bz;

1.1.1.11.2.3
date	2017.03.20.06.56.54;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.1.1.16.2.1
date	2017.04.21.16.53.05;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.1.1.17.4.1
date	2017.11.02.21.02.06;	author snj;	state Exp;
branches;
next	1.1.1.17.4.2;
commitid	FmNdBv7Bu0C8mvdA;

1.1.1.17.4.2
date	2018.01.31.19.39.50;	author martin;	state Exp;
branches;
next	1.1.1.17.4.3;
commitid	I2GaJUZc3BCZ04pA;

1.1.1.17.4.3
date	2018.03.24.18.03.21;	author snj;	state Exp;
branches;
next	1.1.1.17.4.4;
commitid	DPgyGeUZFADBOJvA;

1.1.1.17.4.4
date	2018.05.06.09.42.38;	author martin;	state Exp;
branches;
next	1.1.1.17.4.5;
commitid	r1xiIW7nymU8FdBA;

1.1.1.17.4.5
date	2018.10.21.12.10.23;	author martin;	state Exp;
branches;
next	1.1.1.17.4.6;
commitid	Npq23L3YyCtN4PWA;

1.1.1.17.4.6
date	2019.01.02.15.48.01;	author martin;	state Exp;
branches;
next	1.1.1.17.4.7;
commitid	wMtLNC4aT7jwUd6B;

1.1.1.17.4.7
date	2020.12.07.19.52.52;	author martin;	state Exp;
branches;
next	1.1.1.17.4.8;
commitid	CQwaCiST8CPxCQyC;

1.1.1.17.4.8
date	2021.04.30.14.26.38;	author martin;	state Exp;
branches;
next	1.1.1.17.4.9;
commitid	pZkzbpzoDpNRbkRC;

1.1.1.17.4.9
date	2022.10.26.18.16.43;	author martin;	state Exp;
branches;
next	1.1.1.17.4.10;
commitid	d5w1InjeydTDYfZD;

1.1.1.17.4.10
date	2023.12.30.19.00.32;	author martin;	state Exp;
branches;
next	1.1.1.17.4.11;
commitid	QBjvTBDay8GbpwSE;

1.1.1.17.4.11
date	2024.02.17.15.55.08;	author martin;	state Exp;
branches;
next	;
commitid	UCxcewhi2jVCNNYE;

1.1.1.19.2.1
date	2018.03.30.06.20.10;	author pgoyette;	state Exp;
branches;
next	1.1.1.19.2.2;
commitid	h5ZWTFXyqL8kJrwA;

1.1.1.19.2.2
date	2018.05.21.04.35.54;	author pgoyette;	state Exp;
branches;
next	1.1.1.19.2.3;
commitid	X5L8kSrBWQcDt7DA;

1.1.1.19.2.3
date	2018.10.20.06.58.21;	author pgoyette;	state Exp;
branches;
next	1.1.1.19.2.4;
commitid	mTSoqZEZ4arHnFWA;

1.1.1.19.2.4
date	2019.01.18.08.50.09;	author pgoyette;	state Exp;
branches;
next	;
commitid	Lmlzg3OVT2cd6f8B;

1.1.1.21.2.1
date	2019.06.10.22.05.05;	author christos;	state Exp;
branches;
next	1.1.1.21.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.21.2.2
date	2020.04.13.08.03.06;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.1.1.24.2.1
date	2019.11.24.08.30.27;	author martin;	state Exp;
branches;
next	1.1.1.24.2.2;
commitid	8LxyeqV11U4P15MB;

1.1.1.24.2.2
date	2020.06.07.13.15.06;	author martin;	state Exp;
branches;
next	1.1.1.24.2.3;
commitid	0KB7pZxieJ8LiibC;

1.1.1.24.2.3
date	2020.10.11.11.26.25;	author martin;	state Exp;
branches;
next	1.1.1.24.2.4;
commitid	PwOzakCxTuLGEtrC;

1.1.1.24.2.4
date	2020.10.18.18.18.44;	author martin;	state Exp;
branches;
next	1.1.1.24.2.5;
commitid	gmJoaxKWL2AdIpsC;

1.1.1.24.2.5
date	2020.11.01.17.19.35;	author martin;	state Exp;
branches;
next	1.1.1.24.2.6;
commitid	JDEaHjkuPMobWcuC;

1.1.1.24.2.6
date	2021.04.06.18.01.21;	author martin;	state Exp;
branches;
next	1.1.1.24.2.7;
commitid	FREP6fQiFE5c9gOC;

1.1.1.24.2.7
date	2022.10.20.13.18.54;	author martin;	state Exp;
branches;
next	1.1.1.24.2.8;
commitid	vbCaDtdjfZc6wsYD;

1.1.1.24.2.8
date	2023.12.30.18.35.31;	author martin;	state Exp;
branches;
next	1.1.1.24.2.9;
commitid	vv46SLJIoTsCgwSE;

1.1.1.24.2.9
date	2024.02.17.11.32.19;	author martin;	state Exp;
branches;
next	1.1.1.24.2.10;
commitid	friNK1b3ratclMYE;

1.1.1.24.2.10
date	2025.04.12.12.53.22;	author martin;	state Exp;
branches;
next	;
commitid	rNByoqGRgcjoiLQF;

1.1.1.35.2.1
date	2023.04.25.15.58.37;	author martin;	state Exp;
branches;
next	1.1.1.35.2.2;
commitid	AZ8cpWX7dh1BovmE;

1.1.1.35.2.2
date	2023.12.29.20.41.11;	author martin;	state Exp;
branches;
next	1.1.1.35.2.3;
commitid	UnNQohsmNUSXWoSE;

1.1.1.35.2.3
date	2024.02.06.12.22.41;	author martin;	state Exp;
branches;
next	1.1.1.35.2.4;
commitid	pTARKyvqsnBQYmXE;

1.1.1.35.2.4
date	2025.04.12.12.47.26;	author martin;	state Exp;
branches;
next	;
commitid	iC6dUDY9pz4hgLQF;

1.1.1.38.2.1
date	2025.08.02.05.54.24;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;


desc
@@


1.5
log
@Merge tzdata2026a
@
text
@# Make and install tzdb code and data.
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# Request POSIX conformance; this must be the first non-comment line.
.POSIX:
# By default, builds of code and data assume POSIX.1-2001 or later;
# this assumption can be relaxed by tailoring the build as described below.
# On older platforms you may need to scrounge for POSIX conformance.
# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007),
# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'.
# Reproducible builds of distribution tarballs also need a copy of the
# Git repository, and assume the behavior of the following programs
# (or later versions):
#	Git 2.7.0 (2016)
#	GNU Coreutils 6.3 (2006)
#	GNU Tar 1.14 (2004)
#	GnuPG 1.4 (2004)
# Although tzdb does not come with a software bill of materials,
# you should be able to construct one based on the above information,
# your platform, and the way you use this Makefile.

# To affect how this Makefile works, you can run a shell script like this:
#
#	#!/bin/sh
#	make CFLAGS='-O2 -DHAVE_GETTEXT=0' "$@@"
#
# This example script is appropriate for a GNU/Linux system
# which needs more optimization than default, and which does not want
# gettext's internationalization of diagnostics.
#
# Alternatively, you can simply edit this Makefile to tailor the following
# macro definitions.

###############################################################################
# Start of macros that one plausibly might want to tailor.

# Package name for the code distribution.
PACKAGE=	tzcode

# Version number for the distribution, overridden in the 'tarballs' rule below.
VERSION=	unknown

# Email address for bug reports.
BUGEMAIL=	tz@@iana.org

# DATAFORM selects the data format.
# Available formats represent essentially the same data, albeit
# possibly with minor discrepancies that users are not likely to notice.
# To get new features and the best data right away, use:
#	DATAFORM=	vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
#	DATAFORM=	main
# To wait even longer for new features, use:
#	DATAFORM=	rearguard
# Rearguard users might also want "ZFLAGS = -b fat"; see below.
DATAFORM=		main

# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
# 'zic -l -' to remove it, or 'zic -l rightzone' to change it.
# Use the command
#	make zonenames
# to get a list of the values you can use for LOCALTIME.

LOCALTIME=	Factory


# Installation locations.
#
# The defaults are suitable for Debian, except that if REDO is
# posix_right or right_posix then files that Debian puts under
# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead
# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps,
# respectively.  Problems with the Debian approach are discussed in
# the commentary for the right_posix rule (below).

# Destination directory, which can be used for staging.
# 'make DESTDIR=/stage install' installs under /stage (e.g., to
# /stage/etc/localtime instead of to /etc/localtime).  Files under
# /stage are not intended to work as-is, but can be copied by hand to
# the root directory later.  If DESTDIR is empty, 'make install' does
# not stage, but installs directly into production locations.
DESTDIR =

# Everything is installed into subdirectories of TOPDIR, and used there.
# TOPDIR should be empty (meaning the root directory),
# or a directory name that does not end in "/".
# TOPDIR should be empty or an absolute name unless you're just testing.
TOPDIR =

# The default local timezone is taken from the file TZDEFAULT.
TZDEFAULT = $(TOPDIR)/etc/localtime

# The subdirectory containing installed program and data files, and
# likewise for installed files that can be shared among architectures.
# These should be relative file names.
USRDIR = usr
USRSHAREDIR = $(USRDIR)/share

# "Compiled" timezone information is placed in the "TZDIR" directory
# (and subdirectories).
# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
TZDIR_BASENAME=	zoneinfo
TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME)

# The "tzselect" and (if you do "make INSTALL") "date" commands go in:
BINDIR = $(TOPDIR)/$(USRDIR)/bin

# The "zdump" command goes in:
ZDUMPDIR = $(BINDIR)

# The "zic" command goes in:
ZICDIR = $(TOPDIR)/$(USRDIR)/sbin

# Manual pages go in subdirectories of. . .
MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man

# Library functions are put in an archive in LIBDIR.
LIBDIR = $(TOPDIR)/$(USRDIR)/lib


# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck
TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
  uint_least64_t.ck

# What kind of TZif data files to generate.  (TZif is the binary time
# zone data format that zic generates; see Internet RFC 9636.)
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
#	REDO=		posix_only
# below.  If you want only "right" time, with values interpreted
# as seconds since the epoch (counting leap seconds), use
#	REDO=		right_only
# below.  If you want both sets of data available, with leap seconds not
# counted normally, use
#	REDO=		posix_right
# below.  If you want both sets of data available, with leap seconds counted
# normally, use
#	REDO=		right_posix
# below.  POSIX mandates that leap seconds not be counted, and a
# nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with
# these, use "posix_only" or "posix_right".  Use POSIX time on systems with
# leap smearing; this can work better than unsmeared "right" time with
# applications that are not leap second aware, and is closer to unsmeared
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).

REDO=		posix_only

# Whether to put an "Expires" line in the leapseconds file.
# Use EXPIRES_LINE=1 to put the line in, 0 to omit it.
# The EXPIRES_LINE value matters only if REDO's value contains "right".
# If you change EXPIRES_LINE, remove the leapseconds file before running "make".
# zic's support for the Expires line was introduced in tzdb 2020a,
# and was modified in tzdb 2021b to generate version 4 TZif files.
# EXPIRES_LINE defaults to 0 for now so that the leapseconds file
# can be given to pre-2020a zic implementations and so that TZif files
# built by newer zic implementations can be read by pre-2021b libraries.
EXPIRES_LINE=	0

# To install data in text form that has all the information of the TZif data,
# (optionally incorporating leap second information), use
#	TZDATA_TEXT=	tzdata.zi leapseconds
# To install text data without leap second information (e.g., because
# REDO='posix_only'), use
#	TZDATA_TEXT=	tzdata.zi
# To avoid installing text data, use
#	TZDATA_TEXT=

TZDATA_TEXT=	leapseconds tzdata.zi

# For backward-compatibility links for old zone names, use
#	BACKWARD=	backward
# To omit these links, use
#	BACKWARD=

BACKWARD=	backward

# If you want out-of-scope and often-wrong data from the file 'backzone',
# but only for entries listed in the backward-compatibility file zone.tab, use
#	PACKRATDATA=	backzone
#	PACKRATLIST=	zone.tab
# If you want all the 'backzone' data, use
#	PACKRATDATA=	backzone
#	PACKRATLIST=
# To omit this data, use
#	PACKRATDATA=
#	PACKRATLIST=

PACKRATDATA=
PACKRATLIST=

# The name of a locale using the UTF-8 encoding, used during self-tests.
# The tests are skipped if the name does not appear to work on this system.

UTF8_LOCALE=	en_US.utf8

# Extra flags for producing man page files like tzfile.5.txt.
# These flags are used only if groff (or mandoc) is present.
# Each option should begin with "-" and should lack shell metacharacters.
# Plausible options include -Tascii and -Tutf8.
MANFLAGS=	-Tutf8

# Non-default libraries needed to link.
# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0.
LDLIBS=

# Add the following to an uncommented "CFLAGS=" line as needed
# to override defaults specified in the source code or by the system.
# "-DFOO" is equivalent to "-DFOO=1".
#  -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime
#	formats that generate only the last two digits of year numbers
#  -DEPOCH_LOCAL if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
#  -DFREE_PRESERVES_ERRNO=[01] if the 'free' function munges or preserves errno
#	(default is guessed)
#  -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
#	on POSIX platforms predating POSIX.1-2024
#  -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
#  -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm
#  -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
#  -DHAVE_FCHMOD=0 if your system lacks the fchmod function
#  -DHAVE__GENERIC=0 if _Generic does not work*
#  -DHAVE_GETEUID=0 if gete?[ug]id do not work
#  -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux),
#	-DHAVE_GETRANDOM=0 to avoid using getrandom
#  -DHAVE_GETRESUID=0 if getres[ug]id do not work
#  -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris),
#	where LDLIBS also needs to contain -lintl on some hosts;
#	-DHAVE_GETTEXT=0 to avoid using gettext
#  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
#	ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier
#	(Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
#  -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+
#  -DHAVE_ISSETUGID=1 if issetugid works, 0 otherwise (default is guessed)
#	If 0, you may also use -DHAVE_SYS_AUXV_H=1 if <sys/auxv.h> works,
#	0 otherwise (default is guessed).
#  -DHAVE_LINK=0 if your system lacks a link function
#  -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function
#  -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz
#	localtime_rz can make zdump significantly faster, but is nonstandard.
#  -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure.
#  -DHAVE_MEMPCPY=1 if your system has mempcpy, 0 if not (default is guessed)
#  -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
#	variables like 'tzname' required by POSIX
#  -DHAVE_PWD_H=0 if your system lacks pwd.h, grp.h and corresponding functions
#	If 0, you may also need -Dgid_t=G -Duid_t=U
#	to define gid_t and uid_t to be types G and U.
#  -DHAVE_SETENV=0 if your system lacks the setenv function
#  -DHAVE_SETMODE=[01] if your system lacks or has the setmode and getmode
#	functions (default is guessed)
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+
#  -DHAVE_STDCKDINT_H=0 if neither <stdckdint.h> nor substitutes like
#	__builtin_add_overflow work*
#  -DHAVE_STDINT_H=0 if <stdint.h> does not work*+
#  -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
#  -DHAVE_STRDUP=0 if your system lacks the strdup function
#  -DHAVE_STRNLEN=0 if your system lacks the strnlen function+
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function+
#  -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a status-change member
#	of type struct timespec, so code should use st_ctime instead;
#	but if the status-change member name is st_ctimespec,
#	use -Dst_ctim=st_ctimespec instead (default is guessed)+
#  -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+
#  -DHAVE_SYMLINK=0 if your system lacks the symlink function
#  -DHAVE_SYS_STAT_H=0 if <sys/stat.h> does not work*
#	If 0, you may also need -Dmode_t=M to define mode_t to be type M.
#  -DHAVE_TZSET=0 if your system lacks a tzset function
#  -DHAVE_UNISTD_H=0 if <unistd.h> does not work*
#  -DHAVE_UTMPX_H=0 if <utmpx.h> does not work*
#  -Dlocale_t=XXX if your system uses XXX instead of locale_t
#  -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
#  -DOPENAT_TZDIR if tzset should use openat on TZDIR then a relative open.
#	See localtime.c for details.
#  -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
#	Typically it is better to use a later standard.  For example,
#	with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
#	Even with -DPORT_TO_C89, the code needs at least one C99
#	feature (integers at least 64 bits wide) and maybe more.
#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
#	with external linkage, e.g., applications cannot define 'localtime'.
#  -Dssize_t=int on hosts like MS-Windows that lack ssize_t
#  -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
#	Although -DSUPPORT_C89=0 might work around latent bugs in callers,
#	it does not conform to POSIX.
#  -DSUPPORT_POSIX2008 if the library should support older POSIX callers+
#	However, this might cause problems in POSIX.1-2024-or-later callers.
#  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
#	security implications and is not recommended for general use
#  -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
#	not needed by the main-program tz code, which is single-threaded.
#	Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
#	The following options can also be used:
#	  -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps,
#	    at some cost in CPU time and energy in multi-threaded apps.
#	    The following options can also be used:
#	      -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded
#		variable, 0 otherwise (default is guessed)
#	      -DHAVE_SYS_SINGLE_THREADED_H=0 if <sys/single_threaded.h> works,
#		0 otherwise (default is guessed)
#	  -DTHREAD_RWLOCK to use read-write locks instead of mutexes.
#	    This can improve parallelism and thus save real time
#	    if many threads call tzcode functions simultaneously.
#	    It also costs CPU time and thus energy.
#	  -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime
#	    return different struct tm * addresses in different threads.
#	    This supports nonportable programs that call
#	    gmtime/localtime/offtime when they should call
#	    gmtime_r/localtime_r/offtime_r to avoid races.
#	    Because the corresponding storage is freed on thread exit,
#	    this option is incompatible with POSIX.1-2024 and earlier.
#	    It also costs CPU time and memory.
#  -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
#	This is intended for internal use only; it mangles external names.
#  -DTZ_CHANGE_INTERVAL=N if functions depending on TZ should check
#	no more often than every N seconds for TZif file changes.
#	If N is negative (the default), no such checking is done.
#	This option is intended for platforms that want localtime etc.
#	to respond to changes to a file selected by TZ, including to
#	TZDEFAULT (normally /etc/localtime) if TZ is unset.
#	On these platforms, REDO should be "posix_only" or "posix_right".
#	This option does not affect tzalloc-allocated objects.
#  -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
#  -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
#	the default is system-supplied, typically "/usr/lib/locale"
#  -DTZ_RUNTIME_LEAPS=0 to disable runtime support for leap seconds.
#	This conforms to POSIX, shrinks tzcode's attack surface,
#	and is more efficient.  However, it fails to support Internet
#	RFC 9636's leap seconds.
#  -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
#	DST transitions for proleptic format TZ strings lacking them.
#	If not specified, it defaults to US rules for future DST transitions.
#	This mishandles some past timestamps, as US DST rules have changed.
#	It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
#	as Europe and US DST rules differ.
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254)
#  -DUNINIT_TRAP if reading uninitialized storage can cause problems
#	other than simply getting garbage data
#  -DUSE_LTZ=0 to build zdump with the system time zone library
#	Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
#  -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and
#	similarly for "slim".  Fat TZif files work around incompatibilities
#	and bugs in some TZif readers, notably older ones that
#	ignore or otherwise mishandle 64-bit data in TZif files;
#	however, fat TZif files may trigger bugs in newer TZif readers.
#	Slim TZif files are more efficient, and are the default.
#  -DZIC_MAX_ABBR_LEN_WO_WARN=3
#	(or some other number) to set the maximum time zone abbreviation length
#	that zic will accept without a warning (the default is 6)
#  -g to generate symbolic debugging info
#  -Idir to include from directory 'dir'
#  -O0 to disable optimization; other -O options to enable more optimization
#  -Uname to remove any definition of the macro 'name'
#  $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking
#
# * Options marked "*" can be omitted if your compiler is C23 compatible.
# * Options marked "+" are obsolescent and are planned to be removed
#   once the code assumes C99 or later (say in the year 2029)
#   and POSIX.1-2024 or later (say in the year 2034).
#
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
GCC_INSTRUMENT = \
  -fsanitize=undefined -fsanitize-address-use-after-scope \
  -fsanitize-trap=all -fstack-protector
# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow.
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
  $(GCC_INSTRUMENT) \
  -Wall -Wextra \
  -Walloc-size-larger-than=100000 -Warray-bounds=2 \
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \
  -Wdate-time \
  -Wdeclaration-after-statement -Wdouble-promotion \
  -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
  -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
  -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \
  -Wmissing-declarations -Wmissing-prototypes \
  -Wmissing-variable-declarations -Wnested-externs \
  -Wnull-dereference \
  -Wold-style-definition -Woverlength-strings -Wpointer-arith \
  -Wshadow -Wshift-overflow=2 -Wstrict-overflow \
  -Wstrict-prototypes -Wstringop-overflow=4 \
  -Wsuggest-attribute=cold \
  -Wsuggest-attribute=const -Wsuggest-attribute=format \
  -Wsuggest-attribute=malloc \
  -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
  -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
  -Wvariadic-macros -Wvla -Wwrite-strings \
  -Wzero-as-null-pointer-constant \
  -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
#	-DTM_GMTOFF=tm_gmtoff
# to the end of the "CFLAGS=" line.  If not defined, the code attempts to
# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this.
# Similarly, if your system has a "zone abbreviation" field, define
#	-DTM_ZONE=tm_zone
# and define NO_TM_ZONE to suppress any guessing.
# Although POSIX.1-2024 requires these fields and they are widely available
# on GNU/Linux and BSD systems, some older systems lack them.
#
# The next batch of options control support for external variables
# exported by tzcode.  In practice these variables are less useful
# than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
# #
# # To omit or support the external variable "tzname", add one of:
# #	-DHAVE_TZNAME=0 # do not support "tzname"
# #	-DHAVE_TZNAME=1 # support "tzname", which is defined by system library
# #	-DHAVE_TZNAME=2 # support and define "tzname"
# # to the "CFLAGS=" line.  Although "tzname" is required by POSIX.1-1988
# # and later, its contents are unspecified if you use a geographical TZ
# # and the variable is planned to be removed in a future POSIX edition.
# # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
# # crashes when combined with some platforms' standard libraries,
# # presumably due to memory allocation issues.
# #
# # To omit or support the external variables "timezone" and "daylight", add
# #	-DUSG_COMPAT=0 # do not support
# #	-DUSG_COMPAT=1 # support, and variables are defined by system library
# #	-DUSG_COMPAT=2 # support and define variables
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI),
# # although their contents are unspecified if you use a geographical TZ
# # and the variables are planned to be removed in a future edition of POSIX.
# # If not defined, the code attempts to guess USG_COMPAT from other macros.
# #
# # To support the external variable "altzone", add
# #	-DALTZONE=0 # do not support
# #	-DALTZONE=1 # support "altzone", which is defined by system library
# #	-DALTZONE=2 # support and define "altzone"
# # to the end of the "CFLAGS=" line; although "altzone" appeared in
# # System V Release 3.1 it has not been standardized.
# # If not defined, the code attempts to guess ALTZONE from other macros.
#
# If you want functions that were inspired by early versions of X3J11's work,
# add
#	-DSTD_INSPIRED
# to the end of the "CFLAGS=" line.  This arranges for the following
# functions to be added to the time conversion library.
# "offtime" is like "gmtime" except that it accepts a second (long) argument
# that gives an offset to add to the time_t when converting it.
# "offtime_r" is to "offtime" what "gmtime_r" is to "gmtime".
# I.e., "offtime" and "offtime_r" are like calling "localtime_rz"
# with a fixed-offset zone.
# "timelocal" is nearly equivalent to "mktime".
# "timeoff" is like "timegm" except that it accepts a second (long) argument
# that gives an offset to use when converting to a time_t.
# I.e., "timeoff" is like calling "mktime_z" with a fixed-offset zone.
# "posix2time" and "time2posix" are described in an included manual page.
# X3J11's work does not describe any of these functions.
# These functions may well disappear in future releases of the time
# conversion package.
#
# If you don't want functions that were inspired by NetBSD, add
#	-DNETBSD_INSPIRED=0
# to the end of the "CFLAGS=" line.  Otherwise, the functions
# "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the
# time library, and if STD_INSPIRED is also defined to nonzero the functions
# "posix2time_z" and "time2posix_z" are added as well.
# The functions ending in "_z" (or "_rz") are like their unsuffixed
# (or suffixed-by-"_r") counterparts, except with an extra first
# argument of opaque type timezone_t that specifies the timezone.
# "tzalloc" allocates a timezone_t value, and "tzfree" frees it.
#
# If you want to allocate state structures in localtime, add
#	-DALL_STATE
# to the end of the "CFLAGS=" line.  Storage is obtained by calling malloc.
#
# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
# out by the National Institute of Standards and Technology
# which claims to test C and POSIX conformance.  If you want to pass PCTS, add
#	-DPCTS
# to the end of the "CFLAGS=" line.
#
# If you want strict compliance with XPG4 as of 1994-04-09, add
#	-DXPG4_1994_04_09
# to the end of the "CFLAGS=" line.  This causes "strftime" to always return
# 53 as a week number (rather than 52 or 53) for January days before
# January's first Monday when a "%V" format is used and January 1
# falls on a Friday, Saturday, or Sunday.
#
# POSIX says CFLAGS defaults to "-O 1".
# Uncomment the following line and edit its contents as needed.

#CFLAGS= -O 1


# The name of a POSIX-like library archiver, its flags, C compiler,
# linker flags, and 'make' utility.  Ordinarily the defaults suffice.
# The commented-out values are the defaults specified by POSIX.1-2024.
#AR = ar
#ARFLAGS = -rv
#CC = c17
#LDFLAGS =
#MAKE = make

# Where to fetch leap-seconds.list from.
leaplist_URI = \
  https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
# The file is generated by the IERS Earth Orientation Centre, in Paris.
leaplist_TZ = Europe/Paris
#
# To fetch leap-seconds.list from NIST via a less-secure protocol
# and with less-volatile metadata, use these settings:
#leaplist_URI = ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list
#leaplist_TZ = America/Denver

# The zic command and its arguments.

zic=		./zic
ZIC=		$(zic) $(ZFLAGS)

# To shrink the size of installed TZif files,
# append "-r @@N" to omit data before N-seconds-after-the-Epoch.
# To grow the files and work around bugs in older applications,
# possibly at the expense of introducing bugs in newer ones,
# append "-b fat"; see ZIC_BLOAT_DEFAULT above.
# See the zic man page for more about -b and -r.
ZFLAGS=

# How to use zic to install TZif files.

ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)'

# The name of a POSIX-compliant 'awk' on your system.
# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work.
# Also, it is better (though not essential) if 'awk' supports UTF-8,
# and unfortunately mawk and busybox awk do not support UTF-8.
# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems.
AWK=		awk

# The full path name of a POSIX-compliant shell, preferably one that supports
# the Korn shell's 'select' statement as an extension.
# These days, Bash is the most popular.
# It should be OK to set this to /bin/sh, on platforms where /bin/sh
# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash
# is typically nicer if it works.
KSHELL=		/bin/bash

# Name of curl <https://curl.haxx.se/>, used for HTML validation
# and to fetch leap-seconds.list from upstream.
# Set CURL=: to disable use of the Internet.
CURL=		curl

# Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions.
GPG=		gpg

# This expensive test requires USE_LTZ.
# To suppress it, define this macro to be empty.
CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives

# SAFE_CHAR is a regular expression that matches a safe character.
# Some parts of this distribution are limited to safe characters;
# others can use any UTF-8 character.
# For now, the safe characters are a safe subset of ASCII.
# The caller must set the shell variable 'sharp' to the character '#',
# since Makefile macros cannot contain '#'.
# TAB_CHAR is a single tab character, in single quotes.
TAB_CHAR=	'	'
SAFE_CHARSET1=	$(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@@'
SAFE_CHARSET2=	'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
SAFE_CHARSET3=	'abcdefghijklmnopqrstuvwxyz{|}~'
SAFE_CHARSET=	$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
SAFE_CHAR=	'[]'$(SAFE_CHARSET)'-]'

# These non-alphabetic, non-ASCII printable characters are
# used in commentary or in generated *.txt files
# and are not likely to cause confusion.
UNUSUAL_OK_CHARSET= §«°±»½¾×–‘’“”•→−≤★⟨⟩⯪

# Put this in a bracket expression to match spaces.
s = [:space:]

# OK_CHAR matches any character allowed in the distributed files.
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# multibyte letters are also allowed so that commentary can contain a
# few safe symbols and people's names and can quote non-English sources.
OK_CHAR=	'[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'

# SAFE_LINE matches a line of safe characters.
# SAFE_SHARP_LINE is similar, except any OK character can follow '#';
# this is so that comments can contain non-ASCII characters.
# OK_LINE matches a line of OK characters.
SAFE_LINE=	'^'$(SAFE_CHAR)'*$$'
SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$'
OK_LINE=	'^'$(OK_CHAR)'*$$'

# Flags to give 'tar' when making a distribution.
# Try to use flags appropriate for GNU tar.
GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \
  --numeric-owner --owner=0 --group=0 \
  --mode=go+u,go-w --sort=name
SETUP_TAR= \
  export LC_ALL=C && \
  if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \
    TAR='tar $(GNUTARFLAGS)'; \
  else \
    TAR=tar; \
  fi

# Flags to give 'gzip' when making a distribution.
GZIPFLAGS=	-9n

# When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported.
# This makes it easier to see which Zone has been affected.
SETUP_DIFF_TZS = \
  if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \
    DIFF_TZS='diff -u -F^TZ='; \
  else \
    DIFF_TZS='diff -u'; \
  fi

# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:

# POSIX prohibits defining or using SHELL.  However, csh users on systems
# that use the user shell for Makefile commands may need to define SHELL.
#SHELL=		/bin/sh

# End of macros that one plausibly might want to tailor.
###############################################################################


TZCOBJS=	zic.o
TZDOBJS=	zdump.o localtime.o strftime.o
DATEOBJS=	date.o localtime.o strftime.o
LIBSRCS=	localtime.c asctime.c difftime.c strftime.c
LIBOBJS=	localtime.o asctime.o difftime.o strftime.o
HEADERS=	tzfile.h private.h
NONLIBSRCS=	zic.c zdump.c
NEWUCBSRCS=	date.c
SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \
			tzselect.ksh workman.sh
MANS=		newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
			tzfile.5 tzselect.8 zic.8 zdump.8
MANTXTS=	newctime.3.txt newstrftime.3.txt newtzset.3.txt \
			time2posix.3.txt \
			tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
			date.1.txt
COMMON=		calendars CONTRIBUTING LICENSE Makefile \
			NEWS README SECURITY theory.html version
WEB_PAGES=	tz-art.html tz-how-to.html tz-link.html
CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck
DOCS=		$(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
PRIMARY_YDATA=	africa antarctica asia australasia \
		europe northamerica southamerica
YDATA=		$(PRIMARY_YDATA) etcetera
NDATA=		factory
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward
TDATA=		$(YDATA) $(NDATA) $(BACKWARD)
ZONETABLES=	zone.tab zone1970.tab zonenow.tab
TABDATA=	iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
LEAP_DEPS=	leapseconds.awk leap-seconds.list
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) \
		  $(PACKRATDATA) $(PACKRATLIST)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA) $(PACKRATLIST)
DATA=		$(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
			leapseconds $(ZONETABLES)
AWK_SCRIPTS=	checklinks.awk checknow.awk checktab.awk leapseconds.awk \
			ziguard.awk zishrink.awk
MISC=		$(AWK_SCRIPTS)
TZS_YEAR=	2050
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
TZS=		to$(TZS_YEAR).tzs
TZS_NEW=	to$(TZS_YEAR)new.tzs
TZS_DEPS=	$(YDATA) localtime.c private.h \
			strftime.c tzfile.h zdump.c zic.c
TZDATA_DIST = $(COMMON) $(DATA) $(MISC)
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(TZDATA_DIST) $(DOCS) $(SOURCES) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)

# Consult these files when deciding whether to rebuild the 'version' file.
# This list is not the same as the output of 'git ls-files', since
# .gitignore is not distributed.
VERSION_DEPS= \
		calendars CONTRIBUTING LICENSE Makefile NEWS README SECURITY \
		africa antarctica asctime.c asia australasia \
		backward backzone \
		checklinks.awk checknow.awk checktab.awk \
		date.1 date.c difftime.c \
		etcetera europe factory iso3166.tab \
		leap-seconds.list leapseconds.awk localtime.c \
		newctime.3 newstrftime.3 newtzset.3 northamerica \
		private.h southamerica strftime.c theory.html \
		time2posix.3 tz-art.html tz-how-to.html tz-link.html \
		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
		workman.sh zdump.8 zdump.c zic.8 zic.c \
		ziguard.awk zishrink.awk \
		zone.tab zone1970.tab zonenow.tab

all:		tzselect zic zdump libtz.a $(TABDATA) \
		  vanguard.zi main.zi rearguard.zi

ALL:		all date $(ENCHILADA)

install:	all $(DATA) $(REDO) $(MANS)
		mkdir -p '$(DESTDIR)$(BINDIR)' \
			'$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \
			'$(DESTDIR)$(LIBDIR)' \
			'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
			'$(DESTDIR)$(MANDIR)/man8'
		$(ZIC_INSTALL) -l $(LOCALTIME) \
			-t '$(DESTDIR)$(TZDEFAULT)'
		cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
		cp tzselect '$(DESTDIR)$(BINDIR)/.'
		cp zdump '$(DESTDIR)$(ZDUMPDIR)/.'
		cp zic '$(DESTDIR)$(ZICDIR)/.'
		cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
		$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
		cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
		cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
		cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'

INSTALL:	ALL install date.1
		mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
		cp date '$(DESTDIR)$(BINDIR)/.'
		cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'

# Calculate version number from git, if available.
# Otherwise, use $(VERSION) unless it is "unknown" and there is already
# a 'version' file, in which case reuse the existing 'version' contents
# and append "-dirty" if the contents do not already end in "-dirty".
version:	$(VERSION_DEPS)
		{ (type git) >/dev/null 2>&1 && \
		  V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty) || \
		  if test '$(VERSION)' = unknown && read -r V <$@@; then \
		    V=$${V%-dirty}-dirty; \
		  else \
		    V='$(VERSION)'; \
		  fi; } && \
		printf '%s\n' "$$V" >$@@.out
		mv $@@.out $@@

# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST.
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
		$(AWK) \
		  -v DATAFORM=$(@@:.zi=) \
		  -v PACKRATDATA='$(PACKRATDATA)' \
		  -v PACKRATLIST='$(PACKRATLIST)' \
		  -f ziguard.awk \
		  $(TDATA) $(PACKRATDATA) >$@@.out
		mv $@@.out $@@
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
		read -r version <version && \
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
		    $(DATAFORM).zi >$@@.out
		mv $@@.out $@@

tzdir.h:
		printf '%s\n' >$@@.out \
		  '#ifndef TZDEFAULT' \
		  '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \
		  '#endif' \
		  '#ifndef TZDIR' \
		  '# define TZDIR "$(TZDIR)" /* TZif directory */' \
		  '#endif'
		mv $@@.out $@@

version.h:	version
		read -r VERSION <version && printf '%s\n' \
		  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
		  "static char const TZVERSION[]=\"$$VERSION\";" \
		  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
		  >$@@.out
		mv $@@.out $@@

zdump:		$(TZDOBJS)
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)

zic:		$(TZCOBJS)
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)

leapseconds:	$(LEAP_DEPS)
		$(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \
		  -f leapseconds.awk leap-seconds.list >$@@.out
		mv $@@.out $@@

# Awk script to extract a Git-style author from leap-seconds.list comments.
EXTRACT_AUTHOR = \
  author_line { sub(/^.[[:space:]]*/, ""); \
      sub(/:[[:space:]]*/, " <"); \
      printf "%s>\n", $$0; \
      success = 1; \
      exit \
  } \
  /Questions or comments to:/ { author_line = 1 } \
  END { exit !success }

# Fetch leap-seconds.list from upstream.
fetch-leap-seconds.list:
		$(CURL) -OR $(leaplist_URI)

# Fetch leap-seconds.list from upstream and commit it to the local repository.
commit-leap-seconds.list: fetch-leap-seconds.list
		author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \
		date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \
		git commit --author="$$author" --date="$$date" -m'make $@@' \
		  leap-seconds.list

# Arguments to pass to submakes.
# They can be overridden by later submake arguments.
INSTALLARGS = \
 BACKWARD='$(BACKWARD)' \
 DESTDIR='$(DESTDIR)' \
 PACKRATDATA='$(PACKRATDATA)' \
 PACKRATLIST='$(PACKRATLIST)' \
 TZDEFAULT='$(TZDEFAULT)' \
 TZDIR='$(TZDIR)' \
 ZIC='$(ZIC)'

INSTALL_DATA_DEPS = zic leapseconds tzdata.zi

posix_only: $(INSTALL_DATA_DEPS)
		$(ZIC_INSTALL) tzdata.zi

right_only: $(INSTALL_DATA_DEPS)
		$(ZIC_INSTALL) -L leapseconds tzdata.zi

# In earlier versions of this makefile, the other two directories were
# subdirectories of $(TZDIR).  However, this led to configuration errors.
# For example, with posix_right under the earlier scheme,
# TZ='right/Australia/Adelaide' got you localtime with leap seconds,
# but gmtime without leap seconds, which led to problems with applications
# like sendmail that subtract gmtime from localtime.
# Therefore, the other two directories are now siblings of $(TZDIR).
# You must replace all of $(TZDIR) to switch from not using leap seconds
# to using them, or vice versa.
right_posix:	right_only
		rm -fr '$(DESTDIR)$(TZDIR)-leaps'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only

posix_right:	posix_only
		rm -fr '$(DESTDIR)$(TZDIR)-posix'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only

zones:		$(REDO)

# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
		./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@@:.zd=)" >$@@

TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
		$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
		   tzdata.zi | LC_ALL=C sort >$@@.out
		x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
		     | LC_ALL=C sort -t . -k 2,2) && \
		set x $$x && \
		shift && \
		ZDS=$$* && \
		$(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
		mv $@@.out $@@

# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the
# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
$(TZS):
		touch $@@

force_tzs:	$(TZS_NEW)
		cp $(TZS_NEW) $(TZS)

libtz.a:	$(LIBOBJS)
		rm -f $@@
		$(AR) $(ARFLAGS) $@@ $(LIBOBJS)
		$(RANLIB) $@@

date:		$(DATEOBJS)
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)

tzselect:	tzselect.ksh version
		read -r VERSION <version && sed \
		  -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \
		  -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \
		  -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \
		  -e s\''\(REPORT_BUGS_TO\)=.*'\''\1=\'\''$(BUGEMAIL)\'\'\' \
		  -e s\''\(TZDIR\)=[^}]*'\''\1=\'\''$(TZDIR)\'\'\' \
		  -e s\''\(TZVERSION\)=.*'\''\1=\'"'$$VERSION\\''" \
		  <$@@.ksh >$@@.out
		chmod +x $@@.out
		mv $@@.out $@@

check: check_mild back.ck now.ck
check_mild: check_web check_zishrink \
  character-set.ck white-space.ck links.ck mainguard.ck \
  name-lengths.ck slashed-abbrs.ck sorted.ck \
  tables.ck ziguard.ck tzs.ck

# True if UTF8_LOCALE does not work;
# otherwise, false but with LC_ALL set to $(UTF8_LOCALE).
UTF8_LOCALE_MISSING = \
  { test ! '$(UTF8_LOCALE)' \
    || ! printf 'A\304\200B\n' \
         | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \
    || { export LC_ALL='$(UTF8_LOCALE)'; false; }; }

character-set.ck: $(ENCHILADA)
	$(UTF8_LOCALE_MISSING) || { \
		sharp='#' && \
		! grep -Env $(SAFE_LINE) $(MANS) date.1 \
			$(MISC) $(SOURCES) \
			LICENSE \
			version tzdata.zi && \
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
			Makefile && \
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
			leapseconds zone.tab && \
		! grep -Env $(OK_LINE) $(ENCHILADA); \
	}
	touch $@@

white-space.ck: $(ENCHILADA)
	$(UTF8_LOCALE_MISSING) || { \
		patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \
		! grep -En "$$pat|[$s]\$$" \
		    $(ENCHILADA:leap-seconds.list=); \
	}
	touch $@@

PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+
FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15}

name-lengths.ck: $(TDATA_TO_CHECK) backzone
		:;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
			$(TDATA_TO_CHECK) backzone
		touch $@@

mainguard.ck: main.zi
		test '$(PACKRATLIST)' || \
		  cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi
		touch $@@

PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+
STDOFF = [-+]?[0-9:.]+
RULELESS_SAVE = (-|$(STDOFF)[sd]?)
RULELESS_SLASHED_ABBRS = \
  $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/

slashed-abbrs.ck: $(TDATA_TO_CHECK)
		:;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
		touch $@@

CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }

sorted.ck: backward backzone
		$(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \
		  backward | LC_ALL=C sort -cu
		$(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu
		touch $@@

back.ck: checklinks.awk $(TDATA_TO_CHECK)
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk $(TDATA_TO_CHECK)
		touch $@@

links.ck: checklinks.awk tzdata.zi
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk tzdata.zi
		touch $@@

# Check timestamps from now through 28 years from now, to make sure
# that zonenow.tab contains all sequences of planned timestamps,
# without any duplicate sequences.  In theory this might require
# 2800+ years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = $$(./date +%s)
CHECK_NOW_FUTURE_YEARS = 28
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60
now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@d
		mkdir $@@d
		./zic -d $@@d tzdata.zi
		now=$(CHECK_NOW_TIMESTAMP) && \
		  future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \
		  ./zdump -i -t $$now,$$future \
		     $$(find "$$PWD/$@@d"/????*/ -type f) \
		     >$@@d/zdump-now.tab && \
		  ./zdump -i -t 0,$$future \
		     $$(find "$$PWD/$@@d" -name Etc -prune \
			  -o -type f ! -name '*.tab' -print) \
		     >$@@d/zdump-1970.tab && \
		$(AWK) \
		  -v now=$$now \
		  -v now_out=$@@.out \
		  -v zdump_table=$@@d/zdump-now.tab \
		  -f checknow.awk zonenow.tab
		$(AWK) \
		  'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \
		  $(PRIMARY_YDATA) backward factory | \
		 $(AWK) \
		   -v zdump_table=$@@d/zdump-1970.tab \
		   -f checknow.awk
		rm -fr $@@d
		touch $@@.out
		mv $@@.out $@@

tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab
		for tab in $(ZONETABLES); do \
		  test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \
		  $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \
		    || exit; \
		done
		touch $@@

tzs.ck: $(TZS) $(TZS_NEW)
		if test -s $(TZS); then \
		  $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@

check_web:	$(CHECK_WEB_PAGES)
.SUFFIXES: .ck .html
.html.ck:
		{ ! ($(CURL) --version) >/dev/null 2>&1 || \
		    $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		          -F file=@@$<; } >$@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@

ziguard.ck: rearguard.zi vanguard.zi ziguard.awk
		$(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \
		  diff -u rearguard.zi -
		$(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \
		  diff -u vanguard.zi -
		touch $@@

# Check that zishrink.awk does not alter the data, and that ziguard.awk
# preserves main-format data.
check_zishrink: zishrink-posix.ck zishrink-right.ck
zishrink-posix.ck zishrink-right.ck: \
  zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \
  $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@d t-$@@d shrunk-$@@d
		mkdir $@@d t-$@@d shrunk-$@@d
		case $@@ in \
		  *right*) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@d $(DATAFORM).zi && \
		  $(ZIC) $$leap -d shrunk-$@@d tzdata.zi && \
		  case $(DATAFORM),$(PACKRATLIST) in \
		    main,) \
		      $(ZIC) $$leap -d t-$@@d $(TDATA) && \
		      $(AWK) '/^Rule/' $(TDATA) | \
			$(ZIC) $$leap -d t-$@@d - $(PACKRATDATA) && \
		      diff -r $@@d t-$@@d;; \
		  esac
		diff -r $@@d shrunk-$@@d
		rm -fr $@@d t-$@@d shrunk-$@@d
		touch $@@

clean_misc:
		rm -fr *.ckd *.dir
		rm -f *.ck *.core *.o *.out *.t core core.* \
		  date tzdir.h tzselect version.h zdump zic libtz.a
clean:		clean_misc
		rm -fr tzdb-*/
		rm -f *.zi $(TZS_NEW)

maintainer-clean: clean
		@@echo 'This command is intended for maintainers to use; it'
		@@echo 'deletes files that may need special tools to rebuild.'
		rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*

names:
		@@echo $(ENCHILADA)

public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \
		tarballs signatures

date.1.txt:	date.1
newctime.3.txt:	newctime.3
newstrftime.3.txt: newstrftime.3
newtzset.3.txt:	newtzset.3
time2posix.3.txt: time2posix.3
tzfile.5.txt:	tzfile.5
tzselect.8.txt:	tzselect.8
zdump.8.txt:	zdump.8
zic.8.txt:	zic.8

$(MANTXTS):	workman.sh
		LC_ALL=C sh workman.sh $(MANFLAGS) $(@@:.txt=) >$@@.out
		mv $@@.out $@@

# Set file timestamps deterministically if possible,
# so that tarballs containing the timestamps are reproducible.
#
# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the
# file DEST to the maximum of the timestamps of the files A B C ...,
# plus N if GNU ls and touch are available.
SET_TIMESTAMP_N = sh -c '\
  n=$$0 dest=$$1; shift; \
  <"$$dest" && \
  if test $$n != 0 && \
     lsout=$$(ls -nt --time-style="+%s" "$$@@" 2>/dev/null); then \
    set x $$lsout && \
    timestamp=$$(($$7 + $$n)) && \
    echo "+ touch -md @@$$timestamp $$dest" && \
    touch -md @@$$timestamp "$$dest"; \
  else \
    newest=$$(ls -t "$$@@" | sed 1q) && \
    echo "+ touch -mr $$newest $$dest" && \
    touch -mr "$$newest" "$$dest"; \
  fi'
# If DEST depends on A B C ... in this Makefile, callers should use
# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any
# downstream 'make' that considers equal timestamps to be out of date.
# POSIX allows this 'make' behavior, and HP-UX 'make' does it.
# If all that matters is that the timestamp be reproducible
# and plausible, use $(SET_TIMESTAMP).
SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0
SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1

# Set the timestamps to those of the git repository, if available,
# and if the files have not changed since then.
# This uses GNU 'ls --time-style=+%s', which outputs the seconds count,
# and GNU 'touch -d@@N FILE', where N is the number of seconds since 1970.
# If git or GNU is absent, don't bother to sync with git timestamps.
# Also, set the timestamp of each prebuilt file like 'leapseconds'
# to be the maximum of the files it depends on.
set-timestamps.out: $(EIGHT_YARDS)
		rm -f $@@
		if (type git) >/dev/null 2>&1 && \
		   files=$$(git ls-files $(EIGHT_YARDS)) && \
		   touch -md @@1 test.out; then \
		  rm -f test.out && \
		  for file in $$files; do \
		    if git diff --quiet HEAD $$file; then \
		      time=$$(TZ=UTC0 git log -1 \
			--format='tformat:%cd' \
			--date='format-local:%Y-%m-%dT%H:%M:%SZ' \
			$$file) && \
		      echo "+ touch -md $$time $$file" && \
		      touch -md $$time $$file; \
		    else \
		      echo >&2 "$$file: warning: does not match repository"; \
		    fi || exit; \
		  done; \
		fi
		$(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS)
		for file in $(MANTXTS); do \
		  $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \
		    exit; \
		done
		$(SET_TIMESTAMP_DEP) version $(VERSION_DEPS)
		$(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS)
		touch $@@
set-tzs-timestamp.out: $(TZS)
		$(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS)
		touch $@@

# The zics below ensure that each data file can stand on its own.
# We also do an all-files run to catch links to links.

public.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d \
		  && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL
		for i in $(TDATA_TO_CHECK) \
		    tzdata.zi vanguard.zi main.zi rearguard.zi; \
		do \
		  $@@d/zic -v -d $@@d/zoneinfo $@@d/$$i || exit; \
		done
		$@@d/zic -v -d $@@d/zoneinfo-all $(TDATA_TO_CHECK)
		:
		: Also check 'backzone' syntax.
		rm $@@d/main.zi
		cd $@@d && $(MAKE) PACKRATDATA=backzone main.zi
		$@@d/zic -d $@@d/zoneinfo main.zi
		rm $@@d/main.zi
		cd $@@d && \
		  $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi
		$@@d/zic -d $@@d/zoneinfo main.zi
		:
		rm -fr $@@d
		touch $@@

# Check that the code works under various alternative
# implementations of time_t.
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		case $@@ in \
		  *32_t*) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
		wd=$$PWD && \
		zones=$$($(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab) && \
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@d && \
		  $(MAKE) TOPDIR="$$wd/$@@d" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$(@@:.ck=)'" \
		    REDO='$(REDO)' \
		    D="$$wd/$@@d" \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD)d && \
		    $(MAKE) TOPDIR="$$wd/$@@d" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		      D="$$wd/$@@d" \
		      to$$range.tzs) && \
		  $(SETUP_DIFF_TZS) && \
		  $$DIFF_TZS $(TIME_T_ALTERNATIVES_HEAD)d/to$$range.tzs \
			  $@@d/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \
					   $@@d/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \
		      $@@d/usr/share; \
		}
		touch $@@

TRADITIONAL_ASC = \
  tzcode$(VERSION).tar.gz.asc.t \
  tzdata$(VERSION).tar.gz.asc.t
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc.t
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
  tzdb-$(VERSION).tar.lz.asc.t

tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi vanguard.zi
		read -r VERSION <version && \
		$(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@@_version

# These *_version rules are intended for use if VERSION is set by some
# other means.  Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
  tzdb-$(VERSION).tar.lz.t
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz.t
traditional_tarballs_version: \
  tzcode$(VERSION).tar.gz.t tzdata$(VERSION).tar.gz.t
tailored_tarballs_version: \
  tzdata$(VERSION)-tailored.tar.gz.t
signatures_version: $(ALL_ASC)
rearguard_signatures_version: $(REARGUARD_ASC)
traditional_signatures_version: $(TRADITIONAL_ASC)

tzcode$(VERSION).tar.gz.t: set-timestamps.out
		$(SETUP_TAR) && \
		$$TAR -cf - \
		    $(COMMON) $(DOCS) $(SOURCES) | \
		  gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(COMMON) $(DOCS) $(SOURCES)
		touch $@@

tzdata$(VERSION).tar.gz.t: set-timestamps.out
		$(SETUP_TAR) && \
		$$TAR -cf - $(TZDATA_DIST) | \
		  gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(TZDATA_DIST)
		touch $@@

# Create empty files with a reproducible timestamp.
CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00

# The obsolescent *rearguard* targets and related macros are present
# for backwards compatibility with tz releases 2018e through 2022a.
# They should go away eventually.  To build rearguard tarballs you
# can instead use 'make DATAFORM=rearguard tailored_tarballs'.
tzdata$(VERSION)-rearguard.tar.gz.t: rearguard.zi set-timestamps.out
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(TZDATA_DIST) $@@.dir
		cd $@@.dir && rm -f $(TDATA) $(PACKRATDATA) version
		for f in $(TDATA) $(PACKRATDATA); do \
		  rearf=$@@.dir/$$f; \
		  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
		  $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \
		done
		sed '1s/$$/-rearguard/' <version >$@@.dir/version
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		$(CREATE_EMPTY) $@@.dir/pacificnew
		touch -mr version $@@.dir/version
		$(SETUP_TAR) && \
		  (cd $@@.dir && \
		   $$TAR -cf - \
			$(TZDATA_DIST) pacificnew | \
		     gzip $(GZIPFLAGS)) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) \
		  $$(cd $@@.dir && \
		       ls $(TZDATA_DIST) pacificnew | sed 's,^,$@@.dir/,')
		touch $@@

# Create a tailored tarball suitable for TZUpdater and compatible tools.
# For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball
# useful for testing whether TZUpdater supports vanguard form.
# The generated tarball is not byte-for-byte equivalent to a hand-tailored
# traditional tarball, as data entries are put into 'etcetera' even if they
# came from some other source file.  However, the effect should be the same
# for ordinary use, which reads all the source files.
tzdata$(VERSION)-tailored.tar.gz.t: set-timestamps.out
		rm -fr $@@.dir
		mkdir $@@.dir
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		if test $(DATAFORM) = vanguard; then \
		  pacificnew=; \
		else \
		  pacificnew=pacificnew; \
		fi && \
		cd $@@.dir && \
		  $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \
		  $$pacificnew
		(sed '/^#/!d' tzdata.zi && echo && cat $(DATAFORM).zi) \
		  >$@@.dir/etcetera
		touch -mr tzdata.zi $@@.dir/etcetera
		sed -n \
		  -e '/^# *version  *\(.*\)/h' \
		  -e '/^# *ddeps  */H' \
		  -e '$$!d' \
		  -e 'g' \
		  -e 's/^# *version  *//' \
		  -e 's/\n# *ddeps  */-/' \
		  -e 's/ /-/g' \
		  -e 'p' \
		  <tzdata.zi >$@@.dir/version
		touch -mr version $@@.dir/version
		links= && \
		  for file in $(TZDATA_DIST); do \
		    test -f $@@.dir/$$file || links="$$links $$file"; \
		  done && \
		  ln $$links $@@.dir
		$(SETUP_TAR) && \
		  (cd $@@.dir && \
		   $$TAR -cf - *) | gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) \
		  $$(cd $@@.dir && ls * | sed 's,^,$@@.dir/,')
		touch $@@

tzdb-$(VERSION).tar.lz.t: set-timestamps.out set-tzs-timestamp.out
		rm -fr tzdb-$(VERSION)
		mkdir tzdb-$(VERSION)
		ln $(ENCHILADA) tzdb-$(VERSION)
		$(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/*
		$(SETUP_TAR) && \
		  $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) tzdb-$(VERSION)
		touch $@@

tzcode$(VERSION).tar.gz.asc.t: tzcode$(VERSION).tar.gz.t
tzdata$(VERSION).tar.gz.asc.t: tzdata$(VERSION).tar.gz.t
tzdata$(VERSION)-rearguard.tar.gz.asc.t: tzdata$(VERSION)-rearguard.tar.gz.t
tzdb-$(VERSION).tar.lz.asc.t: tzdb-$(VERSION).tar.lz.t
$(ALL_ASC):
		$(GPG) --armor --detach-sign $(?:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(?:.t=)
		touch $@@

TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: long-long.ck unsigned.ck
long-long.ck unsigned.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d && \
		  case $@@ in \
		    long-long.*) i="long long";; \
		    unsigned.* ) i="unsigned" ;; \
		  esac && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="$$PWD" \
		    install
		$@@d/zdump -i -c 1970,1971 Europe/Rome
		touch $@@

zonenames:	tzdata.zi
		@@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi

asctime.o:	private.h
date.o:		private.h
difftime.o:	private.h
localtime.o:	private.h tzdir.h tzfile.h
strftime.o:	localtime.c private.h tzdir.h tzfile.h
zdump.o:	private.h version.h
zic.o:		private.h tzdir.h tzfile.h version.h

.PHONY: ALL INSTALL all
.PHONY: check check_mild check_time_t_alternatives
.PHONY: check_web check_zishrink
.PHONY: clean clean_misc commit-leap-seconds.list dummy.zd
.PHONY: fetch-leap-seconds.list force_tzs
.PHONY: install maintainer-clean names
.PHONY: posix_only posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: tailored_tarballs tailored_tarballs_version
.PHONY: typecheck
.PHONY: zonenames zones
.PHONY: $(ZDS)
@


1.4
log
@Merge tzdata2025c
@
text
@a68 22
# The POSIXRULES macro controls interpretation of POSIX-like TZ
# settings like TZ='EET-2EEST' that lack DST transition rules.
# If POSIXRULES is '-', no template is installed; this is the default.
# Any other value for POSIXRULES is obsolete and should not be relied on, as:
# * It does not work correctly in popular implementations such as GNU/Linux.
# * It does not work even in tzcode, except for historical timestamps
#   that precede the last explicit transition in the POSIXRULES file.
#   Hence it typically does not work for current and future timestamps.
# If, despite the above, you want a template for handling these settings,
# you can change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
# 'zic -p -' to remove it, or 'zic -p rightzone' to change it.
# Use the command
#	make zonenames
# to get a list of the values you can use for POSIXRULES.

POSIXRULES=	-

# Also see TZDEFRULESTRING below, which takes effect only
# if POSIXRULES is '-' or if the template file cannot be accessed.

d151 1
a151 1
REDO=		posix_right
d265 4
a268 1
#  -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a member st_ctim+
d306 2
a307 2
#	  -DTHREAD_RWLOCK to use read-write locks intead of mutexes.
#	    This can improve paralellism and thus save real time
d312 1
a312 1
#	    This supports unportable programs that call
d331 4
d336 2
a337 3
#	DST transitions for proleptic format TZ strings lacking them,
#	in the usual case where POSIXRULES is '-'.  If not specified,
#	TZDEFRULESTRING defaults to US rules for future DST transitions.
d387 1
a387 1
  -Wstringop-truncation -Wsuggest-attribute=cold \
d393 1
a710 1
			-p $(POSIXRULES) \
@


1.3
log
@Really update tzdata to 2025a (via 2025atgz as usual).

The TZDATA2025ATGZ tagged vendor version in the repository is
correct (contains this same data), but the files in HEAD are not.
This fixes that problem.

The couple of meaningful changes reported in the vendor import
are actually made effective here, the rest of these updates are
just to comments, or to files that are part of the tzdata distribution
but are not used by NetBSD, except the expiry date on the leapseconds
file(s) has been moved forward from late June (2025) to late December
(as usually happens in the first tzdata update after each new 6-monthly
IERS leap second bulletin, but is almost never mentioned).

I am going to alter the way the tzdata2netbsd script works in a way
that I am hoping will avoid this kind of issue (as well as previous
partial updates that happened a few years back) - but there's no
reasonable way for me to test whether that will work until the next
tzdata update happens.
@
text
@d6 2
d11 10
d25 1
a25 1
#	make CC='gcc -std=gnu23' "$@@"
d27 3
a29 2
# This example script is appropriate for a circa 2024 GNU/Linux system
# where a non-default setting enables this package's optional use of C23.
d166 3
a168 2
# below.  POSIX mandates that leap seconds not be counted; for compatibility
# with it, use "posix_only" or "posix_right".  Use POSIX time on systems with
d223 6
d242 2
d249 1
d251 1
d254 1
d262 3
d270 1
d272 4
a275 1
#	functions like 'link' or variables like 'tzname' required by POSIX
d277 2
d285 1
d287 2
d291 1
d297 2
d317 20
d339 8
d385 1
a385 1
  -fsanitize-undefined-trap-on-error -fstack-protector
d464 3
a466 1
# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone.
d524 5
d588 4
a591 7
# These non-alphabetic, non-ASCII printable characters are Latin-1,
# and so are likely displayable even in editors like XEmacs 21
# that have limited display capabilities.
UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)
a599 3
# Other non-letters are limited to ASCII renderings for the
# convenience of maintainers using XEmacs 21.5.34, which by default
# mishandles Unicode characters U+0100 and greater.
d946 3
a948 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) \
			CONTRIBUTING LICENSE README SECURITY \
a959 1
		enchilada='$(ENCHILADA)' && \
d962 1
a962 2
		    $${enchilada%leap-seconds.list*} \
		    $${enchilada#*leap-seconds.list}; \
d1028 1
a1028 1
		     >$@@d/zdump-1970.tab
d1030 2
d1041 2
a1042 1
		touch $@@
d1103 1
a1103 1
		rm -f *.ck *.core *.o *.out core core.* \
d1131 1
a1131 1
		LC_ALL=C sh workman.sh $(@@:.txt=) >$@@.out
d1180 1
a1180 1
			--date='format:%Y-%m-%dT%H:%M:%SZ' \
d1279 2
a1280 2
  tzcode$(VERSION).tar.gz.asc \
  tzdata$(VERSION).tar.gz.asc
d1282 1
a1282 1
  tzdata$(VERSION)-rearguard.tar.gz.asc
d1284 1
a1284 1
  tzdb-$(VERSION).tar.lz.asc
d1296 1
a1296 1
  tzdb-$(VERSION).tar.lz
d1298 1
a1298 1
  tzdata$(VERSION)-rearguard.tar.gz
d1300 1
a1300 1
  tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
d1302 1
a1302 1
  tzdata$(VERSION)-tailored.tar.gz
d1307 1
a1307 1
tzcode$(VERSION).tar.gz: set-timestamps.out
d1311 3
a1313 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d1315 1
a1315 1
tzdata$(VERSION).tar.gz: set-timestamps.out
d1318 3
a1320 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d1329 1
a1329 1
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
d1347 5
a1351 2
		     gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@
d1360 1
a1360 1
tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
d1372 1
a1372 1
		(grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \
d1393 4
a1396 2
		   $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@
d1398 1
a1398 1
tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d1404 3
a1406 2
		$$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
		mv $@@.out $@@
d1408 4
a1411 4
tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
d1413 3
a1415 1
		$(GPG) --armor --detach-sign $?
@


1.3.2.1
log
@Pull up the following, requested by kre in ticket #215:

	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.10
	external/public-domain/tz/dist/Makefile         up to 1.5
	external/public-domain/tz/dist/NEWS             up to 1.6
	external/public-domain/tz/dist/README           up to 1.3
	external/public-domain/tz/dist/SECURITY         up to 1.1.1.2
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.44
	external/public-domain/tz/dist/africa           up to 1.3
	external/public-domain/tz/dist/antarctica       up to 1.4
	external/public-domain/tz/dist/asia             up to 1.16
	external/public-domain/tz/dist/australasia      up to 1.12
	external/public-domain/tz/dist/backzone         up to 1.4
	external/public-domain/tz/dist/calendars        up to 1.1.1.3
	external/public-domain/tz/dist/checknow.awk     up to 1.4
	external/public-domain/tz/dist/etcetera         up to 1.4
	external/public-domain/tz/dist/europe           up to 1.5
	external/public-domain/tz/dist/iso3166.tab      up to 1.1.1.10
	external/public-domain/tz/dist/leap-seconds.list up to 1.11
	external/public-domain/tz/dist/leapseconds      up to 1.11
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.15
	external/public-domain/tz/dist/northamerica     up to 1.5
	external/public-domain/tz/dist/southamerica     up to 1.5
	external/public-domain/tz/dist/theory.html      up to 1.5
	external/public-domain/tz/dist/version          up to 1.17
	external/public-domain/tz/dist/zone1970.tab     up to 1.5
	external/public-domain/tz/dist/zonenow.tab      up to 1.6
	doc/3RDPARTY					(apply patch)

Import tzdata 2026a (using the 2026agtz data).
@
text
@a5 2
# By default, builds of code and data assume POSIX.1-2001 or later;
# this assumption can be relaxed by tailoring the build as described below.
a8 10
# Reproducible builds of distribution tarballs also need a copy of the
# Git repository, and assume the behavior of the following programs
# (or later versions):
#	Git 2.7.0 (2016)
#	GNU Coreutils 6.3 (2006)
#	GNU Tar 1.14 (2004)
#	GnuPG 1.4 (2004)
# Although tzdb does not come with a software bill of materials,
# you should be able to construct one based on the above information,
# your platform, and the way you use this Makefile.
d13 1
a13 1
#	make CFLAGS='-O2 -DHAVE_GETTEXT=0' "$@@"
d15 2
a16 3
# This example script is appropriate for a GNU/Linux system
# which needs more optimization than default, and which does not want
# gettext's internationalization of diagnostics.
d56 22
d153 2
a154 3
# below.  POSIX mandates that leap seconds not be counted, and a
# nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with
# these, use "posix_only" or "posix_right".  Use POSIX time on systems with
d159 1
a159 1
REDO=		posix_only
a208 6
# Extra flags for producing man page files like tzfile.5.txt.
# These flags are used only if groff (or mandoc) is present.
# Each option should begin with "-" and should lack shell metacharacters.
# Plausible options include -Tascii and -Tutf8.
MANFLAGS=	-Tutf8

a221 2
#  -DFREE_PRESERVES_ERRNO=[01] if the 'free' function munges or preserves errno
#	(default is guessed)
a226 1
#  -DHAVE_FCHMOD=0 if your system lacks the fchmod function
a227 1
#  -DHAVE_GETEUID=0 if gete?[ug]id do not work
a229 1
#  -DHAVE_GETRESUID=0 if getres[ug]id do not work
a236 3
#  -DHAVE_ISSETUGID=1 if issetugid works, 0 otherwise (default is guessed)
#	If 0, you may also use -DHAVE_SYS_AUXV_H=1 if <sys/auxv.h> works,
#	0 otherwise (default is guessed).
a241 1
#  -DHAVE_MEMPCPY=1 if your system has mempcpy, 0 if not (default is guessed)
d243 1
a243 4
#	variables like 'tzname' required by POSIX
#  -DHAVE_PWD_H=0 if your system lacks pwd.h, grp.h and corresponding functions
#	If 0, you may also need -Dgid_t=G -Duid_t=U
#	to define gid_t and uid_t to be types G and U.
a244 2
#  -DHAVE_SETMODE=[01] if your system lacks or has the setmode and getmode
#	functions (default is guessed)
a250 1
#  -DHAVE_STRNLEN=0 if your system lacks the strnlen function+
a251 5
#  -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a status-change member
#	of type struct timespec, so code should use st_ctime instead;
#	but if the status-change member name is st_ctimespec,
#	use -Dst_ctim=st_ctimespec instead (default is guessed)+
#  -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+
a253 1
#	If 0, you may also need -Dmode_t=M to define mode_t to be type M.
a258 2
#  -DOPENAT_TZDIR if tzset should use openat on TZDIR then a relative open.
#	See localtime.c for details.
a276 20
#	The following options can also be used:
#	  -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps,
#	    at some cost in CPU time and energy in multi-threaded apps.
#	    The following options can also be used:
#	      -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded
#		variable, 0 otherwise (default is guessed)
#	      -DHAVE_SYS_SINGLE_THREADED_H=0 if <sys/single_threaded.h> works,
#		0 otherwise (default is guessed)
#	  -DTHREAD_RWLOCK to use read-write locks instead of mutexes.
#	    This can improve parallelism and thus save real time
#	    if many threads call tzcode functions simultaneously.
#	    It also costs CPU time and thus energy.
#	  -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime
#	    return different struct tm * addresses in different threads.
#	    This supports nonportable programs that call
#	    gmtime/localtime/offtime when they should call
#	    gmtime_r/localtime_r/offtime_r to avoid races.
#	    Because the corresponding storage is freed on thread exit,
#	    this option is incompatible with POSIX.1-2024 and earlier.
#	    It also costs CPU time and memory.
a278 8
#  -DTZ_CHANGE_INTERVAL=N if functions depending on TZ should check
#	no more often than every N seconds for TZif file changes.
#	If N is negative (the default), no such checking is done.
#	This option is intended for platforms that want localtime etc.
#	to respond to changes to a file selected by TZ, including to
#	TZDEFAULT (normally /etc/localtime) if TZ is unset.
#	On these platforms, REDO should be "posix_only" or "posix_right".
#	This option does not affect tzalloc-allocated objects.
a281 4
#  -DTZ_RUNTIME_LEAPS=0 to disable runtime support for leap seconds.
#	This conforms to POSIX, shrinks tzcode's attack surface,
#	and is more efficient.  However, it fails to support Internet
#	RFC 9636's leap seconds.
d283 3
a285 2
#	DST transitions for proleptic format TZ strings lacking them.
#	If not specified, it defaults to US rules for future DST transitions.
d317 1
a317 1
  -fsanitize-trap=all -fstack-protector
d335 1
a335 1
  -Wsuggest-attribute=cold \
a340 1
  -Wzero-as-null-pointer-constant \
d396 1
a396 3
# "offtime_r" is to "offtime" what "gmtime_r" is to "gmtime".
# I.e., "offtime" and "offtime_r" are like calling "localtime_rz"
# with a fixed-offset zone.
a453 5
#
# To fetch leap-seconds.list from NIST via a less-secure protocol
# and with less-volatile metadata, use these settings:
#leaplist_URI = ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list
#leaplist_TZ = America/Denver
d513 7
a519 4
# These non-alphabetic, non-ASCII printable characters are
# used in commentary or in generated *.txt files
# and are not likely to cause confusion.
UNUSUAL_OK_CHARSET= §«°±»½¾×–‘’“”•→−≤★⟨⟩⯪
d528 3
d657 1
d877 3
a879 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 \
			$(MISC) $(SOURCES) \
			LICENSE \
d891 1
d894 2
a895 1
		    $(ENCHILADA:leap-seconds.list=); \
d961 1
a961 1
		     >$@@d/zdump-1970.tab && \
a962 2
		  -v now=$$now \
		  -v now_out=$@@.out \
d972 1
a972 2
		touch $@@.out
		mv $@@.out $@@
d1033 1
a1033 1
		rm -f *.ck *.core *.o *.out *.t core core.* \
d1061 1
a1061 1
		LC_ALL=C sh workman.sh $(MANFLAGS) $(@@:.txt=) >$@@.out
d1110 1
a1110 1
			--date='format-local:%Y-%m-%dT%H:%M:%SZ' \
d1209 2
a1210 2
  tzcode$(VERSION).tar.gz.asc.t \
  tzdata$(VERSION).tar.gz.asc.t
d1212 1
a1212 1
  tzdata$(VERSION)-rearguard.tar.gz.asc.t
d1214 1
a1214 1
  tzdb-$(VERSION).tar.lz.asc.t
d1226 1
a1226 1
  tzdb-$(VERSION).tar.lz.t
d1228 1
a1228 1
  tzdata$(VERSION)-rearguard.tar.gz.t
d1230 1
a1230 1
  tzcode$(VERSION).tar.gz.t tzdata$(VERSION).tar.gz.t
d1232 1
a1232 1
  tzdata$(VERSION)-tailored.tar.gz.t
d1237 1
a1237 1
tzcode$(VERSION).tar.gz.t: set-timestamps.out
d1241 2
a1242 3
		  gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(COMMON) $(DOCS) $(SOURCES)
		touch $@@
d1244 1
a1244 1
tzdata$(VERSION).tar.gz.t: set-timestamps.out
d1247 2
a1248 3
		  gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(TZDATA_DIST)
		touch $@@
d1257 1
a1257 1
tzdata$(VERSION)-rearguard.tar.gz.t: rearguard.zi set-timestamps.out
d1275 2
a1276 5
		     gzip $(GZIPFLAGS)) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) \
		  $$(cd $@@.dir && \
		       ls $(TZDATA_DIST) pacificnew | sed 's,^,$@@.dir/,')
		touch $@@
d1285 1
a1285 1
tzdata$(VERSION)-tailored.tar.gz.t: set-timestamps.out
d1297 1
a1297 1
		(sed '/^#/!d' tzdata.zi && echo && cat $(DATAFORM).zi) \
d1318 2
a1319 4
		   $$TAR -cf - *) | gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) \
		  $$(cd $@@.dir && ls * | sed 's,^,$@@.dir/,')
		touch $@@
d1321 1
a1321 1
tzdb-$(VERSION).tar.lz.t: set-timestamps.out set-tzs-timestamp.out
d1327 2
a1328 3
		  $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) tzdb-$(VERSION)
		touch $@@
d1330 4
a1333 4
tzcode$(VERSION).tar.gz.asc.t: tzcode$(VERSION).tar.gz.t
tzdata$(VERSION).tar.gz.asc.t: tzdata$(VERSION).tar.gz.t
tzdata$(VERSION)-rearguard.tar.gz.asc.t: tzdata$(VERSION)-rearguard.tar.gz.t
tzdb-$(VERSION).tar.lz.asc.t: tzdb-$(VERSION).tar.lz.t
d1335 1
a1335 3
		$(GPG) --armor --detach-sign $(?:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(?:.t=)
		touch $@@
@


1.2
log
@
Revert update to tzdata2025a - I botched it.
A new update should be appearing within minutes.
@
text
@d140 1
a140 1
# zone data format that zic generates; see Internet RFC 8536.)
d258 1
d266 1
a266 1
#  -Dssize_t=long on hosts like MS-Windows that lack ssize_t
d289 1
a289 1
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255)
d323 2
a324 1
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \
d341 1
a341 1
  -Wno-format-nonliteral -Wno-sign-compare
d619 2
a620 2
TZS_DEPS=	$(YDATA) asctime.c localtime.c \
			private.h tzfile.h zdump.c zic.c
d860 1
a860 1
check: check_mild back.ck
d863 1
a863 1
  name-lengths.ck now.ck slashed-abbrs.ck sorted.ck \
a949 3
		touch $@@
# Original code:
check_now_original:	checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
d1107 1
a1107 1
		    if git diff --quiet $$file; then \
d1358 1
a1358 1
asctime.o:	private.h tzfile.h
d1361 4
a1364 4
localtime.o:	private.h tzfile.h tzdir.h
strftime.o:	private.h tzfile.h
zdump.o:	version.h
zic.o:		private.h tzfile.h tzdir.h version.h
@


1.1
log
@Initial revision
@
text
@d1 1
d4 19
d27 2
a28 2
# Version numbers of the code and data distributions.
VERSION=	2014f
d33 17
a49 5
# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
#	zic -l rightzone
# to correct things.
d54 1
a54 1
LOCALTIME=	GMT
d56 13
a68 11
# If you want something other than Eastern United States time as a template
# for handling POSIX-style time zone environment variables,
# change the line below (after finding the zone you want in the
# time zone files, or adding it to a time zone file).
# (When a POSIX-style environment variable is handled, the rules in the
# template file are used to determine "spring forward" and "fall back" days and
# times; the environment variable itself specifies UT offsets of standard and
# summer time.)
# Alternately, if you discover you've got the wrong time zone, you can just
#	zic -p rightzone
# to correct things.
a71 1
# If you want POSIX compatibility, use "America/New_York".
d73 1
a73 1
POSIXRULES=	America/New_York
d76 1
a76 1
# if the time zone files cannot be accessed.
a77 1
# Everything gets put in subdirectories of. . .
d79 31
a109 1
TOPDIR=		/usr/local
d111 1
a111 1
# "Compiled" time zone information is placed in the "TZDIR" directory
d113 1
a113 2
# Use an absolute path name for TZDIR unless you're just testing the software.

d115 1
a115 4
TZDIR=		$(TOPDIR)/etc/$(TZDIR_BASENAME)

# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
d117 2
a118 1
# The "tzselect", "zic", and "zdump" commands get installed in. . .
d120 2
a121 1
ETCDIR=		$(TOPDIR)/etc
d123 2
a124 3
# If you "make INSTALL", the "date" command gets installed in. . .

BINDIR=		$(TOPDIR)/bin
d127 1
a127 2

MANDIR=		$(TOPDIR)/man
d130 1
a131 1
LIBDIR=		$(TOPDIR)/lib
d133 10
a142 2
# If you always want time values interpreted as "seconds since the epoch
# (not counting leap seconds)", use
d144 2
a145 2
# below.  If you always want right time values interpreted as "seconds since
# the epoch" (counting leap seconds)", use
d153 5
a157 3
# below.
# POSIX mandates that leap seconds not be counted; for compatibility with it,
# use either "posix_only" or "posix_right".
d161 39
a199 1
# Since "." may not be in PATH...
d201 7
a207 1
YEARISTYPE=	./yearistype
d210 1
a210 1
# Add -lintl if you want to use 'gettext' on Solaris.
d213 24
a236 8
# Add the following to the end of the "CFLAGS=" line as needed.
#  -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
#  -DHAVE_ADJTIME=0 if 'adjtime' does not exist (SVR0?)
#  -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
#  -DHAVE_GETTEXT=1 if 'gettext' works (GNU, Linux, Solaris); also see LDLIBS
#  -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
#	ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
#  -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
d238 14
a251 5
#  -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?)
#  -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4)
#  -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD)
#  -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD)
#  -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h"
d253 23
a275 8
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h"
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
#  -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
#  -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h"
#  -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale"
#  -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
#	if you do not want run time warnings about formats that may cause
#	year 2000 grief
d277 1
d282 17
a298 1
#	DST transitions if the time zone files cannot be accessed
d302 38
a339 21
#  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
	-Wall -Wextra \
	-Wbad-function-cast -Wcast-align -Wcast-qual \
	-Wdeclaration-after-statement \
	-Wformat=2 -Winit-self -Wjump-misses-init \
	-Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
	-Wnested-externs -Wno-address -Wno-cast-qual \
	-Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
	-Wno-type-limits \
	-Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
	-Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
	-Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
	-Wsuggest-attribute=pure -Wtrampolines \
	-Wwrite-strings
#
# If you want to use System V compatibility code, add
#	-DUSG_COMPAT
# to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
# variables to be kept up-to-date by the time conversion functions.  Neither
# "timezone" nor "daylight" is described in X3J11's work.
d345 7
a351 7
# or
#	-DTM_GMTOFF=_tm_gmtoff
# to the end of the "CFLAGS=" line.
# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
# in its work, use of "tm_gmtoff" is described as non-conforming.
# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
# their recent releases.
d353 33
a385 11
# If your system has a "zone abbreviation" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
#	-DTM_ZONE=tm_zone
# or
#	-DTM_ZONE=_tm_zone
# to the end of the "CFLAGS=" line.
# Neither tm_zone nor _tm_zone is described in X3J11's work;
# in its work, use of "tm_zone" is described as non-conforming.
# Both UCB and Sun have done the equivalent of defining TM_ZONE in
# their recent releases.
d390 2
a391 6
# to the end of the "CFLAGS=" line.  This arranges for the functions
# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
# "posix2time", and "time2posix" to be added to the time conversion library.
# "tzsetwall" is like "tzset" except that it arranges for local wall clock
# time (rather than the time specified in the TZ environment variable)
# to be used.
d394 2
a395 3
# "timelocal" is equivalent to "mktime".
# "timegm" is like "timelocal" except that it turns a struct tm into
# a time_t using UT (rather than local time as "timelocal" does).
d398 1
a400 1
# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
d404 11
a418 10
# If you want an "altzone" variable (a la System V Release 3.1), add
#	-DALTZONE
# to the end of the "CFLAGS=" line.
# This variable is not described in X3J11's work.
#
# If you want a "gtime" function (a la MACH), add
#	-DCMUCS
# to the end of the "CFLAGS=" line
# This function is not described in X3J11's work.
#
d421 1
a421 1
# which claims to test C and Posix conformance.  If you want to pass PCTS, add
d428 2
a429 2
# 53 as a week number (rather than 52 or 53) for those days in January that
# before the first Monday in January when a "%V" format is used and January 1
d431 5
a436 1
CFLAGS=
d438 14
a451 2
# Linker flags.  Default to $(LFLAGS) for backwards compatibility
# to tzcode2012h and earlier.
d453 1
a453 1
LDFLAGS=	$(LFLAGS)
d458 6
d466 9
a474 1
# The name of a Posix-compliant 'awk' on your system.
d477 1
a477 1
# The full path name of a Posix-compliant shell, preferably one that supports
d481 1
a481 1
# lacks 'select' or doesn't completely conform to Posix, but /bin/bash
d485 11
a495 18
# The path where SGML DTDs are kept and the catalog file(s) to use when
# validating.  The default is appropriate for Ubuntu 13.10.
SGML_TOPDIR= /usr
SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
SGML_CATALOG_FILES= \
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat

# The name, arguments and environment of a program to validate your web pages.
# See <http://www.jclark.com/sp/> for a validator, and
# <http://validator.w3.org/source/> for a validation library.
VALIDATE = nsgmls
VALIDATE_FLAGS = -s -B -wall -wno-unused-param
VALIDATE_ENV = \
  SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
  SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
  SP_CHARSET_FIXED=YES \
  SP_ENCODING=UTF-8
d508 22
a529 7
SAFE_CHARSET=	]$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)-
SAFE_CHAR=	'['$(SAFE_CHARSET)']'
# NONSYM_CHAR is a regular expression that matches any character
# except for a small number of symbols, where we prefer to stick with
# ASCII renderings for the convenience of maintainers whose text editors
# mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
NONSYM_CHAR=	'[^–—°′″≈≠≤≥±−×÷∞←→↔·•§¶«»‘’‚‛“”„‟‹›「」『』〝〞〟]'
d532 1
a532 1
# SAFE_SHARP_LINE is similar, except any character can follow '#';
d534 1
a534 2
# NONSYM_LINE matches a line of non-symbols.
# VALID_LINE matches a line of any validly-encoded characters.
d536 2
a537 3
SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(NONSYM_CHAR)'*)?$$'
NONSYM_LINE=	'^'$(NONSYM_CHAR)'*$$'
VALID_LINE=	'^.*$$'
d541 10
a550 5
GNUTARFLAGS=	--numeric-owner --owner=0 --group=0 --mode=go+u,go-w
TARFLAGS=	`if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \
		 then echo $(GNUTARFLAGS); \
		 else :; \
		 fi`
d555 11
a565 1
###############################################################################
d567 3
a569 2
cc=		cc
CC=		$(cc) -DTZDIR=\"$(TZDIR)\"
d571 2
a572 1
AR=		ar
a573 2
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:
d575 5
a579 5
TZCOBJS=	zic.o scheck.o ialloc.o
TZDOBJS=	zdump.o localtime.o ialloc.o asctime.o
DATEOBJS=	date.o localtime.o strftime.o asctime.o
LIBSRCS=	localtime.c asctime.c difftime.c
LIBOBJS=	localtime.o asctime.o difftime.o
d581 4
a584 3
NONLIBSRCS=	zic.c zdump.c scheck.c ialloc.c
NEWUCBSRCS=	date.c strftime.c
SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) tzselect.ksh
d591 5
a595 3
COMMON=		Makefile README
WEB_PAGES=	tz-art.htm tz-link.htm
DOCS=		NEWS Theory $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
d598 6
a603 5
YDATA=		$(PRIMARY_YDATA) pacificnew etcetera backward
NDATA=		systemv factory
TDATA=		$(YDATA) $(NDATA)
ZONETABLES=	zone1970.tab zone.tab
TABDATA=	iso3166.tab leapseconds $(ZONETABLES)
d605 37
a641 10
DATA=		$(YDATA) $(NDATA) $(TABDATA) \
			$(LEAP_DEPS) yearistype.sh
AWK_SCRIPTS=	checktab.awk leapseconds.awk
MISC=		$(AWK_SCRIPTS) workman.sh zoneinfo2tdf.pl
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC)

# And for the benefit of csh users on systems that assume the user
# shell should be used to handle commands in Makefiles. . .

SHELL=		/bin/sh
d643 2
a644 1
all:		tzselect zic zdump libtz.a $(TABDATA)
d646 1
a646 1
ALL:		all date
d649 17
a665 13
		mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
			$(DESTDIR)$(LIBDIR) \
			$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
			$(DESTDIR)$(MANDIR)/man8
		$(ZIC) -y $(YEARISTYPE) \
			-d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
		cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
		cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
		cp libtz.a $(DESTDIR)$(LIBDIR)/.
		$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
		cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
		cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
		cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
d668 59
a726 8
		mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
		cp date $(DESTDIR)$(BINDIR)/.
		cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.

version.h:
		(echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \
		 echo 'static char const TZVERSION[]="$(VERSION)";' && \
		 echo 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";') >$@@
d731 1
a731 1
zic:		$(TZCOBJS) yearistype
d734 39
a772 3
yearistype:	yearistype.sh
		cp yearistype.sh yearistype
		chmod +x yearistype
d774 2
a775 2
leapseconds:	$(LEAP_DEPS)
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@
d777 2
a778 7
posix_only:	zic $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L /dev/null $(TDATA)

right_only:	zic leapseconds $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L leapseconds $(TDATA)
d789 11
a799 15
right_posix:	right_only leapseconds
		rm -fr $(DESTDIR)$(TZDIR)-leaps
		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
			-L leapseconds $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
			-L /dev/null $(TDATA)

posix_right:	posix_only leapseconds
		rm -fr $(DESTDIR)$(TZDIR)-posix
		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
			-L /dev/null $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
			-L leapseconds $(TDATA)
d803 35
d839 2
a840 1
		$(AR) ru $@@ $(LIBOBJS)
d846 25
a870 12
tzselect:	tzselect.ksh
		sed \
			-e 's|#!/bin/bash|#!$(KSHELL)|g' \
			-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
			-e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \
			-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
			-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
			-e 's|\(TZVERSION\)=.*|\1=$(VERSION)|' \
			<$? >$@@
		chmod +x $@@

check:		check_character_set check_tables check_web
d872 2
a873 2
check_character_set: $(ENCHILADA)
		LC_ALL=en_US.utf8 && export LC_ALL && \
d876 57
a932 7
			$(MISC) $(SOURCES) $(WEB_PAGES) && \
		! grep -Env $(SAFE_SHARP_LINE) $(YDATA) $(NDATA) iso3166.tab \
			zone.tab leapseconds $(LEAP_DEPS) yearistype.sh && \
		test $$(grep -Ecv $(SAFE_SHARP_LINE) Makefile) -eq 1 && \
		! grep -Env $(NONSYM_LINE) README NEWS Theory $(MANS) date.1 \
			zone1970.tab && \
		! grep -Env $(VALID_LINE) $(ENCHILADA)
d934 42
a975 1
check_tables:	checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
d977 2
a978 1
		  $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
d981 25
d1007 24
a1030 2
check_web:	$(WEB_PAGES)
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES)
d1033 3
a1035 2
		rm -f core *.o *.out \
		  date tzselect version.h zdump zic yearistype libtz.a
d1037 2
a1038 1
		rm -fr tzpublic
d1043 1
a1043 1
		rm -f leapseconds $(MANTXTS) *.asc *.tar.gz
d1048 1
a1048 1
public:		check check_public check_time_t_alternatives \
d1062 31
a1092 1
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@
d1094 1
a1094 1
# Set the time stamps to those of the git repository, if available,
d1096 3
a1098 3
# This uses GNU 'touch' syntax 'touch -d@@N FILE',
# where N is the number of seconds since 1970.
# If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
d1101 1
a1101 1
set-timestamps.out: $(ENCHILADA)
d1103 2
a1104 1
		if files=`git ls-files $(ENCHILADA)` && \
d1109 6
a1114 2
		      time=`git log -1 --format='tformat:%ct' $$file` && \
		      touch -cmd @@$$time $$file; \
d1120 3
a1122 3
		touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
		for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
		  touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
d1125 5
d1135 10
a1144 6
check_public:	$(ENCHILADA)
		make maintainer-clean
		make "CFLAGS=$(GCC_DEBUG_FLAGS)" $(ENCHILADA) all
		mkdir tzpublic
		for i in $(TDATA) ; do \
		  $(zic) -v -d tzpublic $$i 2>&1 || exit; \
d1146 13
a1158 2
		$(zic) -v -d tzpublic $(TDATA)
		rm -fr tzpublic
d1162 46
a1207 25
check_time_t_alternatives:
		zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
		for type in $(TIME_T_ALTERNATIVES); do \
		  mkdir -p tzpublic/$$type && \
		  make clean_misc && \
		  make TOPDIR=`pwd`/tzpublic/$$type \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
		    install && \
		  diff -qr tzpublic/int64_t/etc/zoneinfo tzpublic/$$type/etc/zoneinfo && \
		  case $$type in \
		  int32_t) range=-2147483648,2147483647;; \
		  uint32_t) range=0,4294967296;; \
		  int64_t) continue;; \
		  *u*) range=0,10000000000;; \
		  *) range=-10000000000,10000000000;; \
		  esac && \
		  echo checking $$type zones ... && \
		  tzpublic/int64_t/etc/zdump -V -t $$range $$zones \
		      >tzpublic/int64_t.out && \
		  tzpublic/$$type/etc/zdump -V -t $$range $$zones \
		      >tzpublic/$$type.out && \
		  diff -u tzpublic/int64_t.out tzpublic/$$type.out \
		    || exit; \
		done
		rm -fr tzpublic
d1209 28
a1236 1
tarballs:	tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
d1239 5
a1243 4
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - \
		    $(COMMON) $(DOCS) $(SOURCES) $(MISC) | \
		  gzip $(GZIPFLAGS) > $@@
d1246 84
a1329 5
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - $(COMMON) $(DATA) | \
		  gzip $(GZIPFLAGS) > $@@

signatures:	tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc
a1331 2
		gpg --armor --detach-sign $?

d1333 22
a1354 1
		gpg --armor --detach-sign $?
d1356 2
a1357 11
typecheck:
		make clean
		for i in "long long" unsigned; \
		do \
			make CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
			./zdump -v Europe/Rome ; \
			make clean ; \
		done

zonenames:	$(TDATA)
		@@$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)
d1362 2
a1363 4
ialloc.o:	private.h
localtime.o:	private.h tzfile.h
scheck.o:	private.h
strftime.o:	tzfile.h
d1365 1
a1365 3
zic.o:		private.h tzfile.h version.h

.KEEP_STATE:
d1368 14
a1381 4
.PHONY: check check_character_set check_public check_tables
.PHONY: check_time_t_alternatives check_web clean clean_misc
.PHONY: install maintainer-clean names posix_only posix_right
.PHONY: public right_only right_posix signatures tarballs typecheck
d1383 1
@


1.1.1.1
log
@Import tzdata2014f from ftp://ftp.iana.org/tz/releases/tzdata2014f.tar.gz
and NEWS file from https://github.com/eggert/tz/raw/2014f/NEWS.

NetBSD's tzdata code is being moved from src/share/zoneinfo to
src/external/public-domain/tz/dist, to simplify future maintenance.

This is the same version of tzata that was previously imported to
src/share/zoneinfo.  The NEWS file has been added to the import,
although it is not distributed in the tzdata2014f.tar.gz file.
@
text
@@


1.1.1.1.4.1
log
@Pull up following revision(s) (requested by apb in ticket #107):
	doc/3RDPARTY: patch
	external/public-domain/tz/tzdata2netbsd: patch
	external/public-domain/tz/dist/CONTRIBUTING: patch
	external/public-domain/tz/dist/Makefile: patch
	external/public-domain/tz/dist/NEWS: patch
	external/public-domain/tz/dist/README: patch
	external/public-domain/tz/dist/Theory: patch
	external/public-domain/tz/dist/africa: patch
	external/public-domain/tz/dist/antarctica: patch
	external/public-domain/tz/dist/asia: patch
	external/public-domain/tz/dist/australasia: patch
	external/public-domain/tz/dist/backward: patch
	external/public-domain/tz/dist/backzone: patch
	external/public-domain/tz/dist/checktab.awk: patch
	external/public-domain/tz/dist/europe: patch
	external/public-domain/tz/dist/leapseconds: patch
	external/public-domain/tz/dist/leapseconds.awk: patch
	external/public-domain/tz/dist/northamerica: patch
	external/public-domain/tz/dist/southamerica: patch
	external/public-domain/tz/dist/zone.tab: patch
	external/public-domain/tz/dist/zone1970.tab: patch
	external/public-domain/tz/dist/zoneinfo2tdf.pl: patch
Import tzdata2014g from ftp://ftp.iana.org/tz/releases/tzdata2014g.tar.gz
This includes changes for Turks & Caicos that will take
effect on 2014-11-02, changes that affect times in the
past, and some re-organisation of the source files.  See
src/external/public-domain/tz/dist/NEWS for more details.
@
text
@d8 1
a8 1
VERSION=	2014g
d87 1
a87 3
# below.  If you want just POSIX-compatible time values, but with
# out-of-scope and often-wrong data from the file 'backzone', use
#	REDO=		posix_packrat
d89 1
a89 1
# use "posix_only", "posix_right", or "posix_packrat".
a109 4
#  -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function
#  -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz
#	This defaults to 1 if a working localtime_rz seems to be available.
#	localtime_rz can make zdump significantly faster, but is nonstandard.
a114 2
#  -DHAVE_STRFTIME_L=1 if <time.h> declares locale_t and strftime_l
#	This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise.
a117 1
#  -DHAVE_TZSET=0 if your system lacks a tzset function
d120 1
a123 3
#  -DTHREAD_SAFE=1 to make localtime.c thread-safe, as POSIX requires;
#	not needed by the main-program tz code, which is single-threaded.
#	Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
a129 4
#  -DUNINIT_TRAP=1 if reading uninitialized storage can cause problems
#	other than simply getting garbage data
#  -DUSE_LTZ=0 to build zdump with the system time zone library
#	Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
d159 11
a169 3
# to the end of the "CFLAGS=" line.  If not defined, the code attempts to
# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this.
# Similarly, if your system has a "zone abbreviation" field, define
d171 7
a177 2
# and define NO_TM_ZONE to suppress any guessing.  These two fields are not
# required by POSIX, but are widely available on GNU/Linux and BSD systems.
a200 11
# If you don't want functions that were inspired by NetBSD, add
#	-DNETBSD_INSPIRED=0
# to the end of the "CFLAGS=" line.  Otherwise, the functions
# "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the
# time library, and if STD_INSPIRED is also defined the functions
# "posix2time_z" and "time2posix_z" are added as well.
# The functions ending in "_z" (or "_rz") are like their unsuffixed
# (or suffixed-by-"_r") counterparts, except with an extra first
# argument of opaque type timezone_t that specifies the time zone.
# "tzalloc" allocates a timezone_t value, and "tzfree" frees it.
#
d210 5
a269 4
# This expensive test requires USE_LTZ.
# To suppress it, define this macro to be empty.
CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives

d321 1
a321 1
TZDOBJS=	zdump.o localtime.o asctime.o
d328 1
a328 2
SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \
			tzselect.ksh workman.sh
d335 1
a335 1
COMMON=		CONTRIBUTING Makefile NEWS README Theory
d337 1
a337 1
DOCS=		$(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
d346 2
a347 2
DATA=		$(YDATA) $(NDATA) backzone $(TABDATA) \
			leap-seconds.list yearistype.sh
d349 1
a349 1
MISC=		$(AWK_SCRIPTS) zoneinfo2tdf.pl
a431 5
posix_packrat:	posix_only backzone
		$(AWK) '/^Rule/' $(TDATA) | \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L /dev/null - backzone

d452 1
a452 1
check:		check_character_set check_white_space check_tables check_web
d459 2
a460 2
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA) backzone \
			iso3166.tab leapseconds yearistype.sh zone.tab && \
d462 2
a463 2
		! grep -Env $(NONSYM_LINE) CONTRIBUTING NEWS README Theory \
			$(MANS) date.1 zone1970.tab && \
a465 5
check_white_space: $(ENCHILADA)
		! grep -n ' '$(TAB_CHAR) $(ENCHILADA)
		! grep -n '[[:space:]]$$' $(ENCHILADA)
		! grep -n "$$(printf '[\f\r\v]\n')" $(ENCHILADA)

d489 1
a489 1
public:		check check_public $(CHECK_TIME_T_ALTERNATIVES) \
a548 5
		if diff -q Makefile Makefile 2>/dev/null; then \
		  quiet_option='-q'; \
		else \
		  quiet_option=''; \
		fi && \
a554 1
		    REDO='$(REDO)' \
d556 1
a556 3
		  diff $$quiet_option -r \
		    tzpublic/int64_t/etc/zoneinfo \
		    tzpublic/$$type/etc/zoneinfo && \
d579 1
a579 1
		    $(COMMON) $(DOCS) $(SOURCES) | \
d584 1
a584 1
		tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
d613 1
a613 1
strftime.o:	private.h tzfile.h
d621 2
a622 2
.PHONY: check_time_t_alternatives check_web check_white_space clean clean_misc
.PHONY: install maintainer-clean names posix_packrat posix_only posix_right
@


1.1.1.1.4.2
log
@Apply patch (requested by apb in ticket #245):
Update tzdata from 2014g to 2014j.  Some of the changes are:
* A new Zone Pacific/Bougainville, for the part of Papua New Guinea
  that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00.
* Changes for Fiji, Belarus, and Turks & Caicos that take effect
  at various times in 2014.
* Changes to historical data.
@
text
@d8 1
a8 1
VERSION=	2014j
a131 1
#  -Dssize_t=long on ancient hosts that lack ssize_t
d470 1
a470 2
check:		check_character_set check_white_space check_sorted \
		  check_tables check_web
a488 12
CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }

check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
		$(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
		$(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
		$(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu
		$(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c
		$(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \
		  LC_ALL=C sort -c
		$(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
		  LC_ALL=C sort -cu

d651 1
a651 1
.PHONY: check check_character_set check_public check_sorted check_tables
@


1.1.1.1.4.3
log
@Pull up following revision(s) (requested by apb in ticket #638):
	doc/3RDPARTY: patch
	external/public-domain/tz/dist/Makefile: up to revision 1.1.1.7
	external/public-domain/tz/dist/NEWS: up to revision 1.1.1.7
	external/public-domain/tz/dist/Theory: up to revision 1.1.1.3
	external/public-domain/tz/dist/antarctica: up to revision 1.1.1.3
	external/public-domain/tz/dist/asia: up to revision 1.1.1.7
	external/public-domain/tz/dist/australasia: up to revision 1.1.1.5
	external/public-domain/tz/dist/backward: up to revision 1.1.1.3
	external/public-domain/tz/dist/backzone: up to revision 1.1.1.6
	external/public-domain/tz/dist/checklinks.awk: up to revision 1.1.1.1
	external/public-domain/tz/dist/checktab.awk: up to revision 1.1.1.6
	external/public-domain/tz/dist/europe: up to revision 1.1.1.7
	external/public-domain/tz/dist/leap-seconds.list: up to revision 1.1.1.3
	external/public-domain/tz/dist/leapseconds: up to revision 1.1.1.4
	external/public-domain/tz/dist/leapseconds.awk: up to revision 1.1.1.4
	external/public-domain/tz/dist/northamerica: up to revision 1.1.1.7
	external/public-domain/tz/dist/southamerica: up to revision 1.1.1.5
	external/public-domain/tz/dist/zone.tab: up to revision 1.1.1.4
	external/public-domain/tz/dist/zone1970.tab: up to revision 1.1.1.5
Update tzdata from 2014j to 2015b.  Some of the changes are:
* Mongolia will start observing DST in 2015.
* Changes to Palestine DST dates in 2014 and 2015.
* The Mexican state of Quintana Roo, represented by
America/Cancun, changed time zone in Feb 2015.
* Chile's new standard time from 2015 will be its old DST.
* New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
* Corrections to historic times in Iceland and Easter Island.
* Some more zones have been turned into links, when they
differed from existing zones only for times before 1970.
@
text
@d8 1
a8 1
VERSION=	2015b
d362 1
a362 1
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk
d471 1
a471 1
check:		check_character_set check_white_space check_links check_sorted \
d487 1
a487 1
		! grep -En ' '$(TAB_CHAR)"|$$(printf '[\f\r\v]')" $(ENCHILADA)
d489 1
a502 3
check_links:	checklinks.awk $(TDATA)
		$(AWK) -f checklinks.awk $(TDATA)

d665 1
a665 2
.PHONY: check check_character_set check_links
.PHONY: check_public check_sorted check_tables
@


1.1.1.1.4.4
log
@Pull up following revision(s) (requested by jun in ticket #955):
	doc/3RDPARTY: patch
	external/public-domain/tz/dist/Makefile: up to 1.1.1.9
	external/public-domain/tz/dist/NEWS: up to 1.1.1.9
	external/public-domain/tz/dist/Theory: up to 1.1.1.4
	external/public-domain/tz/dist/africa: up to 1.1.1.6
	external/public-domain/tz/dist/antarctica: up to 1.1.1.4
	external/public-domain/tz/dist/asia: up to 1.1.1.8
	external/public-domain/tz/dist/backward: up to 1.1.1.4
	external/public-domain/tz/dist/backzone: up to 1.1.1.7
	external/public-domain/tz/dist/checktab.awk: up to 1.1.1.7
	external/public-domain/tz/dist/europe: up to 1.1.1.9
	external/public-domain/tz/dist/iso3166.tab: up to 1.1.1.2
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.4
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.5
	external/public-domain/tz/dist/northamerica: up to 1.1.1.9
	external/public-domain/tz/dist/southamerica: up to 1.1.1.7
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.5
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.7
	external/public-domain/tz/tzdata2netbsd: up to 1.7
Update tzdata to 2015f.
@
text
@d8 1
a8 1
VERSION=	2015f
d105 1
d116 4
a122 1
#  -DHAVE_STRDUP=0 if your system lacks the strdup function
d128 1
d149 1
a149 1
#  $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking
d152 1
a152 1
	-Wbad-function-cast -Wcast-align -Wdate-time \
a153 1
	-Wdouble-promotion \
d155 5
a159 2
	-Wlogical-op -Wmissing-prototypes -Wnested-externs \
	-Wold-style-definition -Woverlength-strings -Wpointer-arith \
d163 1
a163 3
	-Wunused -Wwrite-strings \
	-Wno-address -Wno-format-nonliteral -Wno-sign-compare \
	-Wno-type-limits -Wno-unused-parameter
d294 4
a297 7
SAFE_CHARSET=	$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
SAFE_CHAR=	'[]'$(SAFE_CHARSET)'-]'

# OK_CHAR matches any character allowed in the distributed files.
# This is the same as SAFE_CHAR, except that multibyte letters are
# also allowed so that commentary can contain people's names and quote
# non-English sources.  For non-letters the sources are limited to
d300 1
a300 1
OK_CHAR=	'[][:alpha:]'$(SAFE_CHARSET)'-]'
d303 1
a303 1
# SAFE_SHARP_LINE is similar, except any OK character can follow '#';
d305 2
a306 1
# OK_LINE matches a line of OK characters.
d308 3
a310 2
SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$'
OK_LINE=	'^'$(OK_CHAR)'*$$'
a324 2
#MAKE=		make

d333 1
a333 1
TZCOBJS=	zic.o
d339 1
a339 1
NONLIBSRCS=	zic.c zdump.c
d373 1
a373 1
ALL:		all date $(ENCHILADA)
d477 1
a477 1
		! grep -Env $(SAFE_LINE) Makefile $(MANS) date.1 $(MANTXTS) \
d480 5
a484 2
			leapseconds yearistype.sh zone.tab && \
		! grep -Env $(OK_LINE) $(ENCHILADA)
d575 3
a577 3
check_public:
		$(MAKE) maintainer-clean
		$(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL
d596 2
a597 2
		  $(MAKE) clean_misc && \
		  $(MAKE) TOPDIR=`pwd`/tzpublic/$$type \
d643 1
a643 1
		$(MAKE) clean
d646 1
a646 1
			$(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
d648 1
a648 1
			$(MAKE) clean ; \
d657 1
d659 1
@


1.1.1.1.4.4.2.1
log
@Pull up following revision(s) (requested by christos in ticket #1143):
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.2
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.1
	external/public-domain/tz/dist/Makefile: up to 1.1.1.10
	external/public-domain/tz/dist/NEWS: up to 1.1.1.10
	external/public-domain/tz/dist/README: up to 1.1.1.3
	external/public-domain/tz/dist/Theory: up to 1.1.1.5
	external/public-domain/tz/dist/asia: up to 1.1.1.9
	external/public-domain/tz/dist/australasia: up to 1.1.1.6
	external/public-domain/tz/dist/backward: up to 1.1.1.5
	external/public-domain/tz/dist/backzone: up to 1.1.1.8
	external/public-domain/tz/dist/checklinks.awk: up to 1.1.1.2
	external/public-domain/tz/dist/checktab.awk: up to 1.1.1.8
	external/public-domain/tz/dist/europe: up to 1.1.1.10
	external/public-domain/tz/dist/iso3166.tab: up to 1.1.1.3
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.5
	external/public-domain/tz/dist/leapseconds.awk: up to 1.1.1.5
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.6
	external/public-domain/tz/dist/northamerica: up to 1.1.1.10
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.6
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.8
	external/public-domain/tz/tzdata2netbsd: up to 1.8
Update tzdata to 2016b.
@
text
@d8 1
a8 1
VERSION=	2016b
d87 5
a91 2
# below.  POSIX mandates that leap seconds not be counted; for compatibility
# with it, use "posix_only" or "posix_right".
a94 7
# If you want out-of-scope and often-wrong data from the file 'backzone', use
#	PACKRATDATA=	backzone
# To omit this data, use
#	PACKRATDATA=

PACKRATDATA=

a104 2
#  -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
#  -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
a114 2
#  -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
#	functions like 'link' or variables like 'tzname' required by POSIX
a238 7
# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in
# submake command lines.  The default is no leap seconds.

LEAPSECONDS=

# The zic command and its arguments.

a243 4
# How to use zic to install tzdata binary files.

ZIC_INSTALL=	$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)

d347 2
a348 2
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory
WEB_PAGES=	tz-art.htm tz-how-to.html tz-link.htm
d369 1
a369 1
all:		tzselect yearistype zic zdump libtz.a $(TABDATA)
d378 2
a379 1
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
d401 1
a401 1
zic:		$(TZCOBJS)
d411 7
a417 22
# Arguments to pass to submakes of install_data.
# They can be overridden by later submake arguments.
INSTALLARGS = \
 DESTDIR=$(DESTDIR) \
 LEAPSECONDS='$(LEAPSECONDS)' \
 PACKRATDATA='$(PACKRATDATA)' \
 TZDIR=$(TZDIR) \
 YEARISTYPE=$(YEARISTYPE) \
 ZIC='$(ZIC)'

# 'make install_data' installs one set of tz binary files.
# It can be tailored by setting LEAPSECONDS, PACKRATDATA, etc.
install_data:	zic leapseconds yearistype $(PACKRATDATA) $(TDATA)
		$(ZIC_INSTALL) $(TDATA)
		$(AWK) '/^Rule/' $(TDATA) | $(ZIC_INSTALL) - $(PACKRATDATA)

posix_only:
		$(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data

right_only:
		$(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \
			install_data
d428 1
a428 1
right_posix:	right_only
d431 4
a434 2
		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
d436 1
a436 1
posix_right:	posix_only
d439 9
a447 7
		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only

# This obsolescent rule is present for backwards compatibility with
# tz releases 2014g through 2015g.  It should go away eventually.
posix_packrat:
		$(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only
d663 1
a663 2
.PHONY: install install_data maintainer-clean names
.PHONY: posix_only posix_packrat posix_right
@


1.1.1.1.4.4.2.2
log
@Pull up following revision(s) (requested by kre in ticket #1324):
	distrib/sets/lists/base/mi: 1.1125, 1.1128, 1.1132, 1.1137, 1.1139, 1.1140
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.3
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.2
	external/public-domain/tz/dist/Makefile: up to 1.1.1.16
	external/public-domain/tz/dist/NEWS: up to 1.1.1.16
	external/public-domain/tz/dist/README: up to 1.1.1.5
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.6
	external/public-domain/tz/dist/Theory: up to 1.1.1.9
	external/public-domain/tz/dist/africa: up to 1.1.1.9
	external/public-domain/tz/dist/antarctica: up to 1.1.1.7
	external/public-domain/tz/dist/asia: up to 1.1.1.15
	external/public-domain/tz/dist/australasia: up to 1.1.1.10
	external/public-domain/tz/dist/backward: up to 1.1.1.6
	external/public-domain/tz/dist/backzone: up to 1.1.1.10
	external/public-domain/tz/dist/etcetera: up to 1.1.1.2
	external/public-domain/tz/dist/europe: up to 1.1.1.16
	external/public-domain/tz/dist/factory: up to 1.1.1.2
	external/public-domain/tz/dist/iso3166.tab: up to 1.1.1.4
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.6
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.7
	external/public-domain/tz/dist/northamerica: up to 1.1.1.14
	external/public-domain/tz/dist/southamerica: up to 1.1.1.10
	external/public-domain/tz/dist/version: up to 1.1.1.3
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.10
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.12
	external/public-domain/tz/share/zoneinfo/Makefile: up to 1.3
	external/public-domain/tz/tzdata2netbsd: up to 1.11
Update tzdata to 2016j.
@
text
@d7 2
a8 2
# Version number for the distribution, overridden in the 'tarballs' rule below.
VERSION=	unknown
d104 1
d112 1
a112 1
#  -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
d114 1
a114 2
#	ctime_r and asctime_r incompatibly with the POSIX standard
#	(Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
a131 4
#  -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
d243 1
a243 1
# to release 2012h and earlier.
d259 1
a259 1
# How to use zic to install tz binary files.
d275 1
a275 1
# validating.  The default should work on both Debian and Red Hat.
d280 1
a280 1
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
d283 2
a284 2
# See <http://openjade.sourceforge.net/doc/> for a validator, and
# <https://validator.w3.org/source/> for a validation library.
d329 1
a329 1
GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
d366 1
a366 1
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory version
d381 1
a381 26
TZS_YEAR=	2050
TZS=		to$(TZS_YEAR).tzs
TZS_NEW=	to$(TZS_YEAR)new.tzs
TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
			private.h tzfile.h zdump.c zic.c
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS)

# Consult these files when deciding whether to rebuild the 'version' file.
# This list is not the same as the output of 'git ls-files', since
# .gitignore is not distributed.
VERSION_DEPS= \
		CONTRIBUTING LICENSE Makefile NEWS README Theory \
		africa antarctica asctime.c asia australasia \
		backward backzone \
		checklinks.awk checktab.awk \
		date.1 date.c difftime.c \
		etcetera europe factory iso3166.tab \
		leap-seconds.list leapseconds.awk localtime.c \
		newctime.3 newstrftime.3 newtzset.3 northamerica \
		pacificnew private.h \
		southamerica strftime.c systemv \
		time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \
		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
		workman.sh yearistype.sh \
		zdump.8 zdump.c zic.8 zic.c \
		zone.tab zone1970.tab zoneinfo2tdf.pl
d411 4
a414 15
version:	$(VERSION_DEPS)
		{ (type git) >/dev/null 2>&1 && \
		  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty` || \
		  V=$(VERSION); } && \
		printf '%s\n' "$$V" >$@@.out
		mv $@@.out $@@

version.h:	version
		VERSION=`cat version` && printf '%s\n' \
		  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
		  "static char const TZVERSION[]=\"$$VERSION\";" \
		  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
		  >$@@.out
		mv $@@.out $@@
d427 1
a427 2
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@.out
		mv $@@.out $@@
a479 23
$(TZS_NEW):	$(TDATA) zdump zic
		mkdir -p tzs.dir
		$(zic) -d tzs.dir $(TDATA)
		$(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \
		   $(TDATA) | LC_ALL=C sort >$@@.out
		wd=`pwd` && \
		zones=`$(AWK) -v wd="$$wd" \
				'/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \
			 | LC_ALL=C sort` && \
		./zdump -i -c $(TZS_YEAR) $$zones >>$@@.out
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $@@.out >$@@.sed.out
		rm -fr tzs.dir $@@.out
		mv $@@.sed.out $@@

# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
# If it exists but 'make check_tzs' fails, a maintainer should inspect the
# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
$(TZS):
		$(MAKE) force_tzs

force_tzs:	$(TZS_NEW)
		cp $(TZS_NEW) $(TZS)

d481 1
a481 2
		rm -f $@@
		$(AR) -rc $@@ $(LIBOBJS)
d487 2
a488 2
tzselect:	tzselect.ksh version
		VERSION=`cat version` && sed \
d494 3
a496 4
			-e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
			<$@@.ksh >$@@.out
		chmod +x $@@.out
		mv $@@.out $@@
d499 1
a499 1
		  check_tables check_tzs check_web
d504 2
a505 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) \
			CONTRIBUTING LICENSE Makefile README version && \
d511 1
a511 2
		patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
		! grep -En "$$pat" $(ENCHILADA)
a534 3
check_tzs:	$(TZS) $(TZS_NEW)
		diff -u $(TZS) $(TZS_NEW)

d542 1
a542 1
		rm -fr *.dir tzdb-*/ $(TZS_NEW)
d547 1
a547 1
		rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
d566 1
a566 2
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@.out
		mv $@@.out $@@
d577 1
a577 2
		if (type git) >/dev/null 2>&1 && \
		   files=`git ls-files $(ENCHILADA)` && \
a593 2
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
d602 1
a602 1
		mkdir -p public.dir
d604 1
a604 1
		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
d606 2
a607 2
		$(zic) -v -d public.dir $(TDATA)
		rm -fr public.dir
a616 1
		wd=`pwd` && \
d619 1
a619 1
		  mkdir -p time_t.dir/$$type && \
d621 1
a621 1
		  $(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
d626 2
a627 2
		    time_t.dir/int64_t/etc/zoneinfo \
		    time_t.dir/$$type/etc/zoneinfo && \
d636 5
a640 5
		  time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/int64_t.out && \
		  time_t.dir/$$type/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/$$type.out && \
		  diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
d643 1
a643 1
		rm -fr time_t.dir
d645 1
a645 10
tarballs traditional_tarballs signatures traditional_signatures: version
		VERSION=`cat version` && \
		$(MAKE) VERSION="$$VERSION" $@@_version

tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
traditional_tarballs_version: \
  tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
traditional_signatures_version: \
  tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
d651 1
a651 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d656 1
a656 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d658 1
a658 8
tzdb-$(VERSION).tar.lz: set-timestamps.out
		rm -fr tzdb-$(VERSION)
		mkdir tzdb-$(VERSION)
		ln $(ENCHILADA) tzdb-$(VERSION)
		touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
		mv $@@.out $@@
a665 3
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
		gpg --armor --detach-sign $?

d691 1
a691 2
.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
.PHONY: clean clean_misc force_tzs
d694 1
a694 2
.PHONY: public right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version typecheck
@


1.1.1.1.4.4.2.3
log
@Pull up following revision(s) (requested by kre in ticket #1374):
	doc/3RDPARTY: 1.1420 via patch
	distrib/sets/lists/base/mi: 1.1155
	external/public-domain/tz/dist/Makefile: up to 1.1.1.17
	external/public-domain/tz/dist/NEWS: up to 1.1.1.17
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.7
	external/public-domain/tz/dist/Theory: up to 1.1.1.10
	external/public-domain/tz/dist/africa: up to 1.1.1.10
	external/public-domain/tz/dist/antarctica: up to 1.1.1.8
	external/public-domain/tz/dist/asia: up to 1.1.1.16
	external/public-domain/tz/dist/australasia: up to 1.1.1.11
	external/public-domain/tz/dist/backward: up to 1.1.1.7
	external/public-domain/tz/dist/backzone: up to 1.1.1.11
	external/public-domain/tz/dist/europe: up to 1.1.1.17
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.7
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.8
	external/public-domain/tz/dist/northamerica: up to 1.1.1.15
	external/public-domain/tz/dist/southamerica: up to 1.1.1.11
	external/public-domain/tz/dist/version: up to 1.1.1.4
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.11
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.13
Update to tzdata2017a.
@
text
@d75 2
a76 2
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
d78 2
a79 2
# below.  If you want want only "right" time, with values interpreted
# as seconds since the epoch (counting leap seconds), use
d88 1
a88 4
# with it, use "posix_only" or "posix_right".  Use POSIX time on systems with
# leap smearing; this can work better than unsmeared "right" time with
# applications that are not leap second aware, and is closer to unsmeared
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).
d168 1
a168 1
	-Wundef -Wunused -Wwrite-strings \
@


1.1.1.1.4.4.2.4
log
@Pull up following revision(s) (requested by kre in ticket #1519):
	distrib/sets/lists/base/mi: 1.1164
	doc/3RDPARTY: 1.2326 via patch
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.4
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.3
	external/public-domain/tz/dist/Makefile: up to 1.1.1.18
	external/public-domain/tz/dist/NEWS: up to 1.1.1.19
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.9
	external/public-domain/tz/dist/Theory: delete
	external/public-domain/tz/dist/africa: up to 1.1.1.12
	external/public-domain/tz/dist/antarctica: up to 1.1.1.9
	external/public-domain/tz/dist/asia: up to 1.1.1.17
	external/public-domain/tz/dist/australasia: up to 1.1.1.12
	external/public-domain/tz/dist/backward: up to 1.1.1.8
	external/public-domain/tz/dist/backzone: up to 1.1.1.12
	external/public-domain/tz/dist/calendars: up to 1.1.1.1
	external/public-domain/tz/dist/checklinks.awk: up to 1.1.1.3
	external/public-domain/tz/dist/europe: up to 1.1.1.18
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.8
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.9
	external/public-domain/tz/dist/leapseconds.awk: up to 1.1.1.6
	external/public-domain/tz/dist/northamerica: up to 1.1.1.17
	external/public-domain/tz/dist/southamerica: up to 1.1.1.12
	external/public-domain/tz/dist/theory.html: up to 1.1.1.1
	external/public-domain/tz/dist/version: up to 1.1.1.6
	external/public-domain/tz/dist/zishrink.awk: up to 1.1.1.1
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.12
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.14
Update tzdata to 2017c.
@
text
@a51 1
# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
d78 1
a78 1
# below.  If you want only "right" time, with values interpreted
a94 18
# To install data in text form that has all the information of the binary data,
# (optionally incorporating leap second information), use
#	TZDATA_TEXT=	tzdata.zi leapseconds
# To install text data without leap second information (e.g., because
# REDO='posix_only'), use
#	TZDATA_TEXT=	tzdata.zi
# To avoid installing text data, use
#	TZDATA_TEXT=

TZDATA_TEXT=	leapseconds tzdata.zi

# For backward-compatibility links for old zone names, use
#	BACKWARD=	backward pacificnew
# To omit these links, use
#	BACKWARD=

BACKWARD=	backward pacificnew

a101 5
# The name of a locale using the UTF-8 encoding, used during self-tests.
# The tests are skipped if the name does not appear to work on this system.

UTF8_LOCALE=	en_US.utf8

d109 1
a109 2
# Add the following to the end of the "CFLAGS=" line as needed to override
# defaults specified in the source code.  "-DFOO" is equivalent to "-DFOO=1".
a110 6
#  -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime
#	formats that generate only the last two digits of year numbers
#  -DEPOCH_LOCAL if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
a111 1
#  -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
d113 3
a115 3
#  -DHAVE_GENERIC=0 if _Generic does not work
#  -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
#  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
d118 1
a118 1
#  -DHAVE_INTTYPES_H if you have a non-C99 compiler with <inttypes.h>
d122 1
d126 3
a128 4
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
#  -DHAVE_STDBOOL_H if you have a non-C99 compiler with <stdbool.h>
#  -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
#  -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
d131 2
a132 2
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
d134 10
a143 4
#  -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
#  -Dlocale_t=XXX if your system uses XXX instead of locale_t
#  -Dssize_t=long on hosts like MS-Windows that lack ssize_t
#  -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
a146 1
#	This is intended for internal use only; it mangles external names.
d152 1
a152 1
#  -DUNINIT_TRAP if reading uninitialized storage can cause problems
d160 20
a179 21
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
GCC_INSTRUMENT = \
  -fsanitize=undefined -fsanitize-address-use-after-scope \
  -fsanitize-undefined-trap-on-error -fstack-protector
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
  $(GCC_INSTRUMENT) \
  -Wall -Wextra \
  -Walloc-size-larger-than=100000 -Warray-bounds=2 \
  -Wbad-function-cast -Wcast-align -Wdate-time \
  -Wdeclaration-after-statement -Wdouble-promotion \
  -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
  -Winit-self -Wjump-misses-init -Wlogical-op \
  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
  -Wold-style-definition -Woverlength-strings -Wpointer-arith \
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=5 \
  -Wsuggest-attribute=const -Wsuggest-attribute=format \
  -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
  -Wtrampolines -Wundef -Wuninitialized -Wunused \
  -Wvariadic-macros -Wvla -Wwrite-strings \
  -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
  -Wno-type-limits -Wno-unused-parameter
a191 25
# The next batch of options control support for external variables
# exported by tzcode.  In practice these variables are less useful
# than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
# #
# # To omit or support the external variable "tzname", add one of:
# #	-DHAVE_TZNAME=0
# #	-DHAVE_TZNAME=1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX 1988 and later.
# # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
# # crashes when combined with some platforms' standard libraries,
# # presumably due to memory allocation issues.
# #
# # To omit or support the external variables "timezone" and "daylight", add
# #	-DUSG_COMPAT=0
# #	-DUSG_COMPAT=1
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by
# # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later.
# # If not defined, the code attempts to guess USG_COMPAT from other macros.
# #
# # To support the external variable "altzone", add
# #	-DALTZONE
# # to the end of the "CFLAGS=" line; although "altzone" appeared in
# # System V Release 3.1 it has not been standardized.
#
d229 5
d243 2
a244 2
# 53 as a week number (rather than 52 or 53) for January days before
# January's first Monday when a "%V" format is used and January 1
d268 1
a268 1
ZIC_INSTALL=	$(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
a291 1
# Set VALIDATE=':' if you do not have such a program.
d358 1
a358 1
TZDOBJS=	zdump.o localtime.o asctime.o strftime.o
d373 1
a373 2
COMMON=		calendars CONTRIBUTING LICENSE Makefile \
			NEWS README theory.html version
d378 1
a378 1
YDATA=		$(PRIMARY_YDATA) etcetera $(BACKWARD)
d382 1
a382 1
TABDATA=	iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
d384 3
a386 4
TZDATA_ZI_DEPS=	zishrink.awk $(TDATA) $(PACKRATDATA)
DATA=		$(YDATA) $(NDATA) backzone iso3166.tab leap-seconds.list \
			leapseconds yearistype.sh $(ZONETABLES)
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk zishrink.awk
d393 1
a393 1
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi
d399 1
a399 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README \
d408 1
a408 1
		southamerica strftime.c systemv theory.html \
d430 1
a430 1
		cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
a450 5
# This file can be tailored by setting BACKWARD, PACKRATDATA, etc.
tzdata.zi:	$(TZDATA_ZI_DEPS)
		LC_ALL=C $(AWK) -f zishrink.awk $(TDATA) $(PACKRATDATA) >$@@.out
		mv $@@.out $@@

a475 1
 BACKWARD=$(BACKWARD) \
d484 4
a487 2
install_data:	zic leapseconds yearistype tzdata.zi
		$(ZIC_INSTALL) tzdata.zi
d524 1
a524 1
$(TZS_NEW):	tzdata.zi zdump zic
d526 3
a528 3
		$(zic) -d tzs.dir tzdata.zi
		$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
		   tzdata.zi | LC_ALL=C sort >$@@.out
d531 1
a531 1
				'/^Z/{print wd "/tzs.dir/" $$2}' tzdata.zi \
d567 2
a568 3
check:		check_character_set check_white_space check_links \
		  check_name_lengths check_sorted \
		  check_tables check_web check_zishrink check_tzs
d571 1
a571 4
	test ! '$(UTF8_LOCALE)' || \
	! printf 'A\304\200B\n' | \
	  LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 || { \
		LC_ALL='$(UTF8_LOCALE)' && export LC_ALL && \
d575 1
a575 2
			CONTRIBUTING LICENSE Makefile README \
			version tzdata.zi && \
d578 1
a578 2
		! grep -Env $(OK_LINE) $(ENCHILADA); \
	}
a584 7
PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+
FILE_NAME_COMPONENT_TOO_LONG = \
  $(PRECEDES_FILE_NAME)[^[:space:]]*[^/[:space:]]{15}

check_name_lengths: $(TDATA) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' $(TDATA) backzone

a598 1
		$(AWK) -f checklinks.awk tzdata.zi
d609 2
a610 20
# This checks only the HTML 4.01 strict page.
# To check the the other pages, use <https://validator.w3.org/>.
check_web:	tz-how-to.html
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html

# Check that tzdata.zi generates the same binary data that its sources do.
check_zishrink: tzdata.zi zic leapseconds $(PACKRATDATA) $(TDATA)
		for type in posix right; do \
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-shrunk && \
		  case $$type in \
		    right) leap='-L leapseconds';; \
	            *) leap=;; \
		  esac && \
		  $(ZIC) $$leap -d time_t.dir/$$type $(TDATA) && \
		  $(AWK) '/^Rule/' $(TDATA) | \
		    $(ZIC) $$leap -d time_t.dir/$$type - $(PACKRATDATA) && \
		  $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
		  diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
		done
		rm -fr time_t.dir
d616 1
a616 1
		rm -fr *.dir tzdata.zi tzdb-*/ $(TZS_NEW)
a669 1
		touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi
d681 1
a681 1
		for i in $(TDATA) tzdata.zi; do \
d775 2
a776 2
zonenames:	tzdata.zi
		@@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
a791 1
.PHONY: check_zishrink
@


1.1.1.1.4.4.2.5
log
@Pull up the following revisions, requested by kre in tickt #1589:

	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.1
	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.5
	external/public-domain/tz/dist/Makefile         up to 1.1.1.20
	external/public-domain/tz/dist/NEWS             up to 1.1.1.21
	external/public-domain/tz/dist/README           up to 1.1.1.6
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.11
	external/public-domain/tz/dist/africa           up to 1.1.1.14
	external/public-domain/tz/dist/antarctica       up to 1.1.1.10
	external/public-domain/tz/dist/asia             up to 1.1.1.19
	external/public-domain/tz/dist/australasia      up to 1.1.1.14
	external/public-domain/tz/dist/backzone         up to 1.1.1.14
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.9
	external/public-domain/tz/dist/europe           up to 1.1.1.20
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.9
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.10
	external/public-domain/tz/dist/northamerica     up to 1.1.1.19
	external/public-domain/tz/dist/southamerica     up to 1.1.1.14
	external/public-domain/tz/dist/theory.html      up to 1.1.1.3
	external/public-domain/tz/dist/version          up to 1.1.1.8
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.3
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.14
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.16


Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv18468

Log Message:
Import tzdata2018d from ftp://ftp.iana.org/tz/releases/tzdata2018d.tar.gz

Summary of changes in tzdata2018d (2018-03-22 07:05:46 -0700):

        In 2018, Palestine starts DST on March 24 (today!), not March 31

        Casey Station in Antarctica changed from +11 to +08 on 2018-03-11
        at 04:00.

        Various adjustments to some historical conversions (several for
        Uruguay (1920 .. 1990), one fpr Enderbury and Kiritimati (1994/5),
        one for Portugal and colonies (1912) and Jamaica and Turks & Caicos
        (pre 1913)).
@
text
@a12 9
# Choose source data features.  To get new features right away, use:
#	DATAFORM=	vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
#	DATAFORM=	main
# To wait even longer for new features, use:
#	DATAFORM=	rearguard
DATAFORM=		main

d28 1
a28 1
# When a POSIX-style environment variable is handled, the rules in the
d31 1
a31 1
# daylight saving time.
d45 1
d47 1
a47 31
# Installation locations.
#
# The defaults are suitable for Debian, except that if REDO is
# posix_right or right_posix then files that Debian puts under
# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead
# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps,
# respectively.  Problems with the Debian approach are discussed in
# the commentary for the right_posix rule (below).

# Destination directory, which can be used for staging.
# 'make DESTDIR=/stage install' installs under /stage (e.g., to
# /stage/etc/localtime instead of to /etc/localtime).  Files under
# /stage are not intended to work as-is, but can be copied by hand to
# the root directory later.  If DESTDIR is empty, 'make install' does
# not stage, but installs directly into production locations.
DESTDIR =

# Everything is installed into subdirectories of TOPDIR, and used there.
# TOPDIR should be empty (meaning the root directory),
# or a directory name that does not end in "/".
# TOPDIR should be empty or an absolute name unless you're just testing.
TOPDIR =

# The default local time zone is taken from the file TZDEFAULT.
TZDEFAULT = $(TOPDIR)/etc/localtime

# The subdirectory containing installed program and data files, and
# likewise for installed files that can be shared among architectures.
# These should be relative file names.
USRDIR = usr
USRSHAREDIR = $(USRDIR)/share
d51 1
d53 1
d55 6
a60 1
TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME)
d62 1
a62 2
# The "tzselect" and (if you do "make INSTALL") "date" commands go in:
BINDIR = $(TOPDIR)/$(USRDIR)/bin
d64 1
a64 2
# The "zdump" command goes in:
ZDUMPDIR = $(BINDIR)
d66 1
a66 2
# The "zic" command goes in:
ZICDIR = $(TOPDIR)/$(USRDIR)/sbin
d69 2
a70 1
MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man
a72 2
LIBDIR = $(TOPDIR)/$(USRDIR)/lib

d74 1
a74 2
# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t
a107 3
#	BACKWARD=	backward
# If you also want the link US/Pacific-New, even though it is confusing
# and is planned to be removed from the database eventually, use
d112 1
a112 1
BACKWARD=	backward
a161 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
a167 2
#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
#	with external linkage, e.g., applications cannot define 'localtime'.
a168 2
#  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
#	security implications and is not recommended for general use
d316 1
a316 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
d344 2
a345 2
  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
a366 5
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary.  XEmacs 21.5.34 displays them correctly,
# presumably because they are Latin-1.
UNUSUAL_OK_CHARSET= °±½¾×

d368 6
a373 7
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# multibyte letters are also allowed so that commentary can contain a
# few safe symbols and people's names and can quote non-English sources.
# Other non-letters are limited to ASCII renderings for the
# convenience of maintainers using XEmacs 21.5.34, which by default
# mishandles Unicode characters U+0100 and greater.
OK_CHAR=	'[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
d399 1
a399 1
CC=		$(cc) -DTZDIR='"$(TZDIR)"'
d424 1
a424 1
WEB_PAGES=	tz-art.html tz-how-to.html tz-link.html
d428 1
a428 1
YDATA=		$(PRIMARY_YDATA) etcetera
d430 1
a430 2
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward pacificnew
TDATA=		$(YDATA) $(NDATA) $(BACKWARD)
d434 2
a435 3
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
DATA=		$(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
d437 1
a437 2
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk \
			ziguard.awk zishrink.awk
d460 1
a460 1
		time2posix.3 tz-art.html tz-how-to.html tz-link.html \
d471 1
a471 2
all:		tzselect yearistype zic zdump libtz.a $(TABDATA) \
		  vanguard.zi main.zi rearguard.zi
d476 12
a487 16
		mkdir -p '$(DESTDIR)$(BINDIR)' \
			'$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \
			'$(DESTDIR)$(LIBDIR)' \
			'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
			'$(DESTDIR)$(MANDIR)/man8'
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \
			-t '$(DESTDIR)$(TZDEFAULT)'
		cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
		cp tzselect '$(DESTDIR)$(BINDIR)/.'
		cp zdump '$(DESTDIR)$(ZDUMPDIR)/.'
		cp zic '$(DESTDIR)$(ZICDIR)/.'
		cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
		$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
		cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
		cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
		cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
d490 3
a492 3
		mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
		cp date '$(DESTDIR)$(BINDIR)/.'
		cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
d498 1
a498 1
		  V='$(VERSION)'; } && \
d502 3
a504 9
# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
		$(AWK) -v outfile='$@@' -f ziguard.awk $(TDATA) $(PACKRATDATA) \
		  >$@@.out
		mv $@@.out $@@
tzdata.zi:	$(DATAFORM).zi version
		version=`sed 1q version` && \
		  LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
		    $(DATAFORM).zi >$@@.out
d532 2
a533 2
 BACKWARD='$(BACKWARD)' \
 DESTDIR='$(DESTDIR)' \
d536 2
a537 3
 TZDEFAULT='$(TZDEFAULT)' \
 TZDIR='$(TZDIR)' \
 YEARISTYPE='$(YEARISTYPE)' \
d561 4
a564 4
		rm -fr '$(DESTDIR)$(TZDIR)-leaps'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
d567 4
a570 4
		rm -fr '$(DESTDIR)$(TZDIR)-posix'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
a578 8
# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
		./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@@ : '\(.*\).zd') >$@@

d580 1
a580 2
		rm -fr tzs.dir
		mkdir tzs.dir
d585 7
a591 8
		set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
			| LC_ALL=C sort -t . -k 2,2` && \
		shift && \
		ZDS=$$* && \
		$(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs.dir
		mv $@@.out $@@
d634 1
a634 1
			CONTRIBUTING LICENSE README \
d636 1
a636 3
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
			Makefile && \
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
d644 1
a644 2
		! grep -n '[[:space:]]$$' \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
d650 2
a651 3
check_name_lengths: $(TDATA_TO_CHECK) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
			$(TDATA_TO_CHECK) backzone
d665 2
a666 2
check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
		$(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
d683 2
a684 4
# Check that zishrink.awk does not alter the data, and that ziguard.awk
# preserves main-format data.
check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
		  $(DATAFORM).zi tzdata.zi
d686 1
a686 2
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
		    time_t.dir/$$type-shrunk && \
d691 3
a693 9
		  $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
		  case $(DATAFORM) in \
		    main) \
		      $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
		      $(AWK) '/^Rule/' $(TDATA) | \
			$(ZIC) $$leap -d time_t.dir/$$type-t - \
			  $(PACKRATDATA) && \
		      diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
		  esac && \
d703 1
a703 1
		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
d767 1
a767 1
		$(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
d769 1
a769 1
		for i in $(TDATA_TO_CHECK) tzdata.zi; do \
d772 1
a772 1
		$(zic) -v -d public.dir $(TDATA_TO_CHECK)
d793 2
a794 5
		    time_t.dir/int64_t/etc \
		    time_t.dir/$$type/etc && \
		  diff $$quiet_option -r \
		    time_t.dir/int64_t/usr/share \
		    time_t.dir/$$type/usr/share && \
d803 1
a803 1
		  time_t.dir/int64_t/usr/bin/zdump -V -t $$range $$zones \
d805 1
a805 1
		  time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \
a815 3
# These *_version rules are intended for use if VERSION is set by some
# other means.  Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
d877 1
a877 1
.PHONY: check check_character_set check_links check_name_lengths
d881 1
a881 1
.PHONY: clean clean_misc dummy.zd force_tzs
d885 1
a885 4
.PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: typecheck
a886 1
.PHONY: $(ZDS)
@


1.1.1.1.4.4.2.6
log
@Sync external/public-domain/tz/dist to current, requested by kre
in ticket #1644:

	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.6
	external/public-domain/tz/dist/Makefile         up to 1.1.1.22
	external/public-domain/tz/dist/NEWS             up to 1.1.1.24
	external/public-domain/tz/dist/README           up to 1.1.1.7
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.14
	external/public-domain/tz/dist/africa           up to 1.1.1.17
	external/public-domain/tz/dist/antarctica       up to 1.1.1.11
	external/public-domain/tz/dist/asia             up to 1.1.1.21
	external/public-domain/tz/dist/australasia      up to 1.1.1.16
	external/public-domain/tz/dist/backward         up to 1.1.1.9
	external/public-domain/tz/dist/backzone         up to 1.1.1.15
	external/public-domain/tz/dist/etcetera         up to 1.1.1.3
	external/public-domain/tz/dist/europe           up to 1.1.1.23
	external/public-domain/tz/dist/factory          up to 1.1.1.3
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.10
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.11
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.7
	external/public-domain/tz/dist/northamerica     up to 1.1.1.21
	external/public-domain/tz/dist/pacificnew       up to 1.1.1.2
	external/public-domain/tz/dist/southamerica     up to 1.1.1.15
	external/public-domain/tz/dist/systemv          up to 1.1.1.2
	external/public-domain/tz/dist/theory.html      up to 1.1.1.6
	external/public-domain/tz/dist/version          up to 1.1.1.11
	external/public-domain/tz/dist/yearistype.sh    up to 1.1.1.2
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.3
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.5
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.15
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.17
	external/public-domain/tz/dist/zoneinfo2tdf.pl  up to 1.1.1.2
	doc/3RDPARTY					(apply patch)

Import tzdata2018f from ftp://ftp.iana.org/tz/releases/tzdata2018f.tar.gz

  Volgograd moves from +03 to +04 on 2018-10-28.
  Fiji ends DST 2019-01-13, not 2019-01-20.
  Most of Chile changes DST dates, effective 2019-04-06.

  Plus corrections to North Korea's 2018-05-05 and China's April 1988
  updates (getting the actual time/date of the transition correct)
  Corrections for Macau pre 1992, Japan in late 1940's - early 1950's,
  and China (Shanghai) 1940's.  The Phillipines get their timezone
  name abbreviations back.

 -

Import tzdata2018g from ftp://ftp.iana.org/tz/releases/tzdata2018g.tar.gz

Summary of changes in tzdata2018g (2018-10-26 22:22:45 -0700):

    Morocco switches to permanent +01 on 2018-10-27.
@
text
@a0 2
# Make and install tzdb code and data.

d22 3
a24 3
# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
d34 3
a36 3
# for handling POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
d41 1
a41 1
# Alternatively, if you discover you've got the wrong timezone, you can just
d78 1
a78 1
# The default local timezone is taken from the file TZDEFAULT.
d87 1
a87 1
# "Compiled" timezone information is placed in the "TZDIR" directory
d109 2
a110 4
# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
a111 2
# What kind of TZif data files to generate.
# (TZif is the binary time zone data format that zic generates.)
d132 1
a132 1
# To install data in text form that has all the information of the TZif data,
d174 1
d239 1
a239 1
  -Wbad-function-cast -Wcast-align=strict -Wdate-time \
d245 1
a245 2
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
  -Wstringop-truncation -Wsuggest-attribute=cold \
a246 1
  -Wsuggest-attribute=malloc \
d296 1
a296 1
# time (rather than the timezone specified in the TZ environment variable)
d319 1
a319 1
# argument of opaque type timezone_t that specifies the timezone.
d358 1
a358 1
# How to use zic to install TZif files.
a362 3
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
#	AWK=		gawk
a410 7
# These characters are Latin-1, and so are likely to be displayable
# even in editors with limited character sets.
UNUSUAL_OK_LATIN_1 = «°±»½¾×
# This IPA symbol is represented in Unicode as the composition of
# U+0075 and U+032F, and U+032F is not considered alphabetic by some
# grep implementations that do not grok composition.
UNUSUAL_OK_IPA = u̯
d412 3
a414 2
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
a492 1
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
d497 1
a497 3
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)
a516 1
		ziguard.awk zishrink.awk \
d560 1
a560 1
# These files can be tailored by setting BACKWARD and PACKRATDATA.
d562 2
a563 2
		$(AWK) -v DATAFORM=`expr $@@ : '\(.*\).zi'` -f ziguard.awk \
		  $(TDATA) $(PACKRATDATA) >$@@.out
d565 1
a565 3
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
d567 1
a567 6
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
d605 2
a606 4
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi

# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
d609 1
a609 1
posix_only: $(INSTALL_DATA_DEPS)
d612 1
a612 1
right_only: $(INSTALL_DATA_DEPS)
d639 1
a639 1
posix_packrat: $(INSTALL_DATA_DEPS)
d650 1
a650 2
		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@@ : '\(.*\).zd') \
		  >$@@
d652 4
a655 5
TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
d659 1
a659 2
		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
a660 1
		set x $$x && \
d663 3
a665 4
		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
d668 2
a669 1
# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
d672 1
a672 1
		touch $@@
d711 1
a711 1
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
a716 1
	touch $@@
d720 1
a720 2
		! grep -En "$$pat" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a722 1
		touch $@@
a730 1
		touch $@@
a742 1
		touch $@@
a746 1
		touch $@@
a752 1
		touch $@@
d755 1
a755 6
		if test -s $(TZS); then \
		  diff -u $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@
a760 1
		touch $@@
d764 10
a773 11
check_zishrink: check_zishrink_posix check_zishrink_right
check_zishrink_posix check_zishrink_right: \
  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		mkdir $@@.dir $@@-t.dir $@@-shrunk.dir
		case $@@ in \
		  *_right) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@.dir $(DATAFORM).zi && \
		  $(ZIC) $$leap -d $@@-shrunk.dir tzdata.zi && \
d776 1
a776 1
		      $(ZIC) $$leap -d $@@-t.dir $(TDATA) && \
d778 8
a785 6
			$(ZIC) $$leap -d $@@-t.dir - $(PACKRATDATA) && \
		      diff -r $@@.dir $@@-t.dir;; \
		  esac
		diff -r $@@.dir $@@-shrunk.dir
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		touch $@@
d788 1
a788 2
		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
		  check_* core typecheck_* \
d818 1
a818 1
# Set the timestamps to those of the git repository, if available,
d825 1
a825 1
set-timestamps.out: $(EIGHT_YARDS)
d828 1
a828 1
		   files=`git ls-files $(EIGHT_YARDS)` && \
d846 1
a848 3
set-tzs-timestamp.out: $(TZS)
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch $@@
d853 6
a858 7
check_public: $(VERSION_DEPS)
		rm -fr public.dir
		mkdir public.dir
		ln $(VERSION_DEPS) public.dir
		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
d860 1
a860 1
		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
a861 1
		touch $@@
d865 6
a870 11
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		case $@@ in \
		  int32_t) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
d873 5
a877 8
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@.dir && \
		  $(MAKE) TOPDIR="$$wd/$@@.dir" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@@'" \
d879 23
a901 23
			D=$$wd/$@@.dir \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
		    $(MAKE) TOPDIR="$$wd/$@@.dir" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
			D=$$wd/$@@.dir \
		      to$$range.tzs) && \
		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
			  $@@.dir/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
					   $@@.dir/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
		      $@@.dir/usr/share; \
		}
		touch $@@
d903 1
a903 11
TRADITIONAL_ASC = \
  tzcode$(VERSION).tar.gz.asc \
  tzdata$(VERSION).tar.gz.asc
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
  tzdb-$(VERSION).tar.lz.asc

tarballs rearguard_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi
d910 1
a910 4
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
  tzdb-$(VERSION).tar.lz
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz
d913 3
a915 3
signatures_version: $(ALL_ASC)
rearguard_signatures_version: $(REARGUARD_ASC)
traditional_signatures_version: $(TRADITIONAL_ASC)
d930 1
a930 21
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
		rm -fr tzdata$(VERSION)-rearguard.dir
		mkdir tzdata$(VERSION)-rearguard.dir
		ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
		cd tzdata$(VERSION)-rearguard.dir && \
		  rm -f $(TDATA) $(PACKRATDATA) version
		for f in $(TDATA) $(PACKRATDATA); do \
		  rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
		  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
		  touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
		done
		sed '1s/$$/-rearguard/' \
		  <version >tzdata$(VERSION)-rearguard.dir/version
		touch -cmr version tzdata$(VERSION)-rearguard.dir/version
		LC_ALL=C && export LC_ALL && \
		  (cd tzdata$(VERSION)-rearguard.dir && \
		   tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
		     gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d940 2
d943 2
a944 1
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
d946 1
a946 2
$(ALL_ASC):
		gpg2 --armor --detach-sign $?
d948 8
a955 18
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: typecheck_long_long typecheck_unsigned
typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		cd $@@.dir && \
		  case $@@ in \
		    *_long_long) i="long long";; \
		    *_unsigned ) i="unsigned" ;; \
		  esac && \
		  typecheck_cflags='' && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="`pwd`" \
		    install
		$@@.dir/zdump -i -c 1970,1971 Europe/Rome
		touch $@@
d971 3
a973 1
.PHONY: check check_time_t_alternatives
d977 2
a978 4
.PHONY: posix_only posix_packrat posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
@


1.1.1.1.4.4.2.7
log
@Pull up the following, requested by kre in ticket #1670:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.23
	external/public-domain/tz/dist/NEWS             up to 1.1.1.26
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.16
	external/public-domain/tz/dist/africa           up to 1.1.1.19
	external/public-domain/tz/dist/asia             up to 1.1.1.22
	external/public-domain/tz/dist/australasia      up to 1.1.1.17
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.12
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.8
	external/public-domain/tz/dist/northamerica     up to 1.1.1.22
	external/public-domain/tz/dist/theory.html      up to 1.1.1.7
	external/public-domain/tz/dist/version          up to 1.1.1.13
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.4
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.16
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.18
	distrib/sets/lists/base/mi			(patch)
	doc/3RDPARTY					(patch)

Import tzdata2018h from ftp://ftp.iana.org/tz/releases/tzdata2018h.tar.gz

Summary of changes in tzdata2018h (2018-12-23 17:59:32 -0800):

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla, Alaska observes PST this winter only.

    Add predictions for Iran from 2038 through 2090.

    Changes to some old timestamps for Nauru (1979) Guam (1959-77),
    Hong Kong (1904, 1941, 1945, 1952) (others in Pacific during WWII)

 ---

Merge tzdata2018h

 ---

Update to tzdata2018h (new zone Asia/Qostanay)

 ---

Import tzdata2018i from ftp://ftp.iana.org/tz/releases/tzdata2018i.tar.gz

Summary of changes in tzdata2018i (2018-12-30 11:05:43 -0800):

    Due to a change in government, Sao Tome and Principe switches back
    from +01 to +00 on 2019-01-01 at 02:00.

 ---

Merge tzdata2018i

 ---

Update to tzdata2018i
@
text
@a382 3
# Name of curl <https://curl.haxx.se/>, used for HTML validation.
CURL=		curl

d384 1
a384 1
# validating HTML 4.01.  The default should work on both Debian and Red Hat.
d391 1
a391 1
# The name, arguments and environment of a program to validate HTML 4.01.
a490 1
CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
d802 3
a804 9
check_web:	$(CHECK_WEB_PAGES)
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
check_tz-art.html check_tz-link.html:
		$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		    -F file=@@$$(expr $@@ : 'check_\(.*\)') -o $@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@
check_tz-how-to.html: tz-how-to.html
d1071 1
a1071 1
.PHONY: check_web check_zishrink
@


1.1.1.1.4.5
log
@Pull up following revision(s) (requested by christos in ticket #1143):
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.2
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.1
	external/public-domain/tz/dist/Makefile: up to 1.1.1.10
	external/public-domain/tz/dist/NEWS: up to 1.1.1.10
	external/public-domain/tz/dist/README: up to 1.1.1.3
	external/public-domain/tz/dist/Theory: up to 1.1.1.5
	external/public-domain/tz/dist/asia: up to 1.1.1.9
	external/public-domain/tz/dist/australasia: up to 1.1.1.6
	external/public-domain/tz/dist/backward: up to 1.1.1.5
	external/public-domain/tz/dist/backzone: up to 1.1.1.8
	external/public-domain/tz/dist/checklinks.awk: up to 1.1.1.2
	external/public-domain/tz/dist/checktab.awk: up to 1.1.1.8
	external/public-domain/tz/dist/europe: up to 1.1.1.10
	external/public-domain/tz/dist/iso3166.tab: up to 1.1.1.3
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.5
	external/public-domain/tz/dist/leapseconds.awk: up to 1.1.1.5
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.6
	external/public-domain/tz/dist/northamerica: up to 1.1.1.10
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.6
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.8
	external/public-domain/tz/tzdata2netbsd: up to 1.8
Update tzdata to 2016b.
@
text
@d8 1
a8 1
VERSION=	2016b
d87 5
a91 2
# below.  POSIX mandates that leap seconds not be counted; for compatibility
# with it, use "posix_only" or "posix_right".
a94 7
# If you want out-of-scope and often-wrong data from the file 'backzone', use
#	PACKRATDATA=	backzone
# To omit this data, use
#	PACKRATDATA=

PACKRATDATA=

a104 2
#  -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
#  -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
a114 2
#  -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
#	functions like 'link' or variables like 'tzname' required by POSIX
a238 7
# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in
# submake command lines.  The default is no leap seconds.

LEAPSECONDS=

# The zic command and its arguments.

a243 4
# How to use zic to install tzdata binary files.

ZIC_INSTALL=	$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)

d347 2
a348 2
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory
WEB_PAGES=	tz-art.htm tz-how-to.html tz-link.htm
d369 1
a369 1
all:		tzselect yearistype zic zdump libtz.a $(TABDATA)
d378 2
a379 1
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
d401 1
a401 1
zic:		$(TZCOBJS)
d411 7
a417 22
# Arguments to pass to submakes of install_data.
# They can be overridden by later submake arguments.
INSTALLARGS = \
 DESTDIR=$(DESTDIR) \
 LEAPSECONDS='$(LEAPSECONDS)' \
 PACKRATDATA='$(PACKRATDATA)' \
 TZDIR=$(TZDIR) \
 YEARISTYPE=$(YEARISTYPE) \
 ZIC='$(ZIC)'

# 'make install_data' installs one set of tz binary files.
# It can be tailored by setting LEAPSECONDS, PACKRATDATA, etc.
install_data:	zic leapseconds yearistype $(PACKRATDATA) $(TDATA)
		$(ZIC_INSTALL) $(TDATA)
		$(AWK) '/^Rule/' $(TDATA) | $(ZIC_INSTALL) - $(PACKRATDATA)

posix_only:
		$(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data

right_only:
		$(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \
			install_data
d428 1
a428 1
right_posix:	right_only
d431 4
a434 2
		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
d436 1
a436 1
posix_right:	posix_only
d439 9
a447 7
		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only

# This obsolescent rule is present for backwards compatibility with
# tz releases 2014g through 2015g.  It should go away eventually.
posix_packrat:
		$(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only
d663 1
a663 2
.PHONY: install install_data maintainer-clean names
.PHONY: posix_only posix_packrat posix_right
@


1.1.1.1.4.5.2.1
log
@Sync with netbsd-5
@
text
@d7 2
a8 2
# Version number for the distribution, overridden in the 'tarballs' rule below.
VERSION=	unknown
d104 1
d112 1
a112 1
#  -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
d114 1
a114 2
#	ctime_r and asctime_r incompatibly with the POSIX standard
#	(Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
a131 4
#  -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
d243 1
a243 1
# to release 2012h and earlier.
d259 1
a259 1
# How to use zic to install tz binary files.
d275 1
a275 1
# validating.  The default should work on both Debian and Red Hat.
d280 1
a280 1
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
d283 2
a284 2
# See <http://openjade.sourceforge.net/doc/> for a validator, and
# <https://validator.w3.org/source/> for a validation library.
d329 1
a329 1
GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
d366 1
a366 1
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory version
d381 1
a381 26
TZS_YEAR=	2050
TZS=		to$(TZS_YEAR).tzs
TZS_NEW=	to$(TZS_YEAR)new.tzs
TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
			private.h tzfile.h zdump.c zic.c
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS)

# Consult these files when deciding whether to rebuild the 'version' file.
# This list is not the same as the output of 'git ls-files', since
# .gitignore is not distributed.
VERSION_DEPS= \
		CONTRIBUTING LICENSE Makefile NEWS README Theory \
		africa antarctica asctime.c asia australasia \
		backward backzone \
		checklinks.awk checktab.awk \
		date.1 date.c difftime.c \
		etcetera europe factory iso3166.tab \
		leap-seconds.list leapseconds.awk localtime.c \
		newctime.3 newstrftime.3 newtzset.3 northamerica \
		pacificnew private.h \
		southamerica strftime.c systemv \
		time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \
		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
		workman.sh yearistype.sh \
		zdump.8 zdump.c zic.8 zic.c \
		zone.tab zone1970.tab zoneinfo2tdf.pl
d411 4
a414 15
version:	$(VERSION_DEPS)
		{ (type git) >/dev/null 2>&1 && \
		  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty` || \
		  V=$(VERSION); } && \
		printf '%s\n' "$$V" >$@@.out
		mv $@@.out $@@

version.h:	version
		VERSION=`cat version` && printf '%s\n' \
		  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
		  "static char const TZVERSION[]=\"$$VERSION\";" \
		  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
		  >$@@.out
		mv $@@.out $@@
d427 1
a427 2
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@.out
		mv $@@.out $@@
a479 23
$(TZS_NEW):	$(TDATA) zdump zic
		mkdir -p tzs.dir
		$(zic) -d tzs.dir $(TDATA)
		$(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \
		   $(TDATA) | LC_ALL=C sort >$@@.out
		wd=`pwd` && \
		zones=`$(AWK) -v wd="$$wd" \
				'/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \
			 | LC_ALL=C sort` && \
		./zdump -i -c $(TZS_YEAR) $$zones >>$@@.out
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $@@.out >$@@.sed.out
		rm -fr tzs.dir $@@.out
		mv $@@.sed.out $@@

# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
# If it exists but 'make check_tzs' fails, a maintainer should inspect the
# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
$(TZS):
		$(MAKE) force_tzs

force_tzs:	$(TZS_NEW)
		cp $(TZS_NEW) $(TZS)

d481 1
a481 2
		rm -f $@@
		$(AR) -rc $@@ $(LIBOBJS)
d487 2
a488 2
tzselect:	tzselect.ksh version
		VERSION=`cat version` && sed \
d494 3
a496 4
			-e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
			<$@@.ksh >$@@.out
		chmod +x $@@.out
		mv $@@.out $@@
d499 1
a499 1
		  check_tables check_tzs check_web
d504 2
a505 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) \
			CONTRIBUTING LICENSE Makefile README version && \
d511 1
a511 2
		patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
		! grep -En "$$pat" $(ENCHILADA)
a534 3
check_tzs:	$(TZS) $(TZS_NEW)
		diff -u $(TZS) $(TZS_NEW)

d542 1
a542 1
		rm -fr *.dir tzdb-*/ $(TZS_NEW)
d547 1
a547 1
		rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
d566 1
a566 2
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@.out
		mv $@@.out $@@
d577 1
a577 2
		if (type git) >/dev/null 2>&1 && \
		   files=`git ls-files $(ENCHILADA)` && \
a593 2
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
d602 1
a602 1
		mkdir -p public.dir
d604 1
a604 1
		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
d606 2
a607 2
		$(zic) -v -d public.dir $(TDATA)
		rm -fr public.dir
a616 1
		wd=`pwd` && \
d619 1
a619 1
		  mkdir -p time_t.dir/$$type && \
d621 1
a621 1
		  $(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
d626 2
a627 2
		    time_t.dir/int64_t/etc/zoneinfo \
		    time_t.dir/$$type/etc/zoneinfo && \
d636 5
a640 5
		  time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/int64_t.out && \
		  time_t.dir/$$type/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/$$type.out && \
		  diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
d643 1
a643 1
		rm -fr time_t.dir
d645 1
a645 10
tarballs traditional_tarballs signatures traditional_signatures: version
		VERSION=`cat version` && \
		$(MAKE) VERSION="$$VERSION" $@@_version

tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
traditional_tarballs_version: \
  tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
traditional_signatures_version: \
  tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
d651 1
a651 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d656 1
a656 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d658 1
a658 8
tzdb-$(VERSION).tar.lz: set-timestamps.out
		rm -fr tzdb-$(VERSION)
		mkdir tzdb-$(VERSION)
		ln $(ENCHILADA) tzdb-$(VERSION)
		touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
		mv $@@.out $@@
a665 3
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
		gpg --armor --detach-sign $?

d691 1
a691 2
.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
.PHONY: clean clean_misc force_tzs
d694 1
a694 2
.PHONY: public right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version typecheck
@


1.1.1.1.4.5.2.2
log
@Sync with netbsd-7-1-RELEASE
@
text
@d75 2
a76 2
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
d78 2
a79 2
# below.  If you want want only "right" time, with values interpreted
# as seconds since the epoch (counting leap seconds), use
d88 1
a88 4
# with it, use "posix_only" or "posix_right".  Use POSIX time on systems with
# leap smearing; this can work better than unsmeared "right" time with
# applications that are not leap second aware, and is closer to unsmeared
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).
d168 1
a168 1
	-Wundef -Wunused -Wwrite-strings \
@


1.1.1.1.4.6
log
@Pull up following revision(s) (requested by kre in ticket #1324):
	distrib/sets/lists/base/mi: 1.1125, 1.1128, 1.1132, 1.1137, 1.1139, 1.1140
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.3
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.2
	external/public-domain/tz/dist/Makefile: up to 1.1.1.16
	external/public-domain/tz/dist/NEWS: up to 1.1.1.16
	external/public-domain/tz/dist/README: up to 1.1.1.5
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.6
	external/public-domain/tz/dist/Theory: up to 1.1.1.9
	external/public-domain/tz/dist/africa: up to 1.1.1.9
	external/public-domain/tz/dist/antarctica: up to 1.1.1.7
	external/public-domain/tz/dist/asia: up to 1.1.1.15
	external/public-domain/tz/dist/australasia: up to 1.1.1.10
	external/public-domain/tz/dist/backward: up to 1.1.1.6
	external/public-domain/tz/dist/backzone: up to 1.1.1.10
	external/public-domain/tz/dist/etcetera: up to 1.1.1.2
	external/public-domain/tz/dist/europe: up to 1.1.1.16
	external/public-domain/tz/dist/factory: up to 1.1.1.2
	external/public-domain/tz/dist/iso3166.tab: up to 1.1.1.4
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.6
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.7
	external/public-domain/tz/dist/northamerica: up to 1.1.1.14
	external/public-domain/tz/dist/southamerica: up to 1.1.1.10
	external/public-domain/tz/dist/version: up to 1.1.1.3
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.10
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.12
	external/public-domain/tz/share/zoneinfo/Makefile: up to 1.3
	external/public-domain/tz/tzdata2netbsd: up to 1.11
Update tzdata to 2016j.
@
text
@d7 2
a8 2
# Version number for the distribution, overridden in the 'tarballs' rule below.
VERSION=	unknown
d104 1
d112 1
a112 1
#  -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
d114 1
a114 2
#	ctime_r and asctime_r incompatibly with the POSIX standard
#	(Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
a131 4
#  -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
d243 1
a243 1
# to release 2012h and earlier.
d259 1
a259 1
# How to use zic to install tz binary files.
d275 1
a275 1
# validating.  The default should work on both Debian and Red Hat.
d280 1
a280 1
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
d283 2
a284 2
# See <http://openjade.sourceforge.net/doc/> for a validator, and
# <https://validator.w3.org/source/> for a validation library.
d329 1
a329 1
GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
d366 1
a366 1
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory version
d381 1
a381 26
TZS_YEAR=	2050
TZS=		to$(TZS_YEAR).tzs
TZS_NEW=	to$(TZS_YEAR)new.tzs
TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
			private.h tzfile.h zdump.c zic.c
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS)

# Consult these files when deciding whether to rebuild the 'version' file.
# This list is not the same as the output of 'git ls-files', since
# .gitignore is not distributed.
VERSION_DEPS= \
		CONTRIBUTING LICENSE Makefile NEWS README Theory \
		africa antarctica asctime.c asia australasia \
		backward backzone \
		checklinks.awk checktab.awk \
		date.1 date.c difftime.c \
		etcetera europe factory iso3166.tab \
		leap-seconds.list leapseconds.awk localtime.c \
		newctime.3 newstrftime.3 newtzset.3 northamerica \
		pacificnew private.h \
		southamerica strftime.c systemv \
		time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \
		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
		workman.sh yearistype.sh \
		zdump.8 zdump.c zic.8 zic.c \
		zone.tab zone1970.tab zoneinfo2tdf.pl
d411 4
a414 15
version:	$(VERSION_DEPS)
		{ (type git) >/dev/null 2>&1 && \
		  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty` || \
		  V=$(VERSION); } && \
		printf '%s\n' "$$V" >$@@.out
		mv $@@.out $@@

version.h:	version
		VERSION=`cat version` && printf '%s\n' \
		  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
		  "static char const TZVERSION[]=\"$$VERSION\";" \
		  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
		  >$@@.out
		mv $@@.out $@@
d427 1
a427 2
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@.out
		mv $@@.out $@@
a479 23
$(TZS_NEW):	$(TDATA) zdump zic
		mkdir -p tzs.dir
		$(zic) -d tzs.dir $(TDATA)
		$(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \
		   $(TDATA) | LC_ALL=C sort >$@@.out
		wd=`pwd` && \
		zones=`$(AWK) -v wd="$$wd" \
				'/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \
			 | LC_ALL=C sort` && \
		./zdump -i -c $(TZS_YEAR) $$zones >>$@@.out
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $@@.out >$@@.sed.out
		rm -fr tzs.dir $@@.out
		mv $@@.sed.out $@@

# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
# If it exists but 'make check_tzs' fails, a maintainer should inspect the
# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
$(TZS):
		$(MAKE) force_tzs

force_tzs:	$(TZS_NEW)
		cp $(TZS_NEW) $(TZS)

d481 1
a481 2
		rm -f $@@
		$(AR) -rc $@@ $(LIBOBJS)
d487 2
a488 2
tzselect:	tzselect.ksh version
		VERSION=`cat version` && sed \
d494 3
a496 4
			-e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
			<$@@.ksh >$@@.out
		chmod +x $@@.out
		mv $@@.out $@@
d499 1
a499 1
		  check_tables check_tzs check_web
d504 2
a505 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) \
			CONTRIBUTING LICENSE Makefile README version && \
d511 1
a511 2
		patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
		! grep -En "$$pat" $(ENCHILADA)
a534 3
check_tzs:	$(TZS) $(TZS_NEW)
		diff -u $(TZS) $(TZS_NEW)

d542 1
a542 1
		rm -fr *.dir tzdb-*/ $(TZS_NEW)
d547 1
a547 1
		rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
d566 1
a566 2
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@.out
		mv $@@.out $@@
d577 1
a577 2
		if (type git) >/dev/null 2>&1 && \
		   files=`git ls-files $(ENCHILADA)` && \
a593 2
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
d602 1
a602 1
		mkdir -p public.dir
d604 1
a604 1
		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
d606 2
a607 2
		$(zic) -v -d public.dir $(TDATA)
		rm -fr public.dir
a616 1
		wd=`pwd` && \
d619 1
a619 1
		  mkdir -p time_t.dir/$$type && \
d621 1
a621 1
		  $(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
d626 2
a627 2
		    time_t.dir/int64_t/etc/zoneinfo \
		    time_t.dir/$$type/etc/zoneinfo && \
d636 5
a640 5
		  time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/int64_t.out && \
		  time_t.dir/$$type/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/$$type.out && \
		  diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
d643 1
a643 1
		rm -fr time_t.dir
d645 1
a645 10
tarballs traditional_tarballs signatures traditional_signatures: version
		VERSION=`cat version` && \
		$(MAKE) VERSION="$$VERSION" $@@_version

tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
traditional_tarballs_version: \
  tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
traditional_signatures_version: \
  tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
d651 1
a651 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d656 1
a656 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d658 1
a658 8
tzdb-$(VERSION).tar.lz: set-timestamps.out
		rm -fr tzdb-$(VERSION)
		mkdir tzdb-$(VERSION)
		ln $(ENCHILADA) tzdb-$(VERSION)
		touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
		mv $@@.out $@@
a665 3
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
		gpg --armor --detach-sign $?

d691 1
a691 2
.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
.PHONY: clean clean_misc force_tzs
d694 1
a694 2
.PHONY: public right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version typecheck
@


1.1.1.1.4.7
log
@Pull up following revision(s) (requested by kre in ticket #1374):
	doc/3RDPARTY: 1.1420 via patch
	distrib/sets/lists/base/mi: 1.1155
	external/public-domain/tz/dist/Makefile: up to 1.1.1.17
	external/public-domain/tz/dist/NEWS: up to 1.1.1.17
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.7
	external/public-domain/tz/dist/Theory: up to 1.1.1.10
	external/public-domain/tz/dist/africa: up to 1.1.1.10
	external/public-domain/tz/dist/antarctica: up to 1.1.1.8
	external/public-domain/tz/dist/asia: up to 1.1.1.16
	external/public-domain/tz/dist/australasia: up to 1.1.1.11
	external/public-domain/tz/dist/backward: up to 1.1.1.7
	external/public-domain/tz/dist/backzone: up to 1.1.1.11
	external/public-domain/tz/dist/europe: up to 1.1.1.17
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.7
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.8
	external/public-domain/tz/dist/northamerica: up to 1.1.1.15
	external/public-domain/tz/dist/southamerica: up to 1.1.1.11
	external/public-domain/tz/dist/version: up to 1.1.1.4
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.11
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.13
Update to tzdata2017a.
@
text
@d75 2
a76 2
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
d78 2
a79 2
# below.  If you want want only "right" time, with values interpreted
# as seconds since the epoch (counting leap seconds), use
d88 1
a88 4
# with it, use "posix_only" or "posix_right".  Use POSIX time on systems with
# leap smearing; this can work better than unsmeared "right" time with
# applications that are not leap second aware, and is closer to unsmeared
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).
d168 1
a168 1
	-Wundef -Wunused -Wwrite-strings \
@


1.1.1.1.4.7.2.1
log
@Pull up following revision(s) (requested by kre in ticket #1519):
	distrib/sets/lists/base/mi: 1.1164
	doc/3RDPARTY: 1.2326 via patch
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.4
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.3
	external/public-domain/tz/dist/Makefile: up to 1.1.1.18
	external/public-domain/tz/dist/NEWS: up to 1.1.1.19
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.9
	external/public-domain/tz/dist/Theory: delete
	external/public-domain/tz/dist/africa: up to 1.1.1.12
	external/public-domain/tz/dist/antarctica: up to 1.1.1.9
	external/public-domain/tz/dist/asia: up to 1.1.1.17
	external/public-domain/tz/dist/australasia: up to 1.1.1.12
	external/public-domain/tz/dist/backward: up to 1.1.1.8
	external/public-domain/tz/dist/backzone: up to 1.1.1.12
	external/public-domain/tz/dist/calendars: up to 1.1.1.1
	external/public-domain/tz/dist/checklinks.awk: up to 1.1.1.3
	external/public-domain/tz/dist/europe: up to 1.1.1.18
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.8
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.9
	external/public-domain/tz/dist/leapseconds.awk: up to 1.1.1.6
	external/public-domain/tz/dist/northamerica: up to 1.1.1.17
	external/public-domain/tz/dist/southamerica: up to 1.1.1.12
	external/public-domain/tz/dist/theory.html: up to 1.1.1.1
	external/public-domain/tz/dist/version: up to 1.1.1.6
	external/public-domain/tz/dist/zishrink.awk: up to 1.1.1.1
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.12
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.14
Update tzdata to 2017c.
@
text
@a51 1
# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
d78 1
a78 1
# below.  If you want only "right" time, with values interpreted
a94 18
# To install data in text form that has all the information of the binary data,
# (optionally incorporating leap second information), use
#	TZDATA_TEXT=	tzdata.zi leapseconds
# To install text data without leap second information (e.g., because
# REDO='posix_only'), use
#	TZDATA_TEXT=	tzdata.zi
# To avoid installing text data, use
#	TZDATA_TEXT=

TZDATA_TEXT=	leapseconds tzdata.zi

# For backward-compatibility links for old zone names, use
#	BACKWARD=	backward pacificnew
# To omit these links, use
#	BACKWARD=

BACKWARD=	backward pacificnew

a101 5
# The name of a locale using the UTF-8 encoding, used during self-tests.
# The tests are skipped if the name does not appear to work on this system.

UTF8_LOCALE=	en_US.utf8

d109 1
a109 2
# Add the following to the end of the "CFLAGS=" line as needed to override
# defaults specified in the source code.  "-DFOO" is equivalent to "-DFOO=1".
a110 6
#  -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime
#	formats that generate only the last two digits of year numbers
#  -DEPOCH_LOCAL if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
a111 1
#  -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
d113 3
a115 3
#  -DHAVE_GENERIC=0 if _Generic does not work
#  -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
#  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
d118 1
a118 1
#  -DHAVE_INTTYPES_H if you have a non-C99 compiler with <inttypes.h>
d122 1
d126 3
a128 4
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
#  -DHAVE_STDBOOL_H if you have a non-C99 compiler with <stdbool.h>
#  -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
#  -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
d131 2
a132 2
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
d134 10
a143 4
#  -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
#  -Dlocale_t=XXX if your system uses XXX instead of locale_t
#  -Dssize_t=long on hosts like MS-Windows that lack ssize_t
#  -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
a146 1
#	This is intended for internal use only; it mangles external names.
d152 1
a152 1
#  -DUNINIT_TRAP if reading uninitialized storage can cause problems
d160 20
a179 21
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
GCC_INSTRUMENT = \
  -fsanitize=undefined -fsanitize-address-use-after-scope \
  -fsanitize-undefined-trap-on-error -fstack-protector
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
  $(GCC_INSTRUMENT) \
  -Wall -Wextra \
  -Walloc-size-larger-than=100000 -Warray-bounds=2 \
  -Wbad-function-cast -Wcast-align -Wdate-time \
  -Wdeclaration-after-statement -Wdouble-promotion \
  -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
  -Winit-self -Wjump-misses-init -Wlogical-op \
  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
  -Wold-style-definition -Woverlength-strings -Wpointer-arith \
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=5 \
  -Wsuggest-attribute=const -Wsuggest-attribute=format \
  -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
  -Wtrampolines -Wundef -Wuninitialized -Wunused \
  -Wvariadic-macros -Wvla -Wwrite-strings \
  -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
  -Wno-type-limits -Wno-unused-parameter
a191 25
# The next batch of options control support for external variables
# exported by tzcode.  In practice these variables are less useful
# than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
# #
# # To omit or support the external variable "tzname", add one of:
# #	-DHAVE_TZNAME=0
# #	-DHAVE_TZNAME=1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX 1988 and later.
# # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
# # crashes when combined with some platforms' standard libraries,
# # presumably due to memory allocation issues.
# #
# # To omit or support the external variables "timezone" and "daylight", add
# #	-DUSG_COMPAT=0
# #	-DUSG_COMPAT=1
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by
# # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later.
# # If not defined, the code attempts to guess USG_COMPAT from other macros.
# #
# # To support the external variable "altzone", add
# #	-DALTZONE
# # to the end of the "CFLAGS=" line; although "altzone" appeared in
# # System V Release 3.1 it has not been standardized.
#
d229 5
d243 2
a244 2
# 53 as a week number (rather than 52 or 53) for January days before
# January's first Monday when a "%V" format is used and January 1
d268 1
a268 1
ZIC_INSTALL=	$(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
a291 1
# Set VALIDATE=':' if you do not have such a program.
d358 1
a358 1
TZDOBJS=	zdump.o localtime.o asctime.o strftime.o
d373 1
a373 2
COMMON=		calendars CONTRIBUTING LICENSE Makefile \
			NEWS README theory.html version
d378 1
a378 1
YDATA=		$(PRIMARY_YDATA) etcetera $(BACKWARD)
d382 1
a382 1
TABDATA=	iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
d384 3
a386 4
TZDATA_ZI_DEPS=	zishrink.awk $(TDATA) $(PACKRATDATA)
DATA=		$(YDATA) $(NDATA) backzone iso3166.tab leap-seconds.list \
			leapseconds yearistype.sh $(ZONETABLES)
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk zishrink.awk
d393 1
a393 1
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi
d399 1
a399 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README \
d408 1
a408 1
		southamerica strftime.c systemv theory.html \
d430 1
a430 1
		cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
a450 5
# This file can be tailored by setting BACKWARD, PACKRATDATA, etc.
tzdata.zi:	$(TZDATA_ZI_DEPS)
		LC_ALL=C $(AWK) -f zishrink.awk $(TDATA) $(PACKRATDATA) >$@@.out
		mv $@@.out $@@

a475 1
 BACKWARD=$(BACKWARD) \
d484 4
a487 2
install_data:	zic leapseconds yearistype tzdata.zi
		$(ZIC_INSTALL) tzdata.zi
d524 1
a524 1
$(TZS_NEW):	tzdata.zi zdump zic
d526 3
a528 3
		$(zic) -d tzs.dir tzdata.zi
		$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
		   tzdata.zi | LC_ALL=C sort >$@@.out
d531 1
a531 1
				'/^Z/{print wd "/tzs.dir/" $$2}' tzdata.zi \
d567 2
a568 3
check:		check_character_set check_white_space check_links \
		  check_name_lengths check_sorted \
		  check_tables check_web check_zishrink check_tzs
d571 1
a571 4
	test ! '$(UTF8_LOCALE)' || \
	! printf 'A\304\200B\n' | \
	  LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 || { \
		LC_ALL='$(UTF8_LOCALE)' && export LC_ALL && \
d575 1
a575 2
			CONTRIBUTING LICENSE Makefile README \
			version tzdata.zi && \
d578 1
a578 2
		! grep -Env $(OK_LINE) $(ENCHILADA); \
	}
a584 7
PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+
FILE_NAME_COMPONENT_TOO_LONG = \
  $(PRECEDES_FILE_NAME)[^[:space:]]*[^/[:space:]]{15}

check_name_lengths: $(TDATA) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' $(TDATA) backzone

a598 1
		$(AWK) -f checklinks.awk tzdata.zi
d609 2
a610 20
# This checks only the HTML 4.01 strict page.
# To check the the other pages, use <https://validator.w3.org/>.
check_web:	tz-how-to.html
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html

# Check that tzdata.zi generates the same binary data that its sources do.
check_zishrink: tzdata.zi zic leapseconds $(PACKRATDATA) $(TDATA)
		for type in posix right; do \
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-shrunk && \
		  case $$type in \
		    right) leap='-L leapseconds';; \
	            *) leap=;; \
		  esac && \
		  $(ZIC) $$leap -d time_t.dir/$$type $(TDATA) && \
		  $(AWK) '/^Rule/' $(TDATA) | \
		    $(ZIC) $$leap -d time_t.dir/$$type - $(PACKRATDATA) && \
		  $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
		  diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
		done
		rm -fr time_t.dir
d616 1
a616 1
		rm -fr *.dir tzdata.zi tzdb-*/ $(TZS_NEW)
a669 1
		touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi
d681 1
a681 1
		for i in $(TDATA) tzdata.zi; do \
d775 2
a776 2
zonenames:	tzdata.zi
		@@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
a791 1
.PHONY: check_zishrink
@


1.1.1.1.4.7.2.2
log
@external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.1
external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.5
external/public-domain/tz/dist/Makefile         up to 1.1.1.20
external/public-domain/tz/dist/NEWS             up to 1.1.1.21
external/public-domain/tz/dist/README           up to 1.1.1.6
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.11
external/public-domain/tz/dist/africa           up to 1.1.1.14
external/public-domain/tz/dist/antarctica       up to 1.1.1.10
external/public-domain/tz/dist/asia             up to 1.1.1.19
external/public-domain/tz/dist/australasia      up to 1.1.1.14
external/public-domain/tz/dist/backzone         up to 1.1.1.14
external/public-domain/tz/dist/checktab.awk     up to 1.1.1.9
external/public-domain/tz/dist/europe           up to 1.1.1.20
external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.9
external/public-domain/tz/dist/leapseconds      up to 1.1.1.10
external/public-domain/tz/dist/northamerica     up to 1.1.1.19
external/public-domain/tz/dist/southamerica     up to 1.1.1.14
external/public-domain/tz/dist/theory.html      up to 1.1.1.3
external/public-domain/tz/dist/version          up to 1.1.1.8
external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.3
external/public-domain/tz/dist/zone.tab         up to 1.1.1.14
external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.16
doc/3RDPARTY					1.1506 (patch)

	Updated tzdata to 2018d.
	[kre, ticket #1589]
@
text
@a12 9
# Choose source data features.  To get new features right away, use:
#	DATAFORM=	vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
#	DATAFORM=	main
# To wait even longer for new features, use:
#	DATAFORM=	rearguard
DATAFORM=		main

d28 1
a28 1
# When a POSIX-style environment variable is handled, the rules in the
d31 1
a31 1
# daylight saving time.
d45 1
d47 1
a47 31
# Installation locations.
#
# The defaults are suitable for Debian, except that if REDO is
# posix_right or right_posix then files that Debian puts under
# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead
# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps,
# respectively.  Problems with the Debian approach are discussed in
# the commentary for the right_posix rule (below).

# Destination directory, which can be used for staging.
# 'make DESTDIR=/stage install' installs under /stage (e.g., to
# /stage/etc/localtime instead of to /etc/localtime).  Files under
# /stage are not intended to work as-is, but can be copied by hand to
# the root directory later.  If DESTDIR is empty, 'make install' does
# not stage, but installs directly into production locations.
DESTDIR =

# Everything is installed into subdirectories of TOPDIR, and used there.
# TOPDIR should be empty (meaning the root directory),
# or a directory name that does not end in "/".
# TOPDIR should be empty or an absolute name unless you're just testing.
TOPDIR =

# The default local time zone is taken from the file TZDEFAULT.
TZDEFAULT = $(TOPDIR)/etc/localtime

# The subdirectory containing installed program and data files, and
# likewise for installed files that can be shared among architectures.
# These should be relative file names.
USRDIR = usr
USRSHAREDIR = $(USRDIR)/share
d51 1
d53 1
d55 6
a60 1
TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME)
d62 1
a62 2
# The "tzselect" and (if you do "make INSTALL") "date" commands go in:
BINDIR = $(TOPDIR)/$(USRDIR)/bin
d64 1
a64 2
# The "zdump" command goes in:
ZDUMPDIR = $(BINDIR)
d66 1
a66 2
# The "zic" command goes in:
ZICDIR = $(TOPDIR)/$(USRDIR)/sbin
d69 2
a70 1
MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man
a72 2
LIBDIR = $(TOPDIR)/$(USRDIR)/lib

d74 1
a74 2
# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t
a107 3
#	BACKWARD=	backward
# If you also want the link US/Pacific-New, even though it is confusing
# and is planned to be removed from the database eventually, use
d112 1
a112 1
BACKWARD=	backward
a161 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
a167 2
#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
#	with external linkage, e.g., applications cannot define 'localtime'.
a168 2
#  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
#	security implications and is not recommended for general use
d316 1
a316 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
d344 2
a345 2
  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
a366 5
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary.  XEmacs 21.5.34 displays them correctly,
# presumably because they are Latin-1.
UNUSUAL_OK_CHARSET= °±½¾×

d368 6
a373 7
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# multibyte letters are also allowed so that commentary can contain a
# few safe symbols and people's names and can quote non-English sources.
# Other non-letters are limited to ASCII renderings for the
# convenience of maintainers using XEmacs 21.5.34, which by default
# mishandles Unicode characters U+0100 and greater.
OK_CHAR=	'[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
d399 1
a399 1
CC=		$(cc) -DTZDIR='"$(TZDIR)"'
d424 1
a424 1
WEB_PAGES=	tz-art.html tz-how-to.html tz-link.html
d428 1
a428 1
YDATA=		$(PRIMARY_YDATA) etcetera
d430 1
a430 2
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward pacificnew
TDATA=		$(YDATA) $(NDATA) $(BACKWARD)
d434 2
a435 3
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
DATA=		$(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
d437 1
a437 2
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk \
			ziguard.awk zishrink.awk
d460 1
a460 1
		time2posix.3 tz-art.html tz-how-to.html tz-link.html \
d471 1
a471 2
all:		tzselect yearistype zic zdump libtz.a $(TABDATA) \
		  vanguard.zi main.zi rearguard.zi
d476 12
a487 16
		mkdir -p '$(DESTDIR)$(BINDIR)' \
			'$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \
			'$(DESTDIR)$(LIBDIR)' \
			'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
			'$(DESTDIR)$(MANDIR)/man8'
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \
			-t '$(DESTDIR)$(TZDEFAULT)'
		cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
		cp tzselect '$(DESTDIR)$(BINDIR)/.'
		cp zdump '$(DESTDIR)$(ZDUMPDIR)/.'
		cp zic '$(DESTDIR)$(ZICDIR)/.'
		cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
		$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
		cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
		cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
		cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
d490 3
a492 3
		mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
		cp date '$(DESTDIR)$(BINDIR)/.'
		cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
d498 1
a498 1
		  V='$(VERSION)'; } && \
d502 3
a504 9
# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
		$(AWK) -v outfile='$@@' -f ziguard.awk $(TDATA) $(PACKRATDATA) \
		  >$@@.out
		mv $@@.out $@@
tzdata.zi:	$(DATAFORM).zi version
		version=`sed 1q version` && \
		  LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
		    $(DATAFORM).zi >$@@.out
d532 2
a533 2
 BACKWARD='$(BACKWARD)' \
 DESTDIR='$(DESTDIR)' \
d536 2
a537 3
 TZDEFAULT='$(TZDEFAULT)' \
 TZDIR='$(TZDIR)' \
 YEARISTYPE='$(YEARISTYPE)' \
d561 4
a564 4
		rm -fr '$(DESTDIR)$(TZDIR)-leaps'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
d567 4
a570 4
		rm -fr '$(DESTDIR)$(TZDIR)-posix'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
a578 8
# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
		./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@@ : '\(.*\).zd') >$@@

d580 1
a580 2
		rm -fr tzs.dir
		mkdir tzs.dir
d585 7
a591 8
		set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
			| LC_ALL=C sort -t . -k 2,2` && \
		shift && \
		ZDS=$$* && \
		$(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs.dir
		mv $@@.out $@@
d634 1
a634 1
			CONTRIBUTING LICENSE README \
d636 1
a636 3
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
			Makefile && \
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
d644 1
a644 2
		! grep -n '[[:space:]]$$' \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
d650 2
a651 3
check_name_lengths: $(TDATA_TO_CHECK) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
			$(TDATA_TO_CHECK) backzone
d665 2
a666 2
check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
		$(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
d683 2
a684 4
# Check that zishrink.awk does not alter the data, and that ziguard.awk
# preserves main-format data.
check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
		  $(DATAFORM).zi tzdata.zi
d686 1
a686 2
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
		    time_t.dir/$$type-shrunk && \
d691 3
a693 9
		  $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
		  case $(DATAFORM) in \
		    main) \
		      $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
		      $(AWK) '/^Rule/' $(TDATA) | \
			$(ZIC) $$leap -d time_t.dir/$$type-t - \
			  $(PACKRATDATA) && \
		      diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
		  esac && \
d703 1
a703 1
		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
d767 1
a767 1
		$(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
d769 1
a769 1
		for i in $(TDATA_TO_CHECK) tzdata.zi; do \
d772 1
a772 1
		$(zic) -v -d public.dir $(TDATA_TO_CHECK)
d793 2
a794 5
		    time_t.dir/int64_t/etc \
		    time_t.dir/$$type/etc && \
		  diff $$quiet_option -r \
		    time_t.dir/int64_t/usr/share \
		    time_t.dir/$$type/usr/share && \
d803 1
a803 1
		  time_t.dir/int64_t/usr/bin/zdump -V -t $$range $$zones \
d805 1
a805 1
		  time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \
a815 3
# These *_version rules are intended for use if VERSION is set by some
# other means.  Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
d877 1
a877 1
.PHONY: check check_character_set check_links check_name_lengths
d881 1
a881 1
.PHONY: clean clean_misc dummy.zd force_tzs
d885 1
a885 4
.PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: typecheck
a886 1
.PHONY: $(ZDS)
@


1.1.1.1.4.7.2.3
log
@Sync external/public-domain/tz/dist to current, requested by kre
in ticket #1644:

	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.6
	external/public-domain/tz/dist/Makefile         up to 1.1.1.22
	external/public-domain/tz/dist/NEWS             up to 1.1.1.24
	external/public-domain/tz/dist/README           up to 1.1.1.7
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.14
	external/public-domain/tz/dist/africa           up to 1.1.1.17
	external/public-domain/tz/dist/antarctica       up to 1.1.1.11
	external/public-domain/tz/dist/asia             up to 1.1.1.21
	external/public-domain/tz/dist/australasia      up to 1.1.1.16
	external/public-domain/tz/dist/backward         up to 1.1.1.9
	external/public-domain/tz/dist/backzone         up to 1.1.1.15
	external/public-domain/tz/dist/etcetera         up to 1.1.1.3
	external/public-domain/tz/dist/europe           up to 1.1.1.23
	external/public-domain/tz/dist/factory          up to 1.1.1.3
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.10
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.11
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.7
	external/public-domain/tz/dist/northamerica     up to 1.1.1.21
	external/public-domain/tz/dist/pacificnew       up to 1.1.1.2
	external/public-domain/tz/dist/southamerica     up to 1.1.1.15
	external/public-domain/tz/dist/systemv          up to 1.1.1.2
	external/public-domain/tz/dist/theory.html      up to 1.1.1.6
	external/public-domain/tz/dist/version          up to 1.1.1.11
	external/public-domain/tz/dist/yearistype.sh    up to 1.1.1.2
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.3
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.5
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.15
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.17
	external/public-domain/tz/dist/zoneinfo2tdf.pl  up to 1.1.1.2
	doc/3RDPARTY					(apply patch)

Import tzdata2018f from ftp://ftp.iana.org/tz/releases/tzdata2018f.tar.gz

  Volgograd moves from +03 to +04 on 2018-10-28.
  Fiji ends DST 2019-01-13, not 2019-01-20.
  Most of Chile changes DST dates, effective 2019-04-06.

  Plus corrections to North Korea's 2018-05-05 and China's April 1988
  updates (getting the actual time/date of the transition correct)
  Corrections for Macau pre 1992, Japan in late 1940's - early 1950's,
  and China (Shanghai) 1940's.  The Phillipines get their timezone
  name abbreviations back.

 -

Import tzdata2018g from ftp://ftp.iana.org/tz/releases/tzdata2018g.tar.gz

Summary of changes in tzdata2018g (2018-10-26 22:22:45 -0700):

    Morocco switches to permanent +01 on 2018-10-27.
@
text
@a0 2
# Make and install tzdb code and data.

d22 3
a24 3
# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
d34 3
a36 3
# for handling POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
d41 1
a41 1
# Alternatively, if you discover you've got the wrong timezone, you can just
d78 1
a78 1
# The default local timezone is taken from the file TZDEFAULT.
d87 1
a87 1
# "Compiled" timezone information is placed in the "TZDIR" directory
d109 2
a110 4
# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
a111 2
# What kind of TZif data files to generate.
# (TZif is the binary time zone data format that zic generates.)
d132 1
a132 1
# To install data in text form that has all the information of the TZif data,
d174 1
d239 1
a239 1
  -Wbad-function-cast -Wcast-align=strict -Wdate-time \
d245 1
a245 2
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
  -Wstringop-truncation -Wsuggest-attribute=cold \
a246 1
  -Wsuggest-attribute=malloc \
d296 1
a296 1
# time (rather than the timezone specified in the TZ environment variable)
d319 1
a319 1
# argument of opaque type timezone_t that specifies the timezone.
d358 1
a358 1
# How to use zic to install TZif files.
a362 3
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
#	AWK=		gawk
a410 7
# These characters are Latin-1, and so are likely to be displayable
# even in editors with limited character sets.
UNUSUAL_OK_LATIN_1 = «°±»½¾×
# This IPA symbol is represented in Unicode as the composition of
# U+0075 and U+032F, and U+032F is not considered alphabetic by some
# grep implementations that do not grok composition.
UNUSUAL_OK_IPA = u̯
d412 3
a414 2
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
a492 1
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
d497 1
a497 3
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)
a516 1
		ziguard.awk zishrink.awk \
d560 1
a560 1
# These files can be tailored by setting BACKWARD and PACKRATDATA.
d562 2
a563 2
		$(AWK) -v DATAFORM=`expr $@@ : '\(.*\).zi'` -f ziguard.awk \
		  $(TDATA) $(PACKRATDATA) >$@@.out
d565 1
a565 3
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
d567 1
a567 6
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
d605 2
a606 4
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi

# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
d609 1
a609 1
posix_only: $(INSTALL_DATA_DEPS)
d612 1
a612 1
right_only: $(INSTALL_DATA_DEPS)
d639 1
a639 1
posix_packrat: $(INSTALL_DATA_DEPS)
d650 1
a650 2
		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@@ : '\(.*\).zd') \
		  >$@@
d652 4
a655 5
TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
d659 1
a659 2
		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
a660 1
		set x $$x && \
d663 3
a665 4
		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
d668 2
a669 1
# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
d672 1
a672 1
		touch $@@
d711 1
a711 1
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
a716 1
	touch $@@
d720 1
a720 2
		! grep -En "$$pat" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a722 1
		touch $@@
a730 1
		touch $@@
a742 1
		touch $@@
a746 1
		touch $@@
a752 1
		touch $@@
d755 1
a755 6
		if test -s $(TZS); then \
		  diff -u $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@
a760 1
		touch $@@
d764 10
a773 11
check_zishrink: check_zishrink_posix check_zishrink_right
check_zishrink_posix check_zishrink_right: \
  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		mkdir $@@.dir $@@-t.dir $@@-shrunk.dir
		case $@@ in \
		  *_right) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@.dir $(DATAFORM).zi && \
		  $(ZIC) $$leap -d $@@-shrunk.dir tzdata.zi && \
d776 1
a776 1
		      $(ZIC) $$leap -d $@@-t.dir $(TDATA) && \
d778 8
a785 6
			$(ZIC) $$leap -d $@@-t.dir - $(PACKRATDATA) && \
		      diff -r $@@.dir $@@-t.dir;; \
		  esac
		diff -r $@@.dir $@@-shrunk.dir
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		touch $@@
d788 1
a788 2
		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
		  check_* core typecheck_* \
d818 1
a818 1
# Set the timestamps to those of the git repository, if available,
d825 1
a825 1
set-timestamps.out: $(EIGHT_YARDS)
d828 1
a828 1
		   files=`git ls-files $(EIGHT_YARDS)` && \
d846 1
a848 3
set-tzs-timestamp.out: $(TZS)
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch $@@
d853 6
a858 7
check_public: $(VERSION_DEPS)
		rm -fr public.dir
		mkdir public.dir
		ln $(VERSION_DEPS) public.dir
		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
d860 1
a860 1
		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
a861 1
		touch $@@
d865 6
a870 11
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		case $@@ in \
		  int32_t) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
d873 5
a877 8
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@.dir && \
		  $(MAKE) TOPDIR="$$wd/$@@.dir" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@@'" \
d879 23
a901 23
			D=$$wd/$@@.dir \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
		    $(MAKE) TOPDIR="$$wd/$@@.dir" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
			D=$$wd/$@@.dir \
		      to$$range.tzs) && \
		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
			  $@@.dir/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
					   $@@.dir/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
		      $@@.dir/usr/share; \
		}
		touch $@@
d903 1
a903 11
TRADITIONAL_ASC = \
  tzcode$(VERSION).tar.gz.asc \
  tzdata$(VERSION).tar.gz.asc
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
  tzdb-$(VERSION).tar.lz.asc

tarballs rearguard_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi
d910 1
a910 4
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
  tzdb-$(VERSION).tar.lz
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz
d913 3
a915 3
signatures_version: $(ALL_ASC)
rearguard_signatures_version: $(REARGUARD_ASC)
traditional_signatures_version: $(TRADITIONAL_ASC)
d930 1
a930 21
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
		rm -fr tzdata$(VERSION)-rearguard.dir
		mkdir tzdata$(VERSION)-rearguard.dir
		ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
		cd tzdata$(VERSION)-rearguard.dir && \
		  rm -f $(TDATA) $(PACKRATDATA) version
		for f in $(TDATA) $(PACKRATDATA); do \
		  rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
		  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
		  touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
		done
		sed '1s/$$/-rearguard/' \
		  <version >tzdata$(VERSION)-rearguard.dir/version
		touch -cmr version tzdata$(VERSION)-rearguard.dir/version
		LC_ALL=C && export LC_ALL && \
		  (cd tzdata$(VERSION)-rearguard.dir && \
		   tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
		     gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d940 2
d943 2
a944 1
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
d946 1
a946 2
$(ALL_ASC):
		gpg2 --armor --detach-sign $?
d948 8
a955 18
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: typecheck_long_long typecheck_unsigned
typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		cd $@@.dir && \
		  case $@@ in \
		    *_long_long) i="long long";; \
		    *_unsigned ) i="unsigned" ;; \
		  esac && \
		  typecheck_cflags='' && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="`pwd`" \
		    install
		$@@.dir/zdump -i -c 1970,1971 Europe/Rome
		touch $@@
d971 3
a973 1
.PHONY: check check_time_t_alternatives
d977 2
a978 4
.PHONY: posix_only posix_packrat posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
@


1.1.1.1.4.7.2.4
log
@Pull up the following, requested by kre in ticket #1670:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.23
	external/public-domain/tz/dist/NEWS             up to 1.1.1.26
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.16
	external/public-domain/tz/dist/africa           up to 1.1.1.19
	external/public-domain/tz/dist/asia             up to 1.1.1.22
	external/public-domain/tz/dist/australasia      up to 1.1.1.17
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.12
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.8
	external/public-domain/tz/dist/northamerica     up to 1.1.1.22
	external/public-domain/tz/dist/theory.html      up to 1.1.1.7
	external/public-domain/tz/dist/version          up to 1.1.1.13
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.4
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.16
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.18
	distrib/sets/lists/base/mi			(patch)
	doc/3RDPARTY					(patch)

Import tzdata2018h from ftp://ftp.iana.org/tz/releases/tzdata2018h.tar.gz

Summary of changes in tzdata2018h (2018-12-23 17:59:32 -0800):

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla, Alaska observes PST this winter only.

    Add predictions for Iran from 2038 through 2090.

    Changes to some old timestamps for Nauru (1979) Guam (1959-77),
    Hong Kong (1904, 1941, 1945, 1952) (others in Pacific during WWII)

 ---

Merge tzdata2018h

 ---

Update to tzdata2018h (new zone Asia/Qostanay)

 ---

Import tzdata2018i from ftp://ftp.iana.org/tz/releases/tzdata2018i.tar.gz

Summary of changes in tzdata2018i (2018-12-30 11:05:43 -0800):

    Due to a change in government, Sao Tome and Principe switches back
    from +01 to +00 on 2019-01-01 at 02:00.

 ---

Merge tzdata2018i

 ---

Update to tzdata2018i
@
text
@a382 3
# Name of curl <https://curl.haxx.se/>, used for HTML validation.
CURL=		curl

d384 1
a384 1
# validating HTML 4.01.  The default should work on both Debian and Red Hat.
d391 1
a391 1
# The name, arguments and environment of a program to validate HTML 4.01.
a490 1
CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
d802 3
a804 9
check_web:	$(CHECK_WEB_PAGES)
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
check_tz-art.html check_tz-link.html:
		$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		    -F file=@@$$(expr $@@ : 'check_\(.*\)') -o $@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@
check_tz-how-to.html: tz-how-to.html
d1071 1
a1071 1
.PHONY: check_web check_zishrink
@


1.1.1.1.4.8
log
@Pull up following revision(s) (requested by kre in ticket #1519):
	distrib/sets/lists/base/mi: 1.1164
	doc/3RDPARTY: 1.2326 via patch
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.4
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.3
	external/public-domain/tz/dist/Makefile: up to 1.1.1.18
	external/public-domain/tz/dist/NEWS: up to 1.1.1.19
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.9
	external/public-domain/tz/dist/Theory: delete
	external/public-domain/tz/dist/africa: up to 1.1.1.12
	external/public-domain/tz/dist/antarctica: up to 1.1.1.9
	external/public-domain/tz/dist/asia: up to 1.1.1.17
	external/public-domain/tz/dist/australasia: up to 1.1.1.12
	external/public-domain/tz/dist/backward: up to 1.1.1.8
	external/public-domain/tz/dist/backzone: up to 1.1.1.12
	external/public-domain/tz/dist/calendars: up to 1.1.1.1
	external/public-domain/tz/dist/checklinks.awk: up to 1.1.1.3
	external/public-domain/tz/dist/europe: up to 1.1.1.18
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.8
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.9
	external/public-domain/tz/dist/leapseconds.awk: up to 1.1.1.6
	external/public-domain/tz/dist/northamerica: up to 1.1.1.17
	external/public-domain/tz/dist/southamerica: up to 1.1.1.12
	external/public-domain/tz/dist/theory.html: up to 1.1.1.1
	external/public-domain/tz/dist/version: up to 1.1.1.6
	external/public-domain/tz/dist/zishrink.awk: up to 1.1.1.1
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.12
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.14
Update tzdata to 2017c.
@
text
@a51 1
# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
d78 1
a78 1
# below.  If you want only "right" time, with values interpreted
a94 18
# To install data in text form that has all the information of the binary data,
# (optionally incorporating leap second information), use
#	TZDATA_TEXT=	tzdata.zi leapseconds
# To install text data without leap second information (e.g., because
# REDO='posix_only'), use
#	TZDATA_TEXT=	tzdata.zi
# To avoid installing text data, use
#	TZDATA_TEXT=

TZDATA_TEXT=	leapseconds tzdata.zi

# For backward-compatibility links for old zone names, use
#	BACKWARD=	backward pacificnew
# To omit these links, use
#	BACKWARD=

BACKWARD=	backward pacificnew

a101 5
# The name of a locale using the UTF-8 encoding, used during self-tests.
# The tests are skipped if the name does not appear to work on this system.

UTF8_LOCALE=	en_US.utf8

d109 1
a109 2
# Add the following to the end of the "CFLAGS=" line as needed to override
# defaults specified in the source code.  "-DFOO" is equivalent to "-DFOO=1".
a110 6
#  -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime
#	formats that generate only the last two digits of year numbers
#  -DEPOCH_LOCAL if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
a111 1
#  -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
d113 3
a115 3
#  -DHAVE_GENERIC=0 if _Generic does not work
#  -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
#  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
d118 1
a118 1
#  -DHAVE_INTTYPES_H if you have a non-C99 compiler with <inttypes.h>
d122 1
d126 3
a128 4
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
#  -DHAVE_STDBOOL_H if you have a non-C99 compiler with <stdbool.h>
#  -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
#  -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
d131 2
a132 2
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
d134 10
a143 4
#  -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
#  -Dlocale_t=XXX if your system uses XXX instead of locale_t
#  -Dssize_t=long on hosts like MS-Windows that lack ssize_t
#  -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
a146 1
#	This is intended for internal use only; it mangles external names.
d152 1
a152 1
#  -DUNINIT_TRAP if reading uninitialized storage can cause problems
d160 20
a179 21
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
GCC_INSTRUMENT = \
  -fsanitize=undefined -fsanitize-address-use-after-scope \
  -fsanitize-undefined-trap-on-error -fstack-protector
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
  $(GCC_INSTRUMENT) \
  -Wall -Wextra \
  -Walloc-size-larger-than=100000 -Warray-bounds=2 \
  -Wbad-function-cast -Wcast-align -Wdate-time \
  -Wdeclaration-after-statement -Wdouble-promotion \
  -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
  -Winit-self -Wjump-misses-init -Wlogical-op \
  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
  -Wold-style-definition -Woverlength-strings -Wpointer-arith \
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=5 \
  -Wsuggest-attribute=const -Wsuggest-attribute=format \
  -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
  -Wtrampolines -Wundef -Wuninitialized -Wunused \
  -Wvariadic-macros -Wvla -Wwrite-strings \
  -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
  -Wno-type-limits -Wno-unused-parameter
a191 25
# The next batch of options control support for external variables
# exported by tzcode.  In practice these variables are less useful
# than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
# #
# # To omit or support the external variable "tzname", add one of:
# #	-DHAVE_TZNAME=0
# #	-DHAVE_TZNAME=1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX 1988 and later.
# # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
# # crashes when combined with some platforms' standard libraries,
# # presumably due to memory allocation issues.
# #
# # To omit or support the external variables "timezone" and "daylight", add
# #	-DUSG_COMPAT=0
# #	-DUSG_COMPAT=1
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by
# # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later.
# # If not defined, the code attempts to guess USG_COMPAT from other macros.
# #
# # To support the external variable "altzone", add
# #	-DALTZONE
# # to the end of the "CFLAGS=" line; although "altzone" appeared in
# # System V Release 3.1 it has not been standardized.
#
d229 5
d243 2
a244 2
# 53 as a week number (rather than 52 or 53) for January days before
# January's first Monday when a "%V" format is used and January 1
d268 1
a268 1
ZIC_INSTALL=	$(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
a291 1
# Set VALIDATE=':' if you do not have such a program.
d358 1
a358 1
TZDOBJS=	zdump.o localtime.o asctime.o strftime.o
d373 1
a373 2
COMMON=		calendars CONTRIBUTING LICENSE Makefile \
			NEWS README theory.html version
d378 1
a378 1
YDATA=		$(PRIMARY_YDATA) etcetera $(BACKWARD)
d382 1
a382 1
TABDATA=	iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
d384 3
a386 4
TZDATA_ZI_DEPS=	zishrink.awk $(TDATA) $(PACKRATDATA)
DATA=		$(YDATA) $(NDATA) backzone iso3166.tab leap-seconds.list \
			leapseconds yearistype.sh $(ZONETABLES)
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk zishrink.awk
d393 1
a393 1
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi
d399 1
a399 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README \
d408 1
a408 1
		southamerica strftime.c systemv theory.html \
d430 1
a430 1
		cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
a450 5
# This file can be tailored by setting BACKWARD, PACKRATDATA, etc.
tzdata.zi:	$(TZDATA_ZI_DEPS)
		LC_ALL=C $(AWK) -f zishrink.awk $(TDATA) $(PACKRATDATA) >$@@.out
		mv $@@.out $@@

a475 1
 BACKWARD=$(BACKWARD) \
d484 4
a487 2
install_data:	zic leapseconds yearistype tzdata.zi
		$(ZIC_INSTALL) tzdata.zi
d524 1
a524 1
$(TZS_NEW):	tzdata.zi zdump zic
d526 3
a528 3
		$(zic) -d tzs.dir tzdata.zi
		$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
		   tzdata.zi | LC_ALL=C sort >$@@.out
d531 1
a531 1
				'/^Z/{print wd "/tzs.dir/" $$2}' tzdata.zi \
d567 2
a568 3
check:		check_character_set check_white_space check_links \
		  check_name_lengths check_sorted \
		  check_tables check_web check_zishrink check_tzs
d571 1
a571 4
	test ! '$(UTF8_LOCALE)' || \
	! printf 'A\304\200B\n' | \
	  LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 || { \
		LC_ALL='$(UTF8_LOCALE)' && export LC_ALL && \
d575 1
a575 2
			CONTRIBUTING LICENSE Makefile README \
			version tzdata.zi && \
d578 1
a578 2
		! grep -Env $(OK_LINE) $(ENCHILADA); \
	}
a584 7
PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+
FILE_NAME_COMPONENT_TOO_LONG = \
  $(PRECEDES_FILE_NAME)[^[:space:]]*[^/[:space:]]{15}

check_name_lengths: $(TDATA) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' $(TDATA) backzone

a598 1
		$(AWK) -f checklinks.awk tzdata.zi
d609 2
a610 20
# This checks only the HTML 4.01 strict page.
# To check the the other pages, use <https://validator.w3.org/>.
check_web:	tz-how-to.html
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html

# Check that tzdata.zi generates the same binary data that its sources do.
check_zishrink: tzdata.zi zic leapseconds $(PACKRATDATA) $(TDATA)
		for type in posix right; do \
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-shrunk && \
		  case $$type in \
		    right) leap='-L leapseconds';; \
	            *) leap=;; \
		  esac && \
		  $(ZIC) $$leap -d time_t.dir/$$type $(TDATA) && \
		  $(AWK) '/^Rule/' $(TDATA) | \
		    $(ZIC) $$leap -d time_t.dir/$$type - $(PACKRATDATA) && \
		  $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
		  diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
		done
		rm -fr time_t.dir
d616 1
a616 1
		rm -fr *.dir tzdata.zi tzdb-*/ $(TZS_NEW)
a669 1
		touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi
d681 1
a681 1
		for i in $(TDATA) tzdata.zi; do \
d775 2
a776 2
zonenames:	tzdata.zi
		@@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
a791 1
.PHONY: check_zishrink
@


1.1.1.1.4.9
log
@Pull up the following revisions, requested by kre in tickt #1589:

	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.1
	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.5
	external/public-domain/tz/dist/Makefile         up to 1.1.1.20
	external/public-domain/tz/dist/NEWS             up to 1.1.1.21
	external/public-domain/tz/dist/README           up to 1.1.1.6
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.11
	external/public-domain/tz/dist/africa           up to 1.1.1.14
	external/public-domain/tz/dist/antarctica       up to 1.1.1.10
	external/public-domain/tz/dist/asia             up to 1.1.1.19
	external/public-domain/tz/dist/australasia      up to 1.1.1.14
	external/public-domain/tz/dist/backzone         up to 1.1.1.14
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.9
	external/public-domain/tz/dist/europe           up to 1.1.1.20
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.9
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.10
	external/public-domain/tz/dist/northamerica     up to 1.1.1.19
	external/public-domain/tz/dist/southamerica     up to 1.1.1.14
	external/public-domain/tz/dist/theory.html      up to 1.1.1.3
	external/public-domain/tz/dist/version          up to 1.1.1.8
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.3
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.14
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.16


Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv18468

Log Message:
Import tzdata2018d from ftp://ftp.iana.org/tz/releases/tzdata2018d.tar.gz

Summary of changes in tzdata2018d (2018-03-22 07:05:46 -0700):

        In 2018, Palestine starts DST on March 24 (today!), not March 31

        Casey Station in Antarctica changed from +11 to +08 on 2018-03-11
        at 04:00.

        Various adjustments to some historical conversions (several for
        Uruguay (1920 .. 1990), one fpr Enderbury and Kiritimati (1994/5),
        one for Portugal and colonies (1912) and Jamaica and Turks & Caicos
        (pre 1913)).
@
text
@a12 9
# Choose source data features.  To get new features right away, use:
#	DATAFORM=	vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
#	DATAFORM=	main
# To wait even longer for new features, use:
#	DATAFORM=	rearguard
DATAFORM=		main

d28 1
a28 1
# When a POSIX-style environment variable is handled, the rules in the
d31 1
a31 1
# daylight saving time.
d45 1
d47 1
a47 31
# Installation locations.
#
# The defaults are suitable for Debian, except that if REDO is
# posix_right or right_posix then files that Debian puts under
# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead
# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps,
# respectively.  Problems with the Debian approach are discussed in
# the commentary for the right_posix rule (below).

# Destination directory, which can be used for staging.
# 'make DESTDIR=/stage install' installs under /stage (e.g., to
# /stage/etc/localtime instead of to /etc/localtime).  Files under
# /stage are not intended to work as-is, but can be copied by hand to
# the root directory later.  If DESTDIR is empty, 'make install' does
# not stage, but installs directly into production locations.
DESTDIR =

# Everything is installed into subdirectories of TOPDIR, and used there.
# TOPDIR should be empty (meaning the root directory),
# or a directory name that does not end in "/".
# TOPDIR should be empty or an absolute name unless you're just testing.
TOPDIR =

# The default local time zone is taken from the file TZDEFAULT.
TZDEFAULT = $(TOPDIR)/etc/localtime

# The subdirectory containing installed program and data files, and
# likewise for installed files that can be shared among architectures.
# These should be relative file names.
USRDIR = usr
USRSHAREDIR = $(USRDIR)/share
d51 1
d53 1
d55 6
a60 1
TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME)
d62 1
a62 2
# The "tzselect" and (if you do "make INSTALL") "date" commands go in:
BINDIR = $(TOPDIR)/$(USRDIR)/bin
d64 1
a64 2
# The "zdump" command goes in:
ZDUMPDIR = $(BINDIR)
d66 1
a66 2
# The "zic" command goes in:
ZICDIR = $(TOPDIR)/$(USRDIR)/sbin
d69 2
a70 1
MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man
a72 2
LIBDIR = $(TOPDIR)/$(USRDIR)/lib

d74 1
a74 2
# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t
a107 3
#	BACKWARD=	backward
# If you also want the link US/Pacific-New, even though it is confusing
# and is planned to be removed from the database eventually, use
d112 1
a112 1
BACKWARD=	backward
a161 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
a167 2
#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
#	with external linkage, e.g., applications cannot define 'localtime'.
a168 2
#  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
#	security implications and is not recommended for general use
d316 1
a316 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
d344 2
a345 2
  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
a366 5
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary.  XEmacs 21.5.34 displays them correctly,
# presumably because they are Latin-1.
UNUSUAL_OK_CHARSET= °±½¾×

d368 6
a373 7
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# multibyte letters are also allowed so that commentary can contain a
# few safe symbols and people's names and can quote non-English sources.
# Other non-letters are limited to ASCII renderings for the
# convenience of maintainers using XEmacs 21.5.34, which by default
# mishandles Unicode characters U+0100 and greater.
OK_CHAR=	'[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
d399 1
a399 1
CC=		$(cc) -DTZDIR='"$(TZDIR)"'
d424 1
a424 1
WEB_PAGES=	tz-art.html tz-how-to.html tz-link.html
d428 1
a428 1
YDATA=		$(PRIMARY_YDATA) etcetera
d430 1
a430 2
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward pacificnew
TDATA=		$(YDATA) $(NDATA) $(BACKWARD)
d434 2
a435 3
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
DATA=		$(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
d437 1
a437 2
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk \
			ziguard.awk zishrink.awk
d460 1
a460 1
		time2posix.3 tz-art.html tz-how-to.html tz-link.html \
d471 1
a471 2
all:		tzselect yearistype zic zdump libtz.a $(TABDATA) \
		  vanguard.zi main.zi rearguard.zi
d476 12
a487 16
		mkdir -p '$(DESTDIR)$(BINDIR)' \
			'$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \
			'$(DESTDIR)$(LIBDIR)' \
			'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
			'$(DESTDIR)$(MANDIR)/man8'
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \
			-t '$(DESTDIR)$(TZDEFAULT)'
		cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
		cp tzselect '$(DESTDIR)$(BINDIR)/.'
		cp zdump '$(DESTDIR)$(ZDUMPDIR)/.'
		cp zic '$(DESTDIR)$(ZICDIR)/.'
		cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
		$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
		cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
		cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
		cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
d490 3
a492 3
		mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
		cp date '$(DESTDIR)$(BINDIR)/.'
		cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
d498 1
a498 1
		  V='$(VERSION)'; } && \
d502 3
a504 9
# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
		$(AWK) -v outfile='$@@' -f ziguard.awk $(TDATA) $(PACKRATDATA) \
		  >$@@.out
		mv $@@.out $@@
tzdata.zi:	$(DATAFORM).zi version
		version=`sed 1q version` && \
		  LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
		    $(DATAFORM).zi >$@@.out
d532 2
a533 2
 BACKWARD='$(BACKWARD)' \
 DESTDIR='$(DESTDIR)' \
d536 2
a537 3
 TZDEFAULT='$(TZDEFAULT)' \
 TZDIR='$(TZDIR)' \
 YEARISTYPE='$(YEARISTYPE)' \
d561 4
a564 4
		rm -fr '$(DESTDIR)$(TZDIR)-leaps'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
d567 4
a570 4
		rm -fr '$(DESTDIR)$(TZDIR)-posix'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
a578 8
# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
		./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@@ : '\(.*\).zd') >$@@

d580 1
a580 2
		rm -fr tzs.dir
		mkdir tzs.dir
d585 7
a591 8
		set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
			| LC_ALL=C sort -t . -k 2,2` && \
		shift && \
		ZDS=$$* && \
		$(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs.dir
		mv $@@.out $@@
d634 1
a634 1
			CONTRIBUTING LICENSE README \
d636 1
a636 3
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
			Makefile && \
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
d644 1
a644 2
		! grep -n '[[:space:]]$$' \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
d650 2
a651 3
check_name_lengths: $(TDATA_TO_CHECK) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
			$(TDATA_TO_CHECK) backzone
d665 2
a666 2
check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
		$(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
d683 2
a684 4
# Check that zishrink.awk does not alter the data, and that ziguard.awk
# preserves main-format data.
check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
		  $(DATAFORM).zi tzdata.zi
d686 1
a686 2
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
		    time_t.dir/$$type-shrunk && \
d691 3
a693 9
		  $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
		  case $(DATAFORM) in \
		    main) \
		      $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
		      $(AWK) '/^Rule/' $(TDATA) | \
			$(ZIC) $$leap -d time_t.dir/$$type-t - \
			  $(PACKRATDATA) && \
		      diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
		  esac && \
d703 1
a703 1
		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
d767 1
a767 1
		$(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
d769 1
a769 1
		for i in $(TDATA_TO_CHECK) tzdata.zi; do \
d772 1
a772 1
		$(zic) -v -d public.dir $(TDATA_TO_CHECK)
d793 2
a794 5
		    time_t.dir/int64_t/etc \
		    time_t.dir/$$type/etc && \
		  diff $$quiet_option -r \
		    time_t.dir/int64_t/usr/share \
		    time_t.dir/$$type/usr/share && \
d803 1
a803 1
		  time_t.dir/int64_t/usr/bin/zdump -V -t $$range $$zones \
d805 1
a805 1
		  time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \
a815 3
# These *_version rules are intended for use if VERSION is set by some
# other means.  Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
d877 1
a877 1
.PHONY: check check_character_set check_links check_name_lengths
d881 1
a881 1
.PHONY: clean clean_misc dummy.zd force_tzs
d885 1
a885 4
.PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: typecheck
a886 1
.PHONY: $(ZDS)
@


1.1.1.1.4.10
log
@Catch up to current for the following, requested by kre in ticket #1634:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.21
	external/public-domain/tz/dist/NEWS             up to 1.1.1.22
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.12
	external/public-domain/tz/dist/africa           up to 1.1.1.15
	external/public-domain/tz/dist/asia             up to 1.1.1.20
	external/public-domain/tz/dist/australasia      up to 1.1.1.15
	external/public-domain/tz/dist/europe           up to 1.1.1.21
	external/public-domain/tz/dist/theory.html      up to 1.1.1.4
	external/public-domain/tz/dist/version          up to 1.1.1.9
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.2
	doc/3RDPARTY					1.1520 (patch)

Import tzdata2018e from ftp://ftp.iana.org/tz/releases/tzdata2018e.tar.gz

Summary of changes in tzdata2018e (2018-05-01 23:42:51 -0700):

News for the tz database

Release 2018e - 2018-05-01 23:42:51 -0700

    North Korea switches back to +09 on 2018-05-05 (tomorrow!)
@
text
@d24 1
a24 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d41 1
a41 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d239 1
a239 1
  -Wbad-function-cast -Wcast-align=strict -Wdate-time \
d245 1
a245 2
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
  -Wstringop-truncation -Wsuggest-attribute=cold \
a246 1
  -Wsuggest-attribute=malloc \
a516 1
		ziguard.awk zishrink.awk \
d562 2
a563 2
		$(AWK) -v DATAFORM=`expr $@@ : '\(.*\).zi'` -f ziguard.awk \
		  $(TDATA) $(PACKRATDATA) >$@@.out
a902 7
TRADITIONAL_ASC = \
  tzcode$(VERSION).tar.gz.asc \
  tzdata$(VERSION).tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) \
  tzdata$(VERSION)-rearguard.tar.gz.asc \
  tzdb-$(VERSION).tar.lz.asc

d910 1
a910 3
tarballs_version: traditional_tarballs_version \
  tzdata$(VERSION)-rearguard.tar.gz \
  tzdb-$(VERSION).tar.lz
d913 3
a915 2
signatures_version: $(ALL_ASC)
traditional_signatures_version: $(TRADITIONAL_ASC)
a929 20
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
		rm -fr tzdata$(VERSION)-rearguard.dir
		mkdir tzdata$(VERSION)-rearguard.dir
		ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
		cd tzdata$(VERSION)-rearguard.dir && \
		  rm -f $(TDATA) $(PACKRATDATA) version
		for f in $(TDATA) $(PACKRATDATA); do \
		  rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
		  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
		  touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
		done
		sed '1s/$$/-rearguard/' \
		  <version >tzdata$(VERSION)-rearguard.dir/version
		touch -cmr version tzdata$(VERSION)-rearguard.dir/version
		LC_ALL=C && export LC_ALL && \
		  (cd tzdata$(VERSION)-rearguard.dir && \
		   tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
		     gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

d940 2
d943 2
a944 1
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
a945 1
$(ALL_ASC):
@


1.1.1.1.4.11
log
@Sync external/public-domain/tz/dist to current, requested by kre
in ticket #1644:

	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.6
	external/public-domain/tz/dist/Makefile         up to 1.1.1.22
	external/public-domain/tz/dist/NEWS             up to 1.1.1.24
	external/public-domain/tz/dist/README           up to 1.1.1.7
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.14
	external/public-domain/tz/dist/africa           up to 1.1.1.17
	external/public-domain/tz/dist/antarctica       up to 1.1.1.11
	external/public-domain/tz/dist/asia             up to 1.1.1.21
	external/public-domain/tz/dist/australasia      up to 1.1.1.16
	external/public-domain/tz/dist/backward         up to 1.1.1.9
	external/public-domain/tz/dist/backzone         up to 1.1.1.15
	external/public-domain/tz/dist/etcetera         up to 1.1.1.3
	external/public-domain/tz/dist/europe           up to 1.1.1.23
	external/public-domain/tz/dist/factory          up to 1.1.1.3
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.10
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.11
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.7
	external/public-domain/tz/dist/northamerica     up to 1.1.1.21
	external/public-domain/tz/dist/pacificnew       up to 1.1.1.2
	external/public-domain/tz/dist/southamerica     up to 1.1.1.15
	external/public-domain/tz/dist/systemv          up to 1.1.1.2
	external/public-domain/tz/dist/theory.html      up to 1.1.1.6
	external/public-domain/tz/dist/version          up to 1.1.1.11
	external/public-domain/tz/dist/yearistype.sh    up to 1.1.1.2
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.3
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.5
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.15
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.17
	external/public-domain/tz/dist/zoneinfo2tdf.pl  up to 1.1.1.2
	doc/3RDPARTY					(apply patch)

Import tzdata2018f from ftp://ftp.iana.org/tz/releases/tzdata2018f.tar.gz

  Volgograd moves from +03 to +04 on 2018-10-28.
  Fiji ends DST 2019-01-13, not 2019-01-20.
  Most of Chile changes DST dates, effective 2019-04-06.

  Plus corrections to North Korea's 2018-05-05 and China's April 1988
  updates (getting the actual time/date of the transition correct)
  Corrections for Macau pre 1992, Japan in late 1940's - early 1950's,
  and China (Shanghai) 1940's.  The Phillipines get their timezone
  name abbreviations back.

 -

Import tzdata2018g from ftp://ftp.iana.org/tz/releases/tzdata2018g.tar.gz

Summary of changes in tzdata2018g (2018-10-26 22:22:45 -0700):

    Morocco switches to permanent +01 on 2018-10-27.
@
text
@a0 2
# Make and install tzdb code and data.

d22 3
a24 3
# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
d34 3
a36 3
# for handling POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
d41 1
a41 1
# Alternatively, if you discover you've got the wrong timezone, you can just
d78 1
a78 1
# The default local timezone is taken from the file TZDEFAULT.
d87 1
a87 1
# "Compiled" timezone information is placed in the "TZDIR" directory
d109 2
a110 4
# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
a111 2
# What kind of TZif data files to generate.
# (TZif is the binary time zone data format that zic generates.)
d132 1
a132 1
# To install data in text form that has all the information of the TZif data,
d174 1
d298 1
a298 1
# time (rather than the timezone specified in the TZ environment variable)
d321 1
a321 1
# argument of opaque type timezone_t that specifies the timezone.
d360 1
a360 1
# How to use zic to install TZif files.
a364 3
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
#	AWK=		gawk
a412 7
# These characters are Latin-1, and so are likely to be displayable
# even in editors with limited character sets.
UNUSUAL_OK_LATIN_1 = «°±»½¾×
# This IPA symbol is represented in Unicode as the composition of
# U+0075 and U+032F, and U+032F is not considered alphabetic by some
# grep implementations that do not grok composition.
UNUSUAL_OK_IPA = u̯
d414 3
a416 2
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
a494 1
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
d499 1
a499 3
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)
d563 1
a563 1
# These files can be tailored by setting BACKWARD and PACKRATDATA.
d568 1
a568 3
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
d570 1
a570 6
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
d608 2
a609 4
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi

# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
d612 1
a612 1
posix_only: $(INSTALL_DATA_DEPS)
d615 1
a615 1
right_only: $(INSTALL_DATA_DEPS)
d642 1
a642 1
posix_packrat: $(INSTALL_DATA_DEPS)
d653 1
a653 2
		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@@ : '\(.*\).zd') \
		  >$@@
d655 4
a658 5
TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
d662 1
a662 2
		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
a663 1
		set x $$x && \
d666 3
a668 4
		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
d671 2
a672 1
# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
d675 1
a675 1
		touch $@@
d714 1
a714 1
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
a719 1
	touch $@@
d723 1
a723 2
		! grep -En "$$pat" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a725 1
		touch $@@
a733 1
		touch $@@
a745 1
		touch $@@
a749 1
		touch $@@
a755 1
		touch $@@
d758 1
a758 6
		if test -s $(TZS); then \
		  diff -u $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@
a763 1
		touch $@@
d767 10
a776 11
check_zishrink: check_zishrink_posix check_zishrink_right
check_zishrink_posix check_zishrink_right: \
  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		mkdir $@@.dir $@@-t.dir $@@-shrunk.dir
		case $@@ in \
		  *_right) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@.dir $(DATAFORM).zi && \
		  $(ZIC) $$leap -d $@@-shrunk.dir tzdata.zi && \
d779 1
a779 1
		      $(ZIC) $$leap -d $@@-t.dir $(TDATA) && \
d781 8
a788 6
			$(ZIC) $$leap -d $@@-t.dir - $(PACKRATDATA) && \
		      diff -r $@@.dir $@@-t.dir;; \
		  esac
		diff -r $@@.dir $@@-shrunk.dir
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		touch $@@
d791 1
a791 2
		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
		  check_* core typecheck_* \
d821 1
a821 1
# Set the timestamps to those of the git repository, if available,
d828 1
a828 1
set-timestamps.out: $(EIGHT_YARDS)
d831 1
a831 1
		   files=`git ls-files $(EIGHT_YARDS)` && \
d849 1
a851 3
set-tzs-timestamp.out: $(TZS)
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch $@@
d856 6
a861 7
check_public: $(VERSION_DEPS)
		rm -fr public.dir
		mkdir public.dir
		ln $(VERSION_DEPS) public.dir
		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
d863 1
a863 1
		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
a864 1
		touch $@@
d868 6
a873 11
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		case $@@ in \
		  int32_t) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
d876 5
a880 8
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@.dir && \
		  $(MAKE) TOPDIR="$$wd/$@@.dir" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@@'" \
d882 23
a904 23
			D=$$wd/$@@.dir \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
		    $(MAKE) TOPDIR="$$wd/$@@.dir" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
			D=$$wd/$@@.dir \
		      to$$range.tzs) && \
		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
			  $@@.dir/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
					   $@@.dir/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
		      $@@.dir/usr/share; \
		}
		touch $@@
d909 2
a910 3
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
d913 1
a913 3
tarballs rearguard_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi
d920 2
a921 1
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
a922 2
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz
a925 1
rearguard_signatures_version: $(REARGUARD_ASC)
d961 1
a961 1
tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d975 1
a975 1
		gpg2 --armor --detach-sign $?
d977 8
a984 18
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: typecheck_long_long typecheck_unsigned
typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		cd $@@.dir && \
		  case $@@ in \
		    *_long_long) i="long long";; \
		    *_unsigned ) i="unsigned" ;; \
		  esac && \
		  typecheck_cflags='' && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="`pwd`" \
		    install
		$@@.dir/zdump -i -c 1970,1971 Europe/Rome
		touch $@@
d1000 3
a1002 1
.PHONY: check check_time_t_alternatives
d1006 2
a1007 4
.PHONY: posix_only posix_packrat posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
@


1.1.1.1.4.12
log
@Pull up the following, requested by kre in ticket #1670:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.23
	external/public-domain/tz/dist/NEWS             up to 1.1.1.26
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.16
	external/public-domain/tz/dist/africa           up to 1.1.1.19
	external/public-domain/tz/dist/asia             up to 1.1.1.22
	external/public-domain/tz/dist/australasia      up to 1.1.1.17
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.12
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.8
	external/public-domain/tz/dist/northamerica     up to 1.1.1.22
	external/public-domain/tz/dist/theory.html      up to 1.1.1.7
	external/public-domain/tz/dist/version          up to 1.1.1.13
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.4
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.16
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.18
	distrib/sets/lists/base/mi			(patch)
	doc/3RDPARTY					(patch)

Import tzdata2018h from ftp://ftp.iana.org/tz/releases/tzdata2018h.tar.gz

Summary of changes in tzdata2018h (2018-12-23 17:59:32 -0800):

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla, Alaska observes PST this winter only.

    Add predictions for Iran from 2038 through 2090.

    Changes to some old timestamps for Nauru (1979) Guam (1959-77),
    Hong Kong (1904, 1941, 1945, 1952) (others in Pacific during WWII)

 ---

Merge tzdata2018h

 ---

Update to tzdata2018h (new zone Asia/Qostanay)

 ---

Import tzdata2018i from ftp://ftp.iana.org/tz/releases/tzdata2018i.tar.gz

Summary of changes in tzdata2018i (2018-12-30 11:05:43 -0800):

    Due to a change in government, Sao Tome and Principe switches back
    from +01 to +00 on 2019-01-01 at 02:00.

 ---

Merge tzdata2018i

 ---

Update to tzdata2018i
@
text
@a382 3
# Name of curl <https://curl.haxx.se/>, used for HTML validation.
CURL=		curl

d384 1
a384 1
# validating HTML 4.01.  The default should work on both Debian and Red Hat.
d391 1
a391 1
# The name, arguments and environment of a program to validate HTML 4.01.
a490 1
CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
d802 3
a804 9
check_web:	$(CHECK_WEB_PAGES)
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
check_tz-art.html check_tz-link.html:
		$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		    -F file=@@$$(expr $@@ : 'check_\(.*\)') -o $@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@
check_tz-how-to.html: tz-how-to.html
d1071 1
a1071 1
.PHONY: check_web check_zishrink
@


1.1.1.2
log
@Import tzdata2014g from ftp://ftp.iana.org/tz/releases/tzdata2014g.tar.gz

Summary of changes in tzdata2014g (2014-08-28 12:31:23 -0700):
  * Turks & Caicos is switching from US eastern time to UTC-4 year-round,
    modeled as a switch from EST/EDT to AST on 2014-11-02 at 02:00.
  * Time in Russia or the USSR before 1926 or so has been corrected by
    a few seconds for several zones, and a few minutes for
    Asia/Yekaterinburg.
  * The Portuguese decree of 1911-05-26 took effect on 1912-01-01, not
    on the date of the decree.  This affects 1911 time stamps in
    Africa/Bissau, Africa/Luanda, Atlantic/Azores, and Atlantic/Madeira.
  * Lisbon's pre-1912 GMT offset was -0:36:45 (rounded from -0:36:44.68),
    not -0:36:32.
  * Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59.
  * A new file 'backzone' contains data which may appeal to
    connoisseurs of old time stamps, although it is out of scope for
    the tz database, is often poorly sourced, and contains some data
    that is known to be incorrect.
  * Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
  * Changes affecting documentation and commentary.
@
text
@d8 1
a8 1
VERSION=	2014g
d87 1
a87 3
# below.  If you want just POSIX-compatible time values, but with
# out-of-scope and often-wrong data from the file 'backzone', use
#	REDO=		posix_packrat
d89 1
a89 1
# use "posix_only", "posix_right", or "posix_packrat".
a109 4
#  -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function
#  -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz
#	This defaults to 1 if a working localtime_rz seems to be available.
#	localtime_rz can make zdump significantly faster, but is nonstandard.
a114 2
#  -DHAVE_STRFTIME_L=1 if <time.h> declares locale_t and strftime_l
#	This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise.
a117 1
#  -DHAVE_TZSET=0 if your system lacks a tzset function
d120 1
a123 3
#  -DTHREAD_SAFE=1 to make localtime.c thread-safe, as POSIX requires;
#	not needed by the main-program tz code, which is single-threaded.
#	Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
a129 4
#  -DUNINIT_TRAP=1 if reading uninitialized storage can cause problems
#	other than simply getting garbage data
#  -DUSE_LTZ=0 to build zdump with the system time zone library
#	Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
d159 11
a169 3
# to the end of the "CFLAGS=" line.  If not defined, the code attempts to
# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this.
# Similarly, if your system has a "zone abbreviation" field, define
d171 7
a177 2
# and define NO_TM_ZONE to suppress any guessing.  These two fields are not
# required by POSIX, but are widely available on GNU/Linux and BSD systems.
a200 11
# If you don't want functions that were inspired by NetBSD, add
#	-DNETBSD_INSPIRED=0
# to the end of the "CFLAGS=" line.  Otherwise, the functions
# "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the
# time library, and if STD_INSPIRED is also defined the functions
# "posix2time_z" and "time2posix_z" are added as well.
# The functions ending in "_z" (or "_rz") are like their unsuffixed
# (or suffixed-by-"_r") counterparts, except with an extra first
# argument of opaque type timezone_t that specifies the time zone.
# "tzalloc" allocates a timezone_t value, and "tzfree" frees it.
#
d210 5
a269 4
# This expensive test requires USE_LTZ.
# To suppress it, define this macro to be empty.
CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives

d321 1
a321 1
TZDOBJS=	zdump.o localtime.o asctime.o
d328 1
a328 2
SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \
			tzselect.ksh workman.sh
d335 1
a335 1
COMMON=		CONTRIBUTING Makefile NEWS README Theory
d337 1
a337 1
DOCS=		$(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
d346 2
a347 2
DATA=		$(YDATA) $(NDATA) backzone $(TABDATA) \
			leap-seconds.list yearistype.sh
d349 1
a349 1
MISC=		$(AWK_SCRIPTS) zoneinfo2tdf.pl
a431 5
posix_packrat:	posix_only backzone
		$(AWK) '/^Rule/' $(TDATA) | \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L /dev/null - backzone

d452 1
a452 1
check:		check_character_set check_white_space check_tables check_web
d459 2
a460 2
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA) backzone \
			iso3166.tab leapseconds yearistype.sh zone.tab && \
d462 2
a463 2
		! grep -Env $(NONSYM_LINE) CONTRIBUTING NEWS README Theory \
			$(MANS) date.1 zone1970.tab && \
a465 5
check_white_space: $(ENCHILADA)
		! grep -n ' '$(TAB_CHAR) $(ENCHILADA)
		! grep -n '[[:space:]]$$' $(ENCHILADA)
		! grep -n "$$(printf '[\f\r\v]\n')" $(ENCHILADA)

d489 1
a489 1
public:		check check_public $(CHECK_TIME_T_ALTERNATIVES) \
a548 5
		if diff -q Makefile Makefile 2>/dev/null; then \
		  quiet_option='-q'; \
		else \
		  quiet_option=''; \
		fi && \
a554 1
		    REDO='$(REDO)' \
d556 1
a556 3
		  diff $$quiet_option -r \
		    tzpublic/int64_t/etc/zoneinfo \
		    tzpublic/$$type/etc/zoneinfo && \
d579 1
a579 1
		    $(COMMON) $(DOCS) $(SOURCES) | \
d584 1
a584 1
		tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
d613 1
a613 1
strftime.o:	private.h tzfile.h
d621 2
a622 2
.PHONY: check_time_t_alternatives check_web check_white_space clean clean_misc
.PHONY: install maintainer-clean names posix_packrat posix_only posix_right
@


1.1.1.3
log
@Import tzdata2014h from ftp://ftp.iana.org/tz/releases/tzdata2014h.tar.gz

Summary of changes in tzdata2014h (2014-09-25 18:59:03 -0700):
  * America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28.
  * Shanks says Asia/Novokuznetsk switched from LMT (not "NMT") on 1924-05-01,
    not 1920-01-06.
  * Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Blantyre, Africa/Bujumbura,
    Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi,
    Africa/Lusaka, Africa/Maseru, and Africa/Mbabane.
  * Changes affecting documentation and commentary.
@
text
@d8 1
a8 1
VERSION=	2014h
d470 1
a470 2
check:		check_character_set check_white_space check_sorted \
		  check_tables check_web
a488 12
CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }

check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
		$(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
		$(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
		$(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu
		$(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c
		$(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \
		  LC_ALL=C sort -c
		$(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
		  LC_ALL=C sort -cu

d651 1
a651 1
.PHONY: check check_character_set check_public check_sorted check_tables
@


1.1.1.4
log
@Import tzdata2014i from ftp://ftp.iana.org/tz/releases/tzdata2014i.tar.gz

Summary of changes in tzdata2014i (2014-10-21 22:04:57 -0700):
  * Pacific/Fiji will observe DST from 2014-11-02 02:00 to 2015-01-18 03:00.
    Guess that future years will use a similar pattern.
  * A new Zone Pacific/Bougainville, for the part of Papua New Guinea
    that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00.
  * Since Belarus is not changing its clocks even though Moscow is,
    the time zone abbreviation in Europe/Minsk is changing from FET
    to its more-traditional value MSK on 2014-10-26 at 01:00.
  * The new abbreviation IDT stands for the pre-1976 use of UT+8 in
    Indochina, to distinguish it better from ICT (UT+7).
  * Many time stamps have been corrected for Asia/Ho_Chi_Minh before 1976.
    Asia/Ho_Chi_Minh has been added to zone1970.tab, since
    north and south Vietnam disagreed after our 1970 cutoff.
  * Asia/Phnom_Penh and Asia/Vientiane have been turned into links, as
    they differed from existing zones only for pre-1970 time stamps.
  * Changes affecting commentary.
@
text
@d8 1
a8 1
VERSION=	2014i
a131 1
#  -Dssize_t=long on ancient hosts that lack ssize_t
@


1.1.1.5
log
@Import tzdata2014j from ftp://ftp.iana.org/tz/releases/tzdata2014j.tar.gz

Summary of changes in tzdata2014j (2014-11-10 17:37:11 -0800):
  * Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.
  * Many pre-1989 time stamps have been corrected for Asia/Seoul and
    Asia/Pyongyang, based on sources for the Korean-language Wikipedia
    entry for time in Korea.
  * Some more zones have been turned into links, when they differed
    from existing zones only for older (pre-1970) time stamps.
  * Changes affecting commentary.

Summary of changes in tzdata2014i (2014-10-21 22:04:57 -0700):
  * Pacific/Fiji will observe DST from 2014-11-02 02:00 to 2015-01-18 03:00.
  * A new Zone Pacific/Bougainville, for the part of Papua New Guinea
    that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00.
  * Since Belarus is not changing its clocks even though Moscow is,
    the time zone abbreviation in Europe/Minsk is changing from FET
    to its more-traditional value MSK on 2014-10-26 at 01:00.
  * The new abbreviation IDT stands for the pre-1976 use of UT+8 in
    Indochina, to distinguish it better from ICT (UT+7).
  * Many time stamps have been corrected for Asia/Ho_Chi_Minh before 1976.
    Asia/Ho_Chi_Minh has been added to zone1970.tab, to give tzselect
    users in Vietnam two choices, since north and south Vietnam
    disagreed after our 1970 cutoff.
  * Asia/Phnom_Penh and Asia/Vientiane have been turned into links, as
    they differed from existing zones only for older (pre-1970) time stamps.
  * Changes affecting commentary.
@
text
@d8 1
a8 1
VERSION=	2014j
@


1.1.1.6
log
@Import tzdata2015a from ftp://ftp.iana.org/tz/releases/tzdata2015a.tar.gz

Summary of changes in tzdata2015a (2015-01-29 22:35:20 -0800):
  * The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.
  * Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)
  * New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
  * Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct.
  * Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.
  * Changes affecting commentary.
@
text
@d8 1
a8 1
VERSION=	2015a
d362 1
a362 1
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk
d471 1
a471 1
check:		check_character_set check_white_space check_links check_sorted \
d487 3
a489 3
		! grep -En ' '$(TAB_CHAR)"|$$(printf '[\f\r\v]')" $(ENCHILADA)
		! grep -n '[[:space:]]$$' \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a502 3
check_links:	checklinks.awk $(TDATA)
		$(AWK) -f checklinks.awk $(TDATA)

d665 1
a665 2
.PHONY: check check_character_set check_links
.PHONY: check_public check_sorted check_tables
@


1.1.1.7
log
@Import tzdata2015b from ftp://ftp.iana.org/tz/releases/tzdata2015b.tar.gz

Summary of changes in tzdata2015b (2015-03-19 23:28:11 -0700):
  * Mongolia will start observing DST again in 2015, from the last
    Saturday in March at 02:00 to the last Saturday in September at 00:00.
  * Palestine will start DST on March 28, not March 27, in 2015.
  * The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
    regression.
  * Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.
  * Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
  * Changes affecting commentary.
@
text
@d8 1
a8 1
VERSION=	2015b
d488 2
a489 1
		! grep -n '[[:space:]]$$' $(ENCHILADA)
@


1.1.1.8
log
@Import tzdata2015e from http://www.iana.org/time-zones/repository/releases/tzdata2015e.tar.gz

Summary of changes in tzdata2015e (2015-06-13 10:56:02 -0700):
  * Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00,
    not 06-13 and 07-18 as we had guessed.
  * Assume Cayman Islands will observe DST starting next year, using US rules.
  * The file 'iso3166.tab' now uses UTF-8, so that its entries can better
    spell the names of Åland Islands, Côte d'Ivoire, and Réunion.

Summary of changes in tzdata2015d (2015-04-24 08:09:46 -0700):
  * Egypt will not observe DST in 2015 and will consider canceling it
    permanently.  For now, assume no DST indefinitely.
  * America/Whitehorse switched from UTC-9 to UTC-8 on 1967-05-28, not
    1966-07-01.
  * The abbreviations for Hawaii-Aleutian standard and daylight times
    have been changed from HAST/HADT to HST/HDT, as per US Government
    Printing Office style.

Summary of changes in tzdata2015c (2015-04-11 08:55:55 -0700):
  * Egypt's spring-forward transition is at 24:00 on April's last Thursday,
    not 00:00 on April's last Friday.  This affects 2015, 2026, 2037,
    2043, etc.
  * Changes to pre-1991 Chile-related time stamps in America/Santiago,
    Antarctica/Palmer, and Pacific/Easter.
  * The America/Montreal zone has been turned into a link, as it differed
    from an existing zone only for pre-1970 time stamps.
@
text
@d8 1
a8 1
VERSION=	2015e
a122 1
#  -DHAVE_STRDUP=0 if your system lacks the strdup function
d152 1
a152 1
	-Wbad-function-cast -Wcast-align -Wdate-time \
a153 1
	-Wdouble-promotion \
d155 5
a159 2
	-Wlogical-op -Wmissing-prototypes -Wnested-externs \
	-Wold-style-definition -Woverlength-strings -Wpointer-arith \
d163 1
a163 3
	-Wunused -Wwrite-strings \
	-Wno-address -Wno-format-nonliteral -Wno-sign-compare \
	-Wno-type-limits -Wno-unused-parameter
d294 4
a297 7
SAFE_CHARSET=	$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
SAFE_CHAR=	'[]'$(SAFE_CHARSET)'-]'

# OK_CHAR matches any character allowed in the distributed files.
# This is the same as SAFE_CHAR, except that multibyte letters are
# also allowed so that commentary can contain people's names and quote
# non-English sources.  For non-letters the sources are limited to
d300 1
a300 1
OK_CHAR=	'[][:alpha:]'$(SAFE_CHARSET)'-]'
d303 1
a303 1
# SAFE_SHARP_LINE is similar, except any OK character can follow '#';
d305 2
a306 1
# OK_LINE matches a line of OK characters.
d308 3
a310 2
SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$'
OK_LINE=	'^'$(OK_CHAR)'*$$'
a324 2
#MAKE=		make

d333 1
a333 1
TZCOBJS=	zic.o
d339 1
a339 1
NONLIBSRCS=	zic.c zdump.c
d373 1
a373 1
ALL:		all date $(ENCHILADA)
d477 1
a477 1
		! grep -Env $(SAFE_LINE) Makefile $(MANS) date.1 $(MANTXTS) \
d480 5
a484 2
			leapseconds yearistype.sh zone.tab && \
		! grep -Env $(OK_LINE) $(ENCHILADA)
d575 3
a577 3
check_public:
		$(MAKE) maintainer-clean
		$(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL
d596 2
a597 2
		  $(MAKE) clean_misc && \
		  $(MAKE) TOPDIR=`pwd`/tzpublic/$$type \
d643 1
a643 1
		$(MAKE) clean
d646 1
a646 1
			$(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
d648 1
a648 1
			$(MAKE) clean ; \
d657 1
d659 1
@


1.1.1.9
log
@Import tzdata2015f from ftp://ftp.iana.org/tz/releases/tzdata2015f.tar.gz

Summary of changes in tzdata2015f (2015-08-10 18:06:56 -0700):
  * North Korea switches to +0830 on 2015-08-15.
  * Uruguay no longer observes DST.
  * Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC.
  * The two characters '%z' in a zone format now stand for the UTC
    offset, e.g., '-07' for seven hours behind UTC and '+0530' for
    five hours and thirty minutes ahead.
  * Comments for America/Halifax and America/Glace_Bay have been improved.
  * Data entries have been simplified for Atlantic/Canary, Europe/Simferopol,
    Europe/Sofia, and Europe/Tallinn.
  * Changes affecting documentation.
@
text
@d8 1
a8 1
VERSION=	2015f
d105 1
d116 4
d129 1
d150 1
a150 1
#  $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking
@


1.1.1.10
log
@Import tzdata2016b from ftp://ftp.iana.org/tz/releases/tzdata2016b.tar.gz

Summary of changes in tzdata2016b (2016-03-12 17:30:14 -0800):
  * New zones Europe/Astrakhan and Europe/Ulyanovsk for Astrakhan and
    Ulyanovsk Oblasts, Russia, both of which will switch from +03 to +04 on
    2016-03-27 at 02:00 local time.
  * As a trial of a new system that needs less information to be made up,
    the new zones use numeric time zone abbreviations like "+04"
    instead of invented abbreviations like "ASTT".
  * Haiti will not observe DST in 2016.
  * Palestine's spring-forward transition on 2016-03-26 is at 01:00, not 00:00.
  * Europe/Chisinau observed DST during 1990, and switched from +04 to
    +03 at 1990-05-06 02:00, instead of switching from +03 to +02.
  * 1991 abbreviations in Europe/Samara should be SAMT/SAMST, not
    KUYT/KUYST.
  * tzselect's diagnostics and checking, and checktab.awk's checking,
    have been improved.
  * tzcode now builds under MinGW.
  * tzselect now tests Julian-date TZ settings more accurately.
  * Comments in zone tables have been improved.
  * tzselect again limits its menu comments so that menus fit on a
    24x80 alphanumeric display.
  * A new web page tz-how-to.html.
  * In the Theory file, the description of possible time zone abbreviations in
    tzdata has been cleaned up, as the old description was unclear and
    inconsistent.

Summary of changes in tzdata2016a (2016-01-26 23:28:02 -0800):
  * America/Cayman will not observe daylight saving this year after all.
  * Asia/Chita switches from +0800 to +0900 on 2016-03-27 at 02:00.
  * Asia/Tehran now has DST predictions for the year 2038 and later,
    to be March 21 00:00 to September 21 00:00.
  * America/Metlakatla switched from PST all year to AKST/AKDT on
    2015-11-01 at 02:00.
  * America/Santa_Isabel has been removed, and replaced with a
    backward compatibility link to America/Tijuana.
  * Asia/Karachi's two transition times in 2002 were off by a minute.
  * Changes affecting documentation and commentary.

Summary of changes in tzdata2015g (2015-10-01 00:39:51 -0700):
  * Turkey's 2015 fall-back transition is scheduled for Nov.
  * Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.
  * Fiji's 2016 fall-back transition is scheduled for January 17, not 24.
  * Fort Nelson, British Columbia will not fall back on 2015-11-01.
  * Norfolk observed DST from 1974-10-27 02:00 to 1975-03-02 02:00.
  * Changes affecting documentation.
@
text
@d8 1
a8 1
VERSION=	2016b
d87 5
a91 2
# below.  POSIX mandates that leap seconds not be counted; for compatibility
# with it, use "posix_only" or "posix_right".
a94 7
# If you want out-of-scope and often-wrong data from the file 'backzone', use
#	PACKRATDATA=	backzone
# To omit this data, use
#	PACKRATDATA=

PACKRATDATA=

a104 2
#  -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
#  -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
a114 2
#  -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
#	functions like 'link' or variables like 'tzname' required by POSIX
a238 7
# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in
# submake command lines.  The default is no leap seconds.

LEAPSECONDS=

# The zic command and its arguments.

a243 4
# How to use zic to install tzdata binary files.

ZIC_INSTALL=	$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)

d347 2
a348 2
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory
WEB_PAGES=	tz-art.htm tz-how-to.html tz-link.htm
d369 1
a369 1
all:		tzselect yearistype zic zdump libtz.a $(TABDATA)
d378 2
a379 1
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
d401 1
a401 1
zic:		$(TZCOBJS)
d411 7
a417 22
# Arguments to pass to submakes of install_data.
# They can be overridden by later submake arguments.
INSTALLARGS = \
 DESTDIR=$(DESTDIR) \
 LEAPSECONDS='$(LEAPSECONDS)' \
 PACKRATDATA='$(PACKRATDATA)' \
 TZDIR=$(TZDIR) \
 YEARISTYPE=$(YEARISTYPE) \
 ZIC='$(ZIC)'

# 'make install_data' installs one set of tz binary files.
# It can be tailored by setting LEAPSECONDS, PACKRATDATA, etc.
install_data:	zic leapseconds yearistype $(PACKRATDATA) $(TDATA)
		$(ZIC_INSTALL) $(TDATA)
		$(AWK) '/^Rule/' $(TDATA) | $(ZIC_INSTALL) - $(PACKRATDATA)

posix_only:
		$(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data

right_only:
		$(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \
			install_data
d428 1
a428 1
right_posix:	right_only
d431 4
a434 2
		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
d436 1
a436 1
posix_right:	posix_only
d439 9
a447 7
		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only

# This obsolescent rule is present for backwards compatibility with
# tz releases 2014g through 2015g.  It should go away eventually.
posix_packrat:
		$(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only
d663 1
a663 2
.PHONY: install install_data maintainer-clean names
.PHONY: posix_only posix_packrat posix_right
@


1.1.1.11
log
@Import tzdata2016d from ftp://ftp.iana.org/tz/releases/tzdata2016d.tar.gz

Summary of changes in tzdata2016d (2016-04-17 22:50:29 -0700):
  * America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
  * Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
  * New zone Asia/Tomsk, split off from Asia/Novosibirsk.
  * New zone Europe/Kirov, split off from Europe/Volgograd.
  * Russia and nearby locations had daylight-saving transitions on
    1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
    1992-03-28 at 23:00 and 1992-09-26 at 23:00.
  * Many corrections to historical time in Kazakhstan from 1991
    through 2005.
  * Mention Internet RFCs 7808 (TZDIST) and 7809 (CalDAV time zone references).

Summary of changes in tzdata2016c (2016-03-23 00:51:27 -0700):
  * Azerbaijan no longer observes DST.
  * Chile reverts from permanent to seasonal DST.
  * Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
    +02/+03 on 1989-03-26, not 1991-03-31.
  * Several updates and URLs for historical and proposed Russian changes.
@
text
@d8 1
a8 1
VERSION=	2016d
@


1.1.1.11.2.1
log
@Sync with HEAD
@
text
@d7 2
a8 2
# Version number for the distribution, overridden in the 'tarballs' rule below.
VERSION=	unknown
d104 1
d112 1
a112 1
#  -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
d114 1
a114 2
#	ctime_r and asctime_r incompatibly with the POSIX standard
#	(Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
a131 4
#  -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
d243 1
a243 1
# to release 2012h and earlier.
d259 1
a259 1
# How to use zic to install tz binary files.
d275 1
a275 1
# validating.  The default should work on both Debian and Red Hat.
d280 1
a280 1
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
d283 2
a284 2
# See <http://openjade.sourceforge.net/doc/> for a validator, and
# <https://validator.w3.org/source/> for a validation library.
d329 1
a329 1
GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
d366 1
a366 1
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory version
d381 1
a381 26
TZS_YEAR=	2050
TZS=		to$(TZS_YEAR).tzs
TZS_NEW=	to$(TZS_YEAR)new.tzs
TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
			private.h tzfile.h zdump.c zic.c
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS)

# Consult these files when deciding whether to rebuild the 'version' file.
# This list is not the same as the output of 'git ls-files', since
# .gitignore is not distributed.
VERSION_DEPS= \
		CONTRIBUTING LICENSE Makefile NEWS README Theory \
		africa antarctica asctime.c asia australasia \
		backward backzone \
		checklinks.awk checktab.awk \
		date.1 date.c difftime.c \
		etcetera europe factory iso3166.tab \
		leap-seconds.list leapseconds.awk localtime.c \
		newctime.3 newstrftime.3 newtzset.3 northamerica \
		pacificnew private.h \
		southamerica strftime.c systemv \
		time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \
		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
		workman.sh yearistype.sh \
		zdump.8 zdump.c zic.8 zic.c \
		zone.tab zone1970.tab zoneinfo2tdf.pl
d411 4
a414 15
version:	$(VERSION_DEPS)
		{ (type git) >/dev/null 2>&1 && \
		  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty` || \
		  V=$(VERSION); } && \
		printf '%s\n' "$$V" >$@@.out
		mv $@@.out $@@

version.h:	version
		VERSION=`cat version` && printf '%s\n' \
		  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
		  "static char const TZVERSION[]=\"$$VERSION\";" \
		  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
		  >$@@.out
		mv $@@.out $@@
d427 1
a427 2
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@.out
		mv $@@.out $@@
a479 23
$(TZS_NEW):	$(TDATA) zdump zic
		mkdir -p tzs.dir
		$(zic) -d tzs.dir $(TDATA)
		$(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \
		   $(TDATA) | LC_ALL=C sort >$@@.out
		wd=`pwd` && \
		zones=`$(AWK) -v wd="$$wd" \
				'/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \
			 | LC_ALL=C sort` && \
		./zdump -i -c $(TZS_YEAR) $$zones >>$@@.out
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $@@.out >$@@.sed.out
		rm -fr tzs.dir $@@.out
		mv $@@.sed.out $@@

# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
# If it exists but 'make check_tzs' fails, a maintainer should inspect the
# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
$(TZS):
		$(MAKE) force_tzs

force_tzs:	$(TZS_NEW)
		cp $(TZS_NEW) $(TZS)

d487 2
a488 2
tzselect:	tzselect.ksh version
		VERSION=`cat version` && sed \
d494 3
a496 4
			-e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
			<$@@.ksh >$@@.out
		chmod +x $@@.out
		mv $@@.out $@@
d499 1
a499 1
		  check_tables check_tzs check_web
d504 2
a505 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) \
			CONTRIBUTING LICENSE Makefile README version && \
d511 1
a511 2
		patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
		! grep -En "$$pat" $(ENCHILADA)
a534 3
check_tzs:	$(TZS) $(TZS_NEW)
		diff -u $(TZS) $(TZS_NEW)

d542 1
a542 1
		rm -fr *.dir tzdb-*/ $(TZS_NEW)
d547 1
a547 1
		rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
d566 1
a566 2
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@.out
		mv $@@.out $@@
d577 1
a577 2
		if (type git) >/dev/null 2>&1 && \
		   files=`git ls-files $(ENCHILADA)` && \
a593 2
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
d602 1
a602 1
		mkdir -p public.dir
d604 1
a604 1
		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
d606 2
a607 2
		$(zic) -v -d public.dir $(TDATA)
		rm -fr public.dir
a616 1
		wd=`pwd` && \
d619 1
a619 1
		  mkdir -p time_t.dir/$$type && \
d621 1
a621 1
		  $(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
d626 2
a627 2
		    time_t.dir/int64_t/etc/zoneinfo \
		    time_t.dir/$$type/etc/zoneinfo && \
d636 5
a640 5
		  time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/int64_t.out && \
		  time_t.dir/$$type/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/$$type.out && \
		  diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
d643 1
a643 1
		rm -fr time_t.dir
d645 1
a645 10
tarballs traditional_tarballs signatures traditional_signatures: version
		VERSION=`cat version` && \
		$(MAKE) VERSION="$$VERSION" $@@_version

tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
traditional_tarballs_version: \
  tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
traditional_signatures_version: \
  tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
d651 1
a651 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d656 1
a656 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d658 1
a658 8
tzdb-$(VERSION).tar.lz: set-timestamps.out
		rm -fr tzdb-$(VERSION)
		mkdir tzdb-$(VERSION)
		ln $(ENCHILADA) tzdb-$(VERSION)
		touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
		mv $@@.out $@@
a665 3
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
		gpg --armor --detach-sign $?

d691 1
a691 2
.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
.PHONY: clean clean_misc force_tzs
d694 1
a694 2
.PHONY: public right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version typecheck
@


1.1.1.11.2.2
log
@Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)
@
text
@d545 1
a545 2
		rm -f $@@
		$(AR) -rc $@@ $(LIBOBJS)
@


1.1.1.11.2.3
log
@Sync with HEAD
@
text
@d75 2
a76 2
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
d78 2
a79 2
# below.  If you want want only "right" time, with values interpreted
# as seconds since the epoch (counting leap seconds), use
d88 1
a88 4
# with it, use "posix_only" or "posix_right".  Use POSIX time on systems with
# leap smearing; this can work better than unsmeared "right" time with
# applications that are not leap second aware, and is closer to unsmeared
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).
d168 1
a168 1
	-Wundef -Wunused -Wwrite-strings \
@


1.1.1.12
log
@Import tzdata2016f from ftp://ftp.iana.org/tz/releases/tzdata2016f.tar.gz

Summary of changes in tzdata2016f (2016-07-05 16:26:51 +0200):
  * The Egyptian government changed its mind on short notice, and
    Africa/Cairo will not introduce DST starting 2016-07-07 after all.
  * Asia/Novosibirsk switches from +06 to +07 on 2016-07-24 at 02:00.
  * Asia/Novokuznetsk and Asia/Novosibirsk now use numeric time zone
    abbreviations instead of invented ones.
  * Europe/Minsk's 1992-03-29 spring-forward transition was at 02:00 not 00:00.

Summary of changes in tzdata2016e (2016-06-14 08:46:16 -0700):
  * Africa/Cairo observes DST in 2016 from July 7 to the end of October.
	(change obsoleted by 2016f)
  * Locations while uninhabited now use '-00', not 'zzz', as a
    placeholder time zone abbreviation.
  * Asia/Baku's 1992-09-27 transition from +04 (DST) to +04 (non-DST) was
    at 03:00, not 23:00 the previous day.
  * zic now outputs a dummy transition at time 2**31 - 1 in zones
    whose POSIX-style TZ strings contain a '<'.
  * Changes affecting documentation and commentary.
@
text
@d8 1
a8 1
VERSION=	2016f
@


1.1.1.13
log
@Import tzdata2016g from ftp://ftp.iana.org/tz/releases/tzdata2016g.tar.gz

Summary of changes in tzdata2016g (2016-09-13 08:56:38 -0700):
	Timezone switch in Turkey (summer time becomes standard time)
	Transition time corrections for historic timestamps in
		America/Los_Angeles
		zones using USSR rules in early 20th century
	Some (more) time zone abbreviations converted to numeric form
	Asia/Rangoon becomes Asia/Yangon (with backward compat link)
@
text
@d7 2
a8 2
# Version number for the distribution, overridden in the 'tarballs' rule below.
VERSION=	unknown
d243 1
a243 1
# to release 2012h and earlier.
d259 1
a259 1
# How to use zic to install tz binary files.
d275 1
a275 1
# validating.  The default should work on both Debian and Red Hat.
d280 1
a280 1
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
d283 2
a284 2
# See <http://openjade.sourceforge.net/doc/> for a validator, and
# <https://validator.w3.org/source/> for a validation library.
d329 1
a329 1
GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
d359 1
a359 1
			tzselect.ksh version workman.sh
d381 1
a381 26
TZS_YEAR=	2050
TZS=		to$(TZS_YEAR).tzs
TZS_NEW=	to$(TZS_YEAR)new.tzs
TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
			private.h tzfile.h zdump.c zic.c
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS)

# Consult these files when deciding whether to rebuild the 'version' file.
# This list is not the same as the output of 'git ls-files', since
# .gitignore is not distributed.
VERSION_DEPS= \
		CONTRIBUTING LICENSE Makefile NEWS README Theory \
		africa antarctica asctime.c asia australasia \
		backward backzone \
		checklinks.awk checktab.awk \
		date.1 date.c difftime.c \
		etcetera europe factory iso3166.tab \
		leap-seconds.list leapseconds.awk localtime.c \
		newctime.3 newstrftime.3 newtzset.3 northamerica \
		pacificnew private.h \
		southamerica strftime.c systemv \
		time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \
		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
		workman.sh yearistype.sh \
		zdump.8 zdump.c zic.8 zic.c \
		zone.tab zone1970.tab zoneinfo2tdf.pl
d411 1
a411 7
version:	$(VERSION_DEPS)
		{ V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty) || \
		  V=$(VERSION); } && \
		printf '%s\n' "$$V" >$@@

version.h:	version
d413 1
a413 2
		 printf 'static char const TZVERSION[]="%s";\n' \
		   "$$(cat version)" && \
a479 21
$(TZS_NEW):	$(TDATA) zdump zic
		mkdir -p tzs.dir
		$(zic) -d tzs.dir $(TDATA)
		$(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \
		   $(TDATA) | LC_ALL=C sort >$@@.out
		zones=$$($(AWK) -v wd="$$(pwd)" \
				'/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \
			 | LC_ALL=C sort) && \
		./zdump -i -c $(TZS_YEAR) $$zones >>$@@.out
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $@@.out >$@@
		rm -fr tzs.dir $@@.out

# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
# If it exists but 'make check_tzs' fails, a maintainer should inspect the
# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
$(TZS):
		$(MAKE) force_tzs

force_tzs:	$(TZS_NEW)
		cp $(TZS_NEW) $(TZS)

d487 1
a487 1
tzselect:	tzselect.ksh version
d494 2
a495 2
			-e 's|\(TZVERSION\)=.*|\1='"$$(cat version)"'|' \
			<$@@.ksh >$@@
d499 1
a499 1
		  check_tables check_tzs check_web
a534 3
check_tzs:	$(TZS) $(TZS_NEW)
		diff -u $(TZS) $(TZS_NEW)

d542 1
a542 1
		rm -fr *.dir tzdb-*/ $(TZS_NEW)
d547 1
a547 1
		rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
a593 2
		touch -cmr $$(ls -t $(TZS_DEPS) | sed 1q) $(TZS)
		touch -cmr $$(ls -t $(VERSION_DEPS) | sed 1q) version
d602 1
a602 1
		mkdir -p public.dir
d604 1
a604 1
		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
d606 2
a607 2
		$(zic) -v -d public.dir $(TDATA)
		rm -fr public.dir
d619 1
a619 1
		  mkdir -p time_t.dir/$$type && \
d621 1
a621 1
		  $(MAKE) TOPDIR=$$(pwd)/time_t.dir/$$type \
d626 2
a627 2
		    time_t.dir/int64_t/etc/zoneinfo \
		    time_t.dir/$$type/etc/zoneinfo && \
d636 5
a640 5
		  time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/int64_t.out && \
		  time_t.dir/$$type/etc/zdump -V -t $$range $$zones \
		      >time_t.dir/$$type.out && \
		  diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
d643 1
a643 4
		rm -fr time_t.dir

tarballs signatures: version
		$(MAKE) VERSION="$$(cat version)" $@@_version
d645 1
a645 2
tarballs_version: tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz \
		tzdb-$(VERSION).tar.lz
d658 1
a658 10
tzdb-$(VERSION).tar.lz: set-timestamps.out
		rm -fr tzdb-$(VERSION)
		mkdir tzdb-$(VERSION)
		ln $(ENCHILADA) tzdb-$(VERSION)
		touch -cmr $$(ls -t tzdb-$(VERSION)/* | sed 1q) tzdb-$(VERSION)
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 > $@@

signatures_version: tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
		tzdb-$(VERSION).tar.lz.asc
a665 3
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
		gpg --armor --detach-sign $?

d691 1
a691 2
.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
.PHONY: clean clean_misc force_tzs
d694 1
a694 2
.PHONY: public right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version typecheck
@


1.1.1.14
log
@Import tzdata2016h from ftp://ftp.iana.org/tz/releases/tzdata2016h.tar.gz

Summary of changes in tzdata2016h (2016-10-19 23:17:57 -0700):

	Asia/Gaza and Asia/Hebron end of summer time for 2016 is
	2016-10-29 at 01:00 rather than 2016-10-21 at 00:00 (which
	is within hours after this update).  Guess that future
	end dates will be the last Sat of October.

	Corrected some historic time (and one date) transition
	times for Turkey (all 1990 or before.)

	Switch Sri-Lanka to use numeric abbreviation for time zone
	as the tzdata invented one is not correct, and the correct
	one seems not to be widely used.
@
text
@d104 1
d112 1
a112 1
#  -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
d114 1
a114 2
#	ctime_r and asctime_r incompatibly with the POSIX standard
#	(Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
d359 1
a359 1
			tzselect.ksh workman.sh
d366 1
a366 1
COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory version
d437 2
a438 3
		{ (type git) >/dev/null 2>&1 && \
		  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty` || \
d440 1
a440 2
		printf '%s\n' "$$V" >$@@.out
		mv $@@.out $@@
d443 4
a446 6
		VERSION=`cat version` && printf '%s\n' \
		  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
		  "static char const TZVERSION[]=\"$$VERSION\";" \
		  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
		  >$@@.out
		mv $@@.out $@@
d459 1
a459 2
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@.out
		mv $@@.out $@@
d517 1
a517 2
		wd=`pwd` && \
		zones=`$(AWK) -v wd="$$wd" \
d519 1
a519 1
			 | LC_ALL=C sort` && \
d521 1
a521 1
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $@@.out >$@@.sed.out
a522 1
		mv $@@.sed.out $@@
d541 1
a541 1
		VERSION=`cat version` && sed \
d547 3
a549 4
			-e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
			<$@@.ksh >$@@.out
		chmod +x $@@.out
		mv $@@.out $@@
d557 2
a558 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) \
			CONTRIBUTING LICENSE Makefile README version && \
d564 1
a564 2
		patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
		! grep -En "$$pat" $(ENCHILADA)
d622 1
a622 2
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@.out
		mv $@@.out $@@
d633 1
a633 2
		if (type git) >/dev/null 2>&1 && \
		   files=`git ls-files $(ENCHILADA)` && \
d650 2
a651 2
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
a674 1
		wd=`pwd` && \
d679 1
a679 1
		  $(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
d703 5
a707 10
tarballs traditional_tarballs signatures traditional_signatures: version
		VERSION=`cat version` && \
		$(MAKE) VERSION="$$VERSION" $@@_version

tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
traditional_tarballs_version: \
  tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
traditional_signatures_version: \
  tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
d713 1
a713 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d718 1
a718 2
		  gzip $(GZIPFLAGS) >$@@.out
		mv $@@.out $@@
d724 1
a724 1
		touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
d726 4
a729 2
		tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
		mv $@@.out $@@
@


1.1.1.15
log
@Import tzdata2016i from ftp://ftp.iana.org/tz/releases/tzdata2016i.tar.gz

Summary of changes in tzdata2016i (2016-11-01 23:19:52 -0700):

  Cyprus split into two time zones on 2016-10-30 (new zone is
  Asia/Famagusta and is UTC+3 year round).  Tonga reintroduces
  summer time on 2016-11-06 (assumed for now to be aligned with Fiji).
  This year's summer time switch (from +08 to +11) for Antarctica/Casey
  occurred 2016-10-22.

  Also (minor) adjustments to some historic data for Italy (most
  recent applies to time of day of switch out of summer time in period
  1967-1970 & 1972-1974, other changes relate to 1910's and 1940's.)
@
text
@a131 4
#  -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
@


1.1.1.16
log
@Import tzdata2016j from ftp://ftp.iana.org/tz/releases/tzdata2016j.tar.gz

Summary of changes in tzdata2016j (2016-11-22 23:17:13 -0800):

    Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00.
    This creates a new zone Europe/Saratov.

    New zone Asia/Atyrau for Atyrau Region, Kazakhstan, is like
    Asia/Aqtau except it switched from +04/+05 to +05/+06 in spring
    1999, not fall 1994.

    Asia/Gaza and Asia/Hebron now use "EEST", not "EET", to denote
    summer time before 1948.  The old use of "EET" was a typo.
@
text
@d545 1
a545 2
		rm -f $@@
		$(AR) -rc $@@ $(LIBOBJS)
@


1.1.1.16.2.1
log
@Sync with HEAD
@
text
@d75 2
a76 2
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
d78 2
a79 2
# below.  If you want want only "right" time, with values interpreted
# as seconds since the epoch (counting leap seconds), use
d88 1
a88 4
# with it, use "posix_only" or "posix_right".  Use POSIX time on systems with
# leap smearing; this can work better than unsmeared "right" time with
# applications that are not leap second aware, and is closer to unsmeared
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).
d168 1
a168 1
	-Wundef -Wunused -Wwrite-strings \
@


1.1.1.17
log
@Import tzdata2017a from ftp://ftp.iana.org/tz/releases/tzdata2017a.tar.gz

Summary of changes in tzdata2017a (2017-02-28 00:05:36 -0800):

  Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia
  discontinues DST.

  Changes to future time stamps

    Mongolia no longer observes DST.
    Chile's Region of Magallanes moves from -04/-03 to -03 year-round.

  Changes to past time stamps

    Fix many entries for historical time stamps for Europe/Madrid
    before 1979, to agree with tables compiled by Pere Planesas of the
    National Astronomical Observatory of Spain.  As a side effect,
    this changes some time stamps for Africa/Ceuta before 1929, which
    are probably guesswork anyway.

    Ecuador observed DST from 1992-11-28 to 1993-02-05.

    Asia/Atyrau and Asia/Oral were at +03 (not +04) before 1930-06-21.

  Changes to past and future time zone abbreviations

    Switch to numeric time zone abbreviations for South America, as
    part of the ongoing project of removing invented abbreviations.

    For Alaska time from 1900 through 1967, instead of "CAT" use the
    abbreviation "AST", the abbreviation commonly used at the time
    (Atlantic Standard Time had not been standardized yet).  Use "AWT"
    and "APT" instead of the invented abbreviations "CAWT" and "CAPT".

    Use "CST" and "CDT" instead of invented abbreviations for Macau
    before 1999 and Taiwan before 1938, and use "JST" instead of the
    invented abbreviation "JCST" for Japan and Korea before 1938.

  Change to database entry category

    Move the Pacific/Johnston link from 'australasia' to 'backward',
    since Johnston is now uninhabited.
@
text
@d75 2
a76 2
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
d78 2
a79 2
# below.  If you want want only "right" time, with values interpreted
# as seconds since the epoch (counting leap seconds), use
d88 1
a88 4
# with it, use "posix_only" or "posix_right".  Use POSIX time on systems with
# leap smearing; this can work better than unsmeared "right" time with
# applications that are not leap second aware, and is closer to unsmeared
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).
d168 1
a168 1
	-Wundef -Wunused -Wwrite-strings \
@


1.1.1.17.4.1
log
@Pull up following revision(s) (requested by kre in ticket #333):
	doc/3RDPARTY: 1.1479
	distrib/sets/lists/base/mi: 1.1164
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.4
	external/public-domain/tz/dist/LICENSE: up to 1.1.1.3
	external/public-domain/tz/dist/Makefile: up to 1.1.1.18
	external/public-domain/tz/dist/NEWS: up to 1.1.1.19
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.9
	external/public-domain/tz/dist/Theory: delete
	external/public-domain/tz/dist/africa: up to 1.1.1.12
	external/public-domain/tz/dist/antarctica: up to 1.1.1.9
	external/public-domain/tz/dist/asia: up to 1.1.1.17
	external/public-domain/tz/dist/australasia: up to 1.1.1.12
	external/public-domain/tz/dist/backward: up to 1.1.1.8
	external/public-domain/tz/dist/backzone: up to 1.1.1.12
	external/public-domain/tz/dist/calendars: up to 1.1.1.1
	external/public-domain/tz/dist/checklinks.awk: up to 1.1.1.3
	external/public-domain/tz/dist/europe: up to 1.1.1.18
	external/public-domain/tz/dist/leap-seconds.list: up to 1.1.1.8
	external/public-domain/tz/dist/leapseconds: up to 1.1.1.9
	external/public-domain/tz/dist/leapseconds.awk: up to 1.1.1.6
	external/public-domain/tz/dist/northamerica: up to 1.1.1.17
	external/public-domain/tz/dist/southamerica: up to 1.1.1.12
	external/public-domain/tz/dist/theory.html: up to 1.1.1.1
	external/public-domain/tz/dist/version: up to 1.1.1.6
	external/public-domain/tz/dist/zishrink.awk: up to 1.1.1.1
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.12
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.14
Update tzdata to 2017c.
@
text
@a51 1
# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
d78 1
a78 1
# below.  If you want only "right" time, with values interpreted
a94 18
# To install data in text form that has all the information of the binary data,
# (optionally incorporating leap second information), use
#	TZDATA_TEXT=	tzdata.zi leapseconds
# To install text data without leap second information (e.g., because
# REDO='posix_only'), use
#	TZDATA_TEXT=	tzdata.zi
# To avoid installing text data, use
#	TZDATA_TEXT=

TZDATA_TEXT=	leapseconds tzdata.zi

# For backward-compatibility links for old zone names, use
#	BACKWARD=	backward pacificnew
# To omit these links, use
#	BACKWARD=

BACKWARD=	backward pacificnew

a101 5
# The name of a locale using the UTF-8 encoding, used during self-tests.
# The tests are skipped if the name does not appear to work on this system.

UTF8_LOCALE=	en_US.utf8

d109 1
a109 2
# Add the following to the end of the "CFLAGS=" line as needed to override
# defaults specified in the source code.  "-DFOO" is equivalent to "-DFOO=1".
a110 6
#  -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime
#	formats that generate only the last two digits of year numbers
#  -DEPOCH_LOCAL if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
a111 1
#  -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
d113 3
a115 3
#  -DHAVE_GENERIC=0 if _Generic does not work
#  -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
#  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
d118 1
a118 1
#  -DHAVE_INTTYPES_H if you have a non-C99 compiler with <inttypes.h>
d122 1
d126 3
a128 4
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
#  -DHAVE_STDBOOL_H if you have a non-C99 compiler with <stdbool.h>
#  -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
#  -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
d131 2
a132 2
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
d134 10
a143 4
#  -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
#  -Dlocale_t=XXX if your system uses XXX instead of locale_t
#  -Dssize_t=long on hosts like MS-Windows that lack ssize_t
#  -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
a146 1
#	This is intended for internal use only; it mangles external names.
d152 1
a152 1
#  -DUNINIT_TRAP if reading uninitialized storage can cause problems
d160 20
a179 21
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
GCC_INSTRUMENT = \
  -fsanitize=undefined -fsanitize-address-use-after-scope \
  -fsanitize-undefined-trap-on-error -fstack-protector
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
  $(GCC_INSTRUMENT) \
  -Wall -Wextra \
  -Walloc-size-larger-than=100000 -Warray-bounds=2 \
  -Wbad-function-cast -Wcast-align -Wdate-time \
  -Wdeclaration-after-statement -Wdouble-promotion \
  -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
  -Winit-self -Wjump-misses-init -Wlogical-op \
  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
  -Wold-style-definition -Woverlength-strings -Wpointer-arith \
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=5 \
  -Wsuggest-attribute=const -Wsuggest-attribute=format \
  -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
  -Wtrampolines -Wundef -Wuninitialized -Wunused \
  -Wvariadic-macros -Wvla -Wwrite-strings \
  -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
  -Wno-type-limits -Wno-unused-parameter
a191 25
# The next batch of options control support for external variables
# exported by tzcode.  In practice these variables are less useful
# than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
# #
# # To omit or support the external variable "tzname", add one of:
# #	-DHAVE_TZNAME=0
# #	-DHAVE_TZNAME=1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX 1988 and later.
# # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
# # crashes when combined with some platforms' standard libraries,
# # presumably due to memory allocation issues.
# #
# # To omit or support the external variables "timezone" and "daylight", add
# #	-DUSG_COMPAT=0
# #	-DUSG_COMPAT=1
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by
# # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later.
# # If not defined, the code attempts to guess USG_COMPAT from other macros.
# #
# # To support the external variable "altzone", add
# #	-DALTZONE
# # to the end of the "CFLAGS=" line; although "altzone" appeared in
# # System V Release 3.1 it has not been standardized.
#
d229 5
d243 2
a244 2
# 53 as a week number (rather than 52 or 53) for January days before
# January's first Monday when a "%V" format is used and January 1
d268 1
a268 1
ZIC_INSTALL=	$(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
a291 1
# Set VALIDATE=':' if you do not have such a program.
d358 1
a358 1
TZDOBJS=	zdump.o localtime.o asctime.o strftime.o
d373 1
a373 2
COMMON=		calendars CONTRIBUTING LICENSE Makefile \
			NEWS README theory.html version
d378 1
a378 1
YDATA=		$(PRIMARY_YDATA) etcetera $(BACKWARD)
d382 1
a382 1
TABDATA=	iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
d384 3
a386 4
TZDATA_ZI_DEPS=	zishrink.awk $(TDATA) $(PACKRATDATA)
DATA=		$(YDATA) $(NDATA) backzone iso3166.tab leap-seconds.list \
			leapseconds yearistype.sh $(ZONETABLES)
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk zishrink.awk
d393 1
a393 1
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi
d399 1
a399 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README \
d408 1
a408 1
		southamerica strftime.c systemv theory.html \
d430 1
a430 1
		cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
a450 5
# This file can be tailored by setting BACKWARD, PACKRATDATA, etc.
tzdata.zi:	$(TZDATA_ZI_DEPS)
		LC_ALL=C $(AWK) -f zishrink.awk $(TDATA) $(PACKRATDATA) >$@@.out
		mv $@@.out $@@

a475 1
 BACKWARD=$(BACKWARD) \
d484 4
a487 2
install_data:	zic leapseconds yearistype tzdata.zi
		$(ZIC_INSTALL) tzdata.zi
d524 1
a524 1
$(TZS_NEW):	tzdata.zi zdump zic
d526 3
a528 3
		$(zic) -d tzs.dir tzdata.zi
		$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
		   tzdata.zi | LC_ALL=C sort >$@@.out
d531 1
a531 1
				'/^Z/{print wd "/tzs.dir/" $$2}' tzdata.zi \
d567 2
a568 3
check:		check_character_set check_white_space check_links \
		  check_name_lengths check_sorted \
		  check_tables check_web check_zishrink check_tzs
d571 1
a571 4
	test ! '$(UTF8_LOCALE)' || \
	! printf 'A\304\200B\n' | \
	  LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 || { \
		LC_ALL='$(UTF8_LOCALE)' && export LC_ALL && \
d575 1
a575 2
			CONTRIBUTING LICENSE Makefile README \
			version tzdata.zi && \
d578 1
a578 2
		! grep -Env $(OK_LINE) $(ENCHILADA); \
	}
a584 7
PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+
FILE_NAME_COMPONENT_TOO_LONG = \
  $(PRECEDES_FILE_NAME)[^[:space:]]*[^/[:space:]]{15}

check_name_lengths: $(TDATA) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' $(TDATA) backzone

a598 1
		$(AWK) -f checklinks.awk tzdata.zi
d609 2
a610 20
# This checks only the HTML 4.01 strict page.
# To check the the other pages, use <https://validator.w3.org/>.
check_web:	tz-how-to.html
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html

# Check that tzdata.zi generates the same binary data that its sources do.
check_zishrink: tzdata.zi zic leapseconds $(PACKRATDATA) $(TDATA)
		for type in posix right; do \
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-shrunk && \
		  case $$type in \
		    right) leap='-L leapseconds';; \
	            *) leap=;; \
		  esac && \
		  $(ZIC) $$leap -d time_t.dir/$$type $(TDATA) && \
		  $(AWK) '/^Rule/' $(TDATA) | \
		    $(ZIC) $$leap -d time_t.dir/$$type - $(PACKRATDATA) && \
		  $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
		  diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
		done
		rm -fr time_t.dir
d616 1
a616 1
		rm -fr *.dir tzdata.zi tzdb-*/ $(TZS_NEW)
a669 1
		touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi
d681 1
a681 1
		for i in $(TDATA) tzdata.zi; do \
d775 2
a776 2
zonenames:	tzdata.zi
		@@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
a791 1
.PHONY: check_zishrink
@


1.1.1.17.4.2
log
@Catch up to current for the following files, requeted by kre in ticket 513:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.19
	external/public-domain/tz/dist/NEWS             up to 1.1.1.20
	external/public-domain/tz/dist/README           up to 1.1.1.6
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.10
	external/public-domain/tz/dist/africa           up to 1.1.1.13
	external/public-domain/tz/dist/asia             up to 1.1.1.18
	external/public-domain/tz/dist/australasia      up to 1.1.1.13
	external/public-domain/tz/dist/backzone         up to 1.1.1.13
	external/public-domain/tz/dist/europe           up to 1.1.1.19
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.9
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.10
	external/public-domain/tz/dist/northamerica     up to 1.1.1.18
	external/public-domain/tz/dist/southamerica     up to 1.1.1.13
	external/public-domain/tz/dist/theory.html      up to 1.1.1.2
	external/public-domain/tz/dist/version          up to 1.1.1.7
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.2
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.13
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.15
	doc/3RDPARTY					1.1496 (via patch)

Import tzdata2018c.
@
text
@d45 1
d47 1
a47 31
# Installation locations.
#
# The defaults are suitable for Debian, except that if REDO is
# posix_right or right_posix then files that Debian puts under
# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead
# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps,
# respectively.  Problems with the Debian approach are discussed in
# the commentary for the right_posix rule (below).

# Destination directory, which can be used for staging.
# 'make DESTDIR=/stage install' installs under /stage (e.g., to
# /stage/etc/localtime instead of to /etc/localtime).  Files under
# /stage are not intended to work as-is, but can be copied by hand to
# the root directory later.  If DESTDIR is empty, 'make install' does
# not stage, but installs directly into production locations.
DESTDIR =

# Everything is installed into subdirectories of TOPDIR, and used there.
# TOPDIR should be empty (meaning the root directory),
# or a directory name that does not end in "/".
# TOPDIR should be empty or an absolute name unless you're just testing.
TOPDIR =

# The default local time zone is taken from the file TZDEFAULT.
TZDEFAULT = $(TOPDIR)/etc/localtime

# The subdirectory containing installed program and data files, and
# likewise for installed files that can be shared among architectures.
# These should be relative file names.
USRDIR = usr
USRSHAREDIR = $(USRDIR)/share
d51 1
d53 1
d55 6
a60 1
TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME)
d62 1
a62 2
# The "tzselect" and (if you do "make INSTALL") "date" commands go in:
BINDIR = $(TOPDIR)/$(USRDIR)/bin
d64 1
a64 2
# The "zdump" command goes in:
ZDUMPDIR = $(BINDIR)
d66 1
a66 2
# The "zic" command goes in:
ZICDIR = $(TOPDIR)/$(USRDIR)/sbin
d69 2
a70 1
MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man
a72 2
LIBDIR = $(TOPDIR)/$(USRDIR)/lib

d74 1
a74 2
# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t
a107 3
#	BACKWARD=	backward
# If you also want the link US/Pacific-New, even though it is confusing
# and is planned to be removed from the database eventually, use
d112 1
a112 1
BACKWARD=	backward
d316 1
a316 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
d344 2
a345 2
  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
d399 1
a399 1
CC=		$(cc) -DTZDIR='"$(TZDIR)"'
d424 1
a424 1
WEB_PAGES=	tz-art.html tz-how-to.html tz-link.html
d428 1
a428 1
YDATA=		$(PRIMARY_YDATA) etcetera
d430 1
a430 2
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward pacificnew
TDATA=		$(YDATA) $(NDATA) $(BACKWARD)
d434 2
a435 2
TZDATA_ZI_DEPS=	zishrink.awk version $(TDATA) $(PACKRATDATA)
DATA=		$(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
d460 1
a460 1
		time2posix.3 tz-art.html tz-how-to.html tz-link.html \
d476 12
a487 16
		mkdir -p '$(DESTDIR)$(BINDIR)' \
			'$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \
			'$(DESTDIR)$(LIBDIR)' \
			'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
			'$(DESTDIR)$(MANDIR)/man8'
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \
			-t '$(DESTDIR)$(TZDEFAULT)'
		cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
		cp tzselect '$(DESTDIR)$(BINDIR)/.'
		cp zdump '$(DESTDIR)$(ZDUMPDIR)/.'
		cp zic '$(DESTDIR)$(ZICDIR)/.'
		cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
		$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
		cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
		cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
		cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
d490 3
a492 3
		mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
		cp date '$(DESTDIR)$(BINDIR)/.'
		cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
d498 1
a498 1
		  V='$(VERSION)'; } && \
d504 1
a504 3
		version=`sed 1q version` && \
		  LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
		    $(TDATA) $(PACKRATDATA) >$@@.out
d532 2
a533 2
 BACKWARD='$(BACKWARD)' \
 DESTDIR='$(DESTDIR)' \
d536 2
a537 3
 TZDEFAULT='$(TZDEFAULT)' \
 TZDIR='$(TZDIR)' \
 YEARISTYPE='$(YEARISTYPE)' \
d561 4
a564 4
		rm -fr '$(DESTDIR)$(TZDIR)-leaps'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
d567 4
a570 4
		rm -fr '$(DESTDIR)$(TZDIR)-posix'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
d636 1
a636 1
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
d644 1
a644 2
		! grep -n '[[:space:]]$$' \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
d650 2
a651 3
check_name_lengths: $(TDATA_TO_CHECK) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
			$(TDATA_TO_CHECK) backzone
d665 2
a666 2
check_links:	checklinks.awk $(TDATA_TO_CHECK)
		$(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
d767 1
a767 1
		$(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
d769 1
a769 1
		for i in $(TDATA_TO_CHECK) tzdata.zi; do \
d772 1
a772 1
		$(zic) -v -d public.dir $(TDATA_TO_CHECK)
d793 2
a794 5
		    time_t.dir/int64_t/etc \
		    time_t.dir/$$type/etc && \
		  diff $$quiet_option -r \
		    time_t.dir/int64_t/usr/share \
		    time_t.dir/$$type/usr/share && \
d803 1
a803 1
		  time_t.dir/int64_t/usr/bin/zdump -V -t $$range $$zones \
d805 1
a805 1
		  time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \
@


1.1.1.17.4.3
log
@Pull up following revision(s) (requested by kre in ticket #654):
	doc/3RDPARTY: 1.1506 via patch
	external/public-domain/tz/dist/CONTRIBUTING: up to 1.1.1.5
	external/public-domain/tz/dist/Makefile: up to 1.1.1.20
	external/public-domain/tz/dist/NEWS: up to 1.1.1.21
	external/public-domain/tz/dist/TZDATA_VERSION: up to 1.11
	external/public-domain/tz/dist/africa: up to 1.1.1.14
	external/public-domain/tz/dist/antarctica: up to 1.1.1.10
	external/public-domain/tz/dist/asia: up to 1.1.1.19
	external/public-domain/tz/dist/australasia: up to 1.1.1.14
	external/public-domain/tz/dist/backzone: up to 1.1.1.14
	external/public-domain/tz/dist/checktab.awk: up to 1.1.1.9
	external/public-domain/tz/dist/europe: up to 1.1.1.20
	external/public-domain/tz/dist/northamerica: up to 1.1.1.19
	external/public-domain/tz/dist/southamerica: up to 1.1.1.14
	external/public-domain/tz/dist/theory.html: up to 1.1.1.3
	external/public-domain/tz/dist/version: up to 1.1.1.8
	external/public-domain/tz/dist/ziguard.awk: up to 1.1.1.1
	external/public-domain/tz/dist/zishrink.awk: up to 1.1.1.3
	external/public-domain/tz/dist/zone.tab: up to 1.1.1.14
	external/public-domain/tz/dist/zone1970.tab: up to 1.1.1.16
	external/public-domain/tz/tzdata2netbsd: up to 1.12
Update tzdata to 2018d.
@
text
@a12 9
# Choose source data features.  To get new features right away, use:
#	DATAFORM=	vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
#	DATAFORM=	main
# To wait even longer for new features, use:
#	DATAFORM=	rearguard
DATAFORM=		main

d28 1
a28 1
# When a POSIX-style environment variable is handled, the rules in the
d31 1
a31 1
# daylight saving time.
a191 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
a197 2
#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
#	with external linkage, e.g., applications cannot define 'localtime'.
a198 2
#  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
#	security implications and is not recommended for general use
a396 5
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary.  XEmacs 21.5.34 displays them correctly,
# presumably because they are Latin-1.
UNUSUAL_OK_CHARSET= °±½¾×

d398 6
a403 7
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# multibyte letters are also allowed so that commentary can contain a
# few safe symbols and people's names and can quote non-English sources.
# Other non-letters are limited to ASCII renderings for the
# convenience of maintainers using XEmacs 21.5.34, which by default
# mishandles Unicode characters U+0100 and greater.
OK_CHAR=	'[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
d465 1
a465 2
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
d468 1
a468 2
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk \
			ziguard.awk zishrink.awk
d502 1
a502 2
all:		tzselect yearistype zic zdump libtz.a $(TABDATA) \
		  vanguard.zi main.zi rearguard.zi
d537 2
a538 6
# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
		$(AWK) -v outfile='$@@' -f ziguard.awk $(TDATA) $(PACKRATDATA) \
		  >$@@.out
		mv $@@.out $@@
tzdata.zi:	$(DATAFORM).zi version
d541 1
a541 1
		    $(DATAFORM).zi >$@@.out
a616 8
# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
		./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@@ : '\(.*\).zd') >$@@

d618 1
a618 2
		rm -fr tzs.dir
		mkdir tzs.dir
d623 7
a629 8
		set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
			| LC_ALL=C sort -t . -k 2,2` && \
		shift && \
		ZDS=$$* && \
		$(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs.dir
		mv $@@.out $@@
d672 1
a672 1
			CONTRIBUTING LICENSE README \
a673 2
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
			Makefile && \
d705 1
a705 1
check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
d723 2
a724 4
# Check that zishrink.awk does not alter the data, and that ziguard.awk
# preserves main-format data.
check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
		  $(DATAFORM).zi tzdata.zi
d726 1
a726 2
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
		    time_t.dir/$$type-shrunk && \
d731 3
a733 9
		  $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
		  case $(DATAFORM) in \
		    main) \
		      $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
		      $(AWK) '/^Rule/' $(TDATA) | \
			$(ZIC) $$leap -d time_t.dir/$$type-t - \
			  $(PACKRATDATA) && \
		      diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
		  esac && \
d743 1
a743 1
		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
a858 3
# These *_version rules are intended for use if VERSION is set by some
# other means.  Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
d920 1
a920 1
.PHONY: check check_character_set check_links check_name_lengths
d924 1
a924 1
.PHONY: clean clean_misc dummy.zd force_tzs
d928 1
a928 4
.PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: typecheck
a929 1
.PHONY: $(ZDS)
@


1.1.1.17.4.4
log
@Catch up to current for the following, requested by kre in ticket #809:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.21
	external/public-domain/tz/dist/NEWS             up to 1.1.1.22
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.12
	external/public-domain/tz/dist/africa           up to 1.1.1.15
	external/public-domain/tz/dist/asia             up to 1.1.1.20
	external/public-domain/tz/dist/australasia      up to 1.1.1.15
	external/public-domain/tz/dist/europe           up to 1.1.1.21
	external/public-domain/tz/dist/theory.html      up to 1.1.1.4
	external/public-domain/tz/dist/version          up to 1.1.1.9
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.2
	doc/3RDPARTY					1.1520 (patch)

tzdata updated to 2018e.
@
text
@d24 1
a24 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d41 1
a41 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d239 1
a239 1
  -Wbad-function-cast -Wcast-align=strict -Wdate-time \
d245 1
a245 2
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
  -Wstringop-truncation -Wsuggest-attribute=cold \
a246 1
  -Wsuggest-attribute=malloc \
a516 1
		ziguard.awk zishrink.awk \
d562 2
a563 2
		$(AWK) -v DATAFORM=`expr $@@ : '\(.*\).zi'` -f ziguard.awk \
		  $(TDATA) $(PACKRATDATA) >$@@.out
a902 7
TRADITIONAL_ASC = \
  tzcode$(VERSION).tar.gz.asc \
  tzdata$(VERSION).tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) \
  tzdata$(VERSION)-rearguard.tar.gz.asc \
  tzdb-$(VERSION).tar.lz.asc

d910 1
a910 3
tarballs_version: traditional_tarballs_version \
  tzdata$(VERSION)-rearguard.tar.gz \
  tzdb-$(VERSION).tar.lz
d913 3
a915 2
signatures_version: $(ALL_ASC)
traditional_signatures_version: $(TRADITIONAL_ASC)
a929 20
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
		rm -fr tzdata$(VERSION)-rearguard.dir
		mkdir tzdata$(VERSION)-rearguard.dir
		ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
		cd tzdata$(VERSION)-rearguard.dir && \
		  rm -f $(TDATA) $(PACKRATDATA) version
		for f in $(TDATA) $(PACKRATDATA); do \
		  rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
		  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
		  touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
		done
		sed '1s/$$/-rearguard/' \
		  <version >tzdata$(VERSION)-rearguard.dir/version
		touch -cmr version tzdata$(VERSION)-rearguard.dir/version
		LC_ALL=C && export LC_ALL && \
		  (cd tzdata$(VERSION)-rearguard.dir && \
		   tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
		     gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

d940 2
d943 2
a944 1
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
a945 1
$(ALL_ASC):
@


1.1.1.17.4.5
log
@Sync the following with current, requested by kre in ticket #1068

	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.6
	external/public-domain/tz/dist/Makefile         up to 1.1.1.22
	external/public-domain/tz/dist/NEWS             up to 1.1.1.23
	external/public-domain/tz/dist/README           up to 1.1.1.7
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.13
	external/public-domain/tz/dist/africa           up to 1.1.1.16
	external/public-domain/tz/dist/antarctica       up to 1.1.1.11
	external/public-domain/tz/dist/asia             up to 1.1.1.21
	external/public-domain/tz/dist/australasia      up to 1.1.1.16
	external/public-domain/tz/dist/backward         up to 1.1.1.9
	external/public-domain/tz/dist/backzone         up to 1.1.1.15
	external/public-domain/tz/dist/etcetera         up to 1.1.1.3
	external/public-domain/tz/dist/europe           up to 1.1.1.22
	external/public-domain/tz/dist/factory          up to 1.1.1.3
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.10
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.11
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.7
	external/public-domain/tz/dist/northamerica     up to 1.1.1.20
	external/public-domain/tz/dist/pacificnew       up to 1.1.1.2
	external/public-domain/tz/dist/southamerica     up to 1.1.1.15
	external/public-domain/tz/dist/systemv          up to 1.1.1.2
	external/public-domain/tz/dist/theory.html      up to 1.1.1.5
	external/public-domain/tz/dist/version          up to 1.1.1.10
	external/public-domain/tz/dist/yearistype.sh    up to 1.1.1.2
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.4
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.15
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.17
	external/public-domain/tz/dist/zoneinfo2tdf.pl  up to 1.1.1.2
	doc/3RDPARTY					1.1568 (patch



Import tzdata2018f from ftp://ftp.iana.org/tz/releases/tzdata2018f.tar.gz

  Volgograd moves from +03 to +04 on 2018-10-28.
  Fiji ends DST 2019-01-13, not 2019-01-20.
  Most of Chile changes DST dates, effective 2019-04-06.

  Plus corrections to North Korea's 2018-05-05 and China's April 1988
  updates (getting the actual time/date of the transition correct)
  Corrections for Macau pre 1992, Japan in late 1940's - early 1950's,
  and China (Shanghai) 1940's.  The Phillipines get their timezone
  name abbreviations back.
@
text
@a0 2
# Make and install tzdb code and data.

d22 3
a24 3
# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
d34 3
a36 3
# for handling POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
d41 1
a41 1
# Alternatively, if you discover you've got the wrong timezone, you can just
d78 1
a78 1
# The default local timezone is taken from the file TZDEFAULT.
d87 1
a87 1
# "Compiled" timezone information is placed in the "TZDIR" directory
d109 2
a110 4
# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
a111 2
# What kind of TZif data files to generate.
# (TZif is the binary time zone data format that zic generates.)
d132 1
a132 1
# To install data in text form that has all the information of the TZif data,
d174 1
d298 1
a298 1
# time (rather than the timezone specified in the TZ environment variable)
d321 1
a321 1
# argument of opaque type timezone_t that specifies the timezone.
d360 1
a360 1
# How to use zic to install TZif files.
a364 3
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
#	AWK=		gawk
a412 7
# These characters are Latin-1, and so are likely to be displayable
# even in editors with limited character sets.
UNUSUAL_OK_LATIN_1 = «°±»½¾×
# This IPA symbol is represented in Unicode as the composition of
# U+0075 and U+032F, and U+032F is not considered alphabetic by some
# grep implementations that do not grok composition.
UNUSUAL_OK_IPA = u̯
d414 3
a416 2
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
a494 1
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
d499 1
a499 3
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)
d563 1
a563 1
# These files can be tailored by setting BACKWARD and PACKRATDATA.
d568 1
a568 3
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
d570 1
a570 6
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
d608 2
a609 4
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi

# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
d612 1
a612 1
posix_only: $(INSTALL_DATA_DEPS)
d615 1
a615 1
right_only: $(INSTALL_DATA_DEPS)
d642 1
a642 1
posix_packrat: $(INSTALL_DATA_DEPS)
d653 1
a653 2
		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@@ : '\(.*\).zd') \
		  >$@@
d655 4
a658 5
TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
d662 1
a662 2
		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
a663 1
		set x $$x && \
d666 3
a668 4
		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
d671 2
a672 1
# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
d675 1
a675 1
		touch $@@
d714 1
a714 1
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
a719 1
	touch $@@
d723 1
a723 2
		! grep -En "$$pat" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a725 1
		touch $@@
a733 1
		touch $@@
a745 1
		touch $@@
a749 1
		touch $@@
a755 1
		touch $@@
d758 1
a758 6
		if test -s $(TZS); then \
		  diff -u $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@
a763 1
		touch $@@
d767 10
a776 11
check_zishrink: check_zishrink_posix check_zishrink_right
check_zishrink_posix check_zishrink_right: \
  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		mkdir $@@.dir $@@-t.dir $@@-shrunk.dir
		case $@@ in \
		  *_right) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@.dir $(DATAFORM).zi && \
		  $(ZIC) $$leap -d $@@-shrunk.dir tzdata.zi && \
d779 1
a779 1
		      $(ZIC) $$leap -d $@@-t.dir $(TDATA) && \
d781 8
a788 6
			$(ZIC) $$leap -d $@@-t.dir - $(PACKRATDATA) && \
		      diff -r $@@.dir $@@-t.dir;; \
		  esac
		diff -r $@@.dir $@@-shrunk.dir
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		touch $@@
d791 1
a791 2
		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
		  check_* core typecheck_* \
d821 1
a821 1
# Set the timestamps to those of the git repository, if available,
d828 1
a828 1
set-timestamps.out: $(EIGHT_YARDS)
d831 1
a831 1
		   files=`git ls-files $(EIGHT_YARDS)` && \
d849 1
a851 3
set-tzs-timestamp.out: $(TZS)
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch $@@
d856 6
a861 7
check_public: $(VERSION_DEPS)
		rm -fr public.dir
		mkdir public.dir
		ln $(VERSION_DEPS) public.dir
		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
d863 1
a863 1
		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
a864 1
		touch $@@
d868 6
a873 11
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		case $@@ in \
		  int32_t) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
d876 5
a880 8
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@.dir && \
		  $(MAKE) TOPDIR="$$wd/$@@.dir" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@@'" \
d882 23
a904 23
			D=$$wd/$@@.dir \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
		    $(MAKE) TOPDIR="$$wd/$@@.dir" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
			D=$$wd/$@@.dir \
		      to$$range.tzs) && \
		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
			  $@@.dir/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
					   $@@.dir/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
		      $@@.dir/usr/share; \
		}
		touch $@@
d909 2
a910 3
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
d913 1
a913 3
tarballs rearguard_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi
d920 2
a921 1
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
a922 2
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz
a925 1
rearguard_signatures_version: $(REARGUARD_ASC)
d961 1
a961 1
tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d975 1
a975 1
		gpg2 --armor --detach-sign $?
d977 8
a984 18
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: typecheck_long_long typecheck_unsigned
typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		cd $@@.dir && \
		  case $@@ in \
		    *_long_long) i="long long";; \
		    *_unsigned ) i="unsigned" ;; \
		  esac && \
		  typecheck_cflags='' && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="`pwd`" \
		    install
		$@@.dir/zdump -i -c 1970,1971 Europe/Rome
		touch $@@
d1000 3
a1002 1
.PHONY: check check_time_t_alternatives
d1006 2
a1007 4
.PHONY: posix_only posix_packrat posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
@


1.1.1.17.4.6
log
@Pull up the following, requested by kre in ticket #1150:

doc/3RDPARTY					1.1581 (patch)
distrib/sets/lists/base/mi			1.1196 (patch)
external/public-domain/tz/dist/Makefile         up to 1.1.1.23
external/public-domain/tz/dist/NEWS             up to 1.1.1.26
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.16
external/public-domain/tz/dist/africa           up to 1.1.1.19
external/public-domain/tz/dist/asia             up to 1.1.1.22
external/public-domain/tz/dist/australasia      up to 1.1.1.17
external/public-domain/tz/dist/leapseconds      up to 1.1.1.12
external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.8
external/public-domain/tz/dist/northamerica     up to 1.1.1.22
external/public-domain/tz/dist/theory.html      up to 1.1.1.7
external/public-domain/tz/dist/version          up to 1.1.1.13
external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.4
external/public-domain/tz/dist/zone.tab         up to 1.1.1.16
external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.18

Import tzdata2018h from ftp://ftp.iana.org/tz/releases/tzdata2018h.tar.gz

Summary of changes in tzdata2018h (2018-12-23 17:59:32 -0800):

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla, Alaska observes PST this winter only.

    Add predictions for Iran from 2038 through 2090.

    Changes to some old timestamps for Nauru (1979) Guam (1959-77),
    Hong Kong (1904, 1941, 1945, 1952) (others in Pacific during WWII)

Summary of changes in tzdata2018i (2018-12-30 11:05:43 -0800):

    Due to a change in government, Sao Tome and Principe switches back
    from +01 to +00 on 2019-01-01 at 02:00.
@
text
@a382 3
# Name of curl <https://curl.haxx.se/>, used for HTML validation.
CURL=		curl

d384 1
a384 1
# validating HTML 4.01.  The default should work on both Debian and Red Hat.
d391 1
a391 1
# The name, arguments and environment of a program to validate HTML 4.01.
a490 1
CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
d802 3
a804 9
check_web:	$(CHECK_WEB_PAGES)
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
check_tz-art.html check_tz-link.html:
		$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		    -F file=@@$$(expr $@@ : 'check_\(.*\)') -o $@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@
check_tz-how-to.html: tz-how-to.html
d1071 1
a1071 1
.PHONY: check_web check_zishrink
@


1.1.1.17.4.7
log
@Pull up the following, requested by kre in ticket #1631:

	external/public-domain/tz/dist/systemv          delete
	external/public-domain/tz/dist/pacificnew       delete
	external/public-domain/tz/dist/yearistype.sh    delete
	external/public-domain/tz/dist/Makefile         up to 1.1.1.29
	external/public-domain/tz/dist/NEWS             up to 1.1.1.32
	external/public-domain/tz/dist/README           up to 1.1.1.9
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.22
	external/public-domain/tz/dist/africa           up to 1.1.1.23
	external/public-domain/tz/dist/antarctica       up to 1.1.1.13
	external/public-domain/tz/dist/asia             up to 1.1.1.27
	external/public-domain/tz/dist/australasia      up to 1.1.1.20
	external/public-domain/tz/dist/backward         up to 1.1.1.11
	external/public-domain/tz/dist/backzone         up to 1.1.1.19
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.10
	external/public-domain/tz/dist/etcetera         up to 1.1.1.4
	external/public-domain/tz/dist/europe           up to 1.1.1.29
	external/public-domain/tz/dist/factory          up to 1.1.1.4
	external/public-domain/tz/dist/iso3166.tab      up to 1.1.1.6
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.14
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.16
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.11
	external/public-domain/tz/dist/northamerica     up to 1.1.1.26
	external/public-domain/tz/dist/southamerica     up to 1.1.1.17
	external/public-domain/tz/dist/theory.html      up to 1.1.1.11
	external/public-domain/tz/dist/version          up to 1.1.1.19
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.5
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.7
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.18
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.20
	external/public-domain/tz/dist/zoneinfo2tdf.pl  up to 1.1.1.4
	distrib/sets/lists/base/mi			(apply patch)
	doc/3RDPARTY					(apply patch)
	external/public-domain/tz/share/zoneinfo/Makefile	(apply patch)

Update tzdate from 2018i to 2020d
@
text
@d15 1
a15 4
# DATAFORM selects the data format.
# Available formats represent essentially the same data, albeit
# possibly with minor discrepancies that users are not likely to notice.
# To get new features and the best data right away, use:
a21 1
# Rearguard users might also want "ZFLAGS = -b fat"; see below.
d27 2
a28 1
# 'zic -l -' to remove it, or 'zic -l rightzone' to change it.
d35 3
a37 18
# The POSIXRULES macro controls interpretation of nonstandard and obsolete
# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules.
# Such a setting uses the rules in a template file to determine
# "spring forward" and "fall back" days and times; the environment
# variable itself specifies UT offsets of standard and daylight saving time.
#
# If POSIXRULES is '-', no template is installed; this is the default.
#
# Any other value for POSIXRULES is obsolete and should not be relied on, as:
# * It does not work correctly in popular implementations such as GNU/Linux.
# * It does not work in the tzdb implementation for timestamps after 2037.
# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions
#   at standard time or UT rather than at local time.
# In short, software should avoid ruleless settings like TZ='EET-2EEST'
# and so should not depend on the value of POSIXRULES.
#
# If, despite the above, you want a template for handling these settings,
# you can change the line below (after finding the timezone you want in the
d39 4
d44 2
a45 1
# 'zic -p -' to remove it, or 'zic -p rightzone' to change it.
d49 1
d51 1
a51 1
POSIXRULES=	-
d116 2
a117 2
# What kind of TZif data files to generate.  (TZif is the binary time
# zone data format that zic generates; see Internet RFC 8536.)
a137 9
# Whether to put an "Expires" line in the leapseconds file.
# Use EXPIRES_LINE=1 to put the line in, 0 to omit it.
# The EXPIRES_LINE value matters only if REDO's value contains "right".
# If you change EXPIRES_LINE, remove the leapseconds file before running "make".
# zic's support for the Expires line was introduced in tzdb 2020a,
# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file
# can be given to older zic implementations.
EXPIRES_LINE=	0

d151 3
d171 4
a231 6
#  -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and
#	similarly for "slim".  Fat TZif files work around incompatibilities
#	and bugs in some TZif readers, notably readers that mishandle 64-bit
#	data in TZif files.  Slim TZif files are more efficient and do not
#	work around these incompatibilities and bugs.  If not given, the
#	default is "slim".
d276 2
a277 3
# #	-DHAVE_TZNAME=0 # do not support "tzname"
# #	-DHAVE_TZNAME=1 # support "tzname", which is defined by system library
# #	-DHAVE_TZNAME=2 # support and define "tzname"
d285 2
a286 3
# #	-DUSG_COMPAT=0 # do not support
# #	-DUSG_COMPAT=1 # support, and variables are defined by system library
# #	-DUSG_COMPAT=2 # support and define variables
d292 1
a292 3
# #	-DALTZONE=0 # do not support
# #	-DALTZONE=1 # support "altzone", which is defined by system library
# #	-DALTZONE=2 # support and define "altzone"
a294 1
# # If not defined, the code attempts to guess ALTZONE from other macros.
d300 1
a300 1
# "offtime", "timelocal", "timegm", "timeoff",
d302 3
d314 1
a362 5
# To shrink the size of installed TZif files,
# append "-r @@N" to omit data before N-seconds-after-the-Epoch.
# To grow the files and work around older application bugs, append "-b fat";
# see ZIC_BLOAT_DEFAULT above.
# See the zic man page for more about -b and -r.
d386 19
a404 2
# Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions.
GPG=		gpg
d478 2
a479 2
LIBSRCS=	localtime.c asctime.c difftime.c strftime.c
LIBOBJS=	localtime.o asctime.o difftime.o strftime.o
d482 1
a482 1
NEWUCBSRCS=	date.c
d494 1
a494 2
CHECK_WEB_PAGES=check_theory.html check_tz-art.html \
			check_tz-how-to.html check_tz-link.html
d499 2
a500 2
NDATA=		factory
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward
d508 1
a508 1
			leapseconds $(ZONETABLES)
d534 2
a535 1
		private.h southamerica strftime.c theory.html \
d538 2
a539 1
		workman.sh zdump.8 zdump.c zic.8 zic.c \
d548 1
a548 1
all:		tzselect zic zdump libtz.a $(TABDATA) \
d559 1
a559 3
		$(ZIC_INSTALL) -l $(LOCALTIME) \
			`case '$(POSIXRULES)' in ?*) echo '-p';; esac \
			` $(POSIXRULES) \
d616 4
d621 1
a621 2
		$(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \
		  -f leapseconds.awk leap-seconds.list >$@@.out
d633 1
d636 1
a636 1
INSTALL_DATA_DEPS = zic leapseconds tzdata.zi
d751 1
a751 1
			leapseconds zone.tab && \
d778 6
a806 1
check_theory.html: theory.html
a807 1
check_tz-how-to.html: tz-how-to.html
d809 1
a809 1
check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html:
d814 3
a842 1
		rm -fr check_*.dir
d845 1
a845 1
		  date tzselect version.h zdump zic libtz.a
d847 1
a847 2
		rm -fr *.dir tzdb-*/
		rm -f *.zi $(TZS_NEW)
a1023 3
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		TZ=UTC0 touch -mt 202010122253.00 \
		  tzdata$(VERSION)-rearguard.dir/pacificnew
d1027 1
a1027 2
		   tar $(TARFLAGS) -cf - \
			$(COMMON) $(DATA) $(MISC) pacificnew | \
d1045 1
a1045 1
		$(GPG) --armor --detach-sign $?
@


1.1.1.17.4.8
log
@Pull up the following, requested by kre in ticket #1676:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.30
	external/public-domain/tz/dist/NEWS             up to 1.1.1.34
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.24
	external/public-domain/tz/dist/africa           up to 1.1.1.25
	external/public-domain/tz/dist/asia             up to 1.1.1.28
	external/public-domain/tz/dist/australasia      up to 1.1.1.21
	external/public-domain/tz/dist/backward         up to 1.1.1.12
	external/public-domain/tz/dist/backzone         up to 1.1.1.20
	external/public-domain/tz/dist/etcetera         up to 1.1.1.5
	external/public-domain/tz/dist/europe           up to 1.1.1.30
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.15
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.18
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.12
	external/public-domain/tz/dist/northamerica     up to 1.1.1.27
	external/public-domain/tz/dist/theory.html      up to 1.1.1.12
	external/public-domain/tz/dist/version          up to 1.1.1.21
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.6
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.19
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.21
	doc/3RDPARTY					(apply patch)

Update from tzdata2020d to tzdata2021a.

The significant changes are:

    Volgograd switched to Moscow time on 2020-12-27 at 02:00.   (2020e)
    South Sudan changes from +03 to +02 on 2021-02-01 at 00:00. (2021a)
@
text
@a585 4
# Calculate version number from git, if available.
# Otherwise, use $(VERSION) unless it is "unknown" and there is already
# a 'version' file, in which case reuse the existing 'version' contents
# and append "-dirty" if the contents do not already end in "-dirty".
d590 1
a590 5
		  if test '$(VERSION)' = unknown && V=`cat $@@`; then \
		    case $$V in *-dirty);; *) V=$$V-dirty;; esac; \
		  else \
		    V='$(VERSION)'; \
		  fi; } && \
a874 23
# Set file timestamps deterministically if possible,
# so that tarballs containing the timestamps are reproducible.
#
# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the
# file DEST to the maximum of the timestamps of the files A B C ...,
# plus N if GNU ls and touch are available.
SET_TIMESTAMP_N = sh -c '\
  n=$$0 dest=$$1; shift; \
  touch -cmr `ls -t "$$@@" | sed 1q` "$$dest" && \
  if test $$n != 0 && \
     lsout=`ls -n --time-style="+%s" "$$dest" 2>/dev/null`; then \
    set x $$lsout && \
    touch -cmd @@`expr $$7 + $$n` "$$dest"; \
  else :; fi'
# If DEST depends on A B C ... in this Makefile, callers should use
# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any
# downstream 'make' that considers equal timestamps to be out of date.
# POSIX allows this 'make' behavior, and HP-UX 'make' does it.
# If all that matters is that the timestamp be reproducible
# and plausible, use $(SET_TIMESTAMP).
SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0
SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1

d877 3
a879 3
# This uses GNU 'ls --time-style=+%s', which outputs the seconds count,
# and GNU 'touch -d@@N FILE', where N is the number of seconds since 1970.
# If git or GNU is absent, don't bother to sync with git timestamps.
d897 1
a897 1
		$(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS)
d899 1
a899 1
		  $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \
d902 2
a903 2
		$(SET_TIMESTAMP_DEP) version $(VERSION_DEPS)
		$(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS)
d906 1
a906 1
		$(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS)
d917 1
a917 4
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \
		    public.dir/vanguard.zi public.dir/main.zi \
		    public.dir/rearguard.zi; \
		do \
d984 1
a984 1
		$(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@@_version
d1021 1
a1021 1
		  $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \
d1040 1
a1040 1
		$(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/*
d1082 2
@


1.1.1.17.4.9
log
@Pull up the following revisions (catch up to -current), requested by kre
in ticket #1777:

	external/public-domain/tz/dist/SECURITY         up to 1.1.1.1
	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.7
	external/public-domain/tz/dist/Makefile         up to 1.1.1.33
	external/public-domain/tz/dist/NEWS             up to 1.1.1.38
	external/public-domain/tz/dist/README           up to 1.1.1.10
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
	external/public-domain/tz/dist/africa           up to 1.1.1.28
	external/public-domain/tz/dist/antarctica       up to 1.1.1.15
	external/public-domain/tz/dist/asia             up to 1.5
	external/public-domain/tz/dist/australasia      up to 1.5
	external/public-domain/tz/dist/backward         up to 1.5
	external/public-domain/tz/dist/backzone         up to 1.1.1.23
	external/public-domain/tz/dist/calendars        up to 1.1.1.2
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.11
	external/public-domain/tz/dist/etcetera         up to 1.1.1.6
	external/public-domain/tz/dist/europe           up to 1.1.1.34
	external/public-domain/tz/dist/leap-seconds.list up to 1.4
	external/public-domain/tz/dist/leapseconds      up to 1.4
	external/public-domain/tz/dist/northamerica     up to 1.1.1.30
	external/public-domain/tz/dist/southamerica     up to 1.1.1.20
	external/public-domain/tz/dist/theory.html      up to 1.1.1.15
	external/public-domain/tz/dist/version          up to 1.5
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.9
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.8
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.22
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.23
	distrib/sets/lists/base/mi			(apply patch)
	doc/3RDPARTY					(apply patch)

Updata tzdata to 2022e.
@
text
@d36 1
a36 1
LOCALTIME=	Factory
d48 3
a50 3
# * It does not work even in tzcode, except for historical timestamps
#   that precede the last explicit transition in the POSIXRULES file.
#   Hence it typically does not work for current and future timestamps.
d125 2
a126 2
TIME_T_ALTERNATIVES_HEAD = int_least64_t
TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t
d155 2
a156 4
# and was modified in tzdb 2021b to generate version 4 TZif files.
# EXPIRES_LINE defaults to 0 for now so that the leapseconds file
# can be given to pre-2020a zic implementations and so that TZif files
# built by newer zic implementations can be read by pre-2021b libraries.
d177 1
a177 2
# If you want out-of-scope and often-wrong data from the file 'backzone',
# but only for entries listed in the backward-compatibility file zone.tab, use
a178 4
#	PACKRATLIST=	zone.tab
# If you want all the 'backzone' data, use
#	PACKRATDATA=	backzone
#	PACKRATLIST=
a180 1
#	PACKRATLIST=
a182 1
PACKRATLIST=
a212 1
#  -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure.
d223 1
a259 1
# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow.
d264 1
a264 1
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \
a265 1
  -Wduplicated-branches -Wduplicated-cond \
d267 1
a267 1
  -Winit-self -Wlogical-op \
a268 1
  -Wnull-dereference \
d270 1
a270 2
  -Wshadow -Wshift-overflow=2 -Wstrict-overflow \
  -Wstrict-prototypes -Wstringop-overflow=4 \
d275 1
a275 1
  -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \
d288 2
a289 3
# and define NO_TM_ZONE to suppress any guessing.  Although these two fields
# not required by POSIX, a future version of POSIX is planned to require them
# and they are widely available on GNU/Linux and BSD systems.
d396 3
a398 4
# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work.
# Also, it is better (though not essential) if 'awk' supports UTF-8,
# and unfortunately mawk and busybox awk do not support UTF-8.
# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems.
a443 3
# Put this in a bracket expression to match spaces.
s = [:space:]

d463 1
a463 3
GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \
  --numeric-owner --owner=0 --group=0 \
  --mode=go+u,go-w --sort=name
d501 1
a501 1
			NEWS README SECURITY theory.html version
d515 2
a516 3
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) \
		  $(PACKRATDATA) $(PACKRATLIST)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA) $(PACKRATLIST)
d521 1
a521 1
MISC=		$(AWK_SCRIPTS)
d526 1
a526 1
TZS_DEPS=	$(YDATA) asctime.c localtime.c \
a527 1
TZDATA_DIST = $(COMMON) $(DATA) $(MISC)
d529 1
a529 1
EIGHT_YARDS = $(TZDATA_DIST) $(DOCS) $(SOURCES) tzdata.zi
d536 1
a536 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README SECURITY \
d549 1
a549 1
		zone.tab zone1970.tab
d602 1
a602 1
# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST.
d604 1
a604 5
		$(AWK) \
		  -v DATAFORM=`expr $@@ : '\(.*\).zi'` \
		  -v PACKRATDATA='$(PACKRATDATA)' \
		  -v PACKRATLIST='$(PACKRATLIST)' \
		  -f ziguard.awk \
d608 1
a608 1
# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO.
a645 1
 PACKRATLIST='$(PACKRATLIST)' \
d684 5
d739 1
a739 1
			-e 's|AWK=[^}]*|AWK='\''$(AWK)'\''|g' \
d749 2
a750 2
		  check_name_lengths check_slashed_abbrs check_sorted \
		  check_tables check_web check_ziguard check_zishrink check_tzs
d760 1
a760 1
			CONTRIBUTING LICENSE README SECURITY \
d774 1
a774 1
		! grep -n '[$s]$$' \
d778 3
a780 2
PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+
FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15}
a786 10
PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+
STDOFF = [-+]?[0-9:.]+
RULELESS_SAVE = (-|$(STDOFF)[sd]?)
RULELESS_SLASHED_ABBRS = \
  $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/

check_slashed_abbrs: $(TDATA_TO_CHECK)
		! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
		touch $@@

d799 1
a799 1
check_tables:	checktab.awk $(YDATA) backward $(ZONETABLES)
d801 1
a801 2
		  test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \
		  $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \
a824 7
check_ziguard: rearguard.zi vanguard.zi ziguard.awk
		$(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \
		  diff -u rearguard.zi -
		$(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \
		  diff -u vanguard.zi -
		touch $@@

d829 1
a829 2
  zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \
  $(TDATA) $(DATAFORM).zi tzdata.zi
d838 2
a839 2
		  case $(DATAFORM),$(PACKRATLIST) in \
		    main,) \
a954 10
		:
		: Also check 'backzone' syntax.
		rm public.dir/main.zi
		cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi
		public.dir/zic -d public.dir/zoneinfo main.zi
		rm public.dir/main.zi
		cd public.dir && \
		  $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi
		public.dir/zic -d public.dir/zoneinfo main.zi
		:
d967 1
a967 1
		  int*32_t) range=-2147483648,2147483648;; \
d1014 1
a1014 1
tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \
d1016 1
a1016 1
  version set-timestamps.out rearguard.zi vanguard.zi
a1028 2
tailored_tarballs_version: \
  tzdata$(VERSION)-tailored.tar.gz
d1042 1
a1042 1
		tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \
a1045 7
# Create empty files with a reproducible timestamp.
CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00

# The obsolescent *rearguard* targets and related macros are present
# for backwards compatibility with tz releases 2018e through 2022a.
# They should go away eventually.  To build rearguard tarballs you
# can instead use 'make DATAFORM=rearguard tailored_tarballs'.
d1047 5
a1051 4
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(TZDATA_DIST) $@@.dir
		cd $@@.dir && rm -f $(TDATA) $(PACKRATDATA) version
d1053 1
a1053 1
		  rearf=$@@.dir/$$f; \
d1057 2
a1058 1
		sed '1s/$$/-rearguard/' <version >$@@.dir/version
d1060 3
a1062 2
		$(CREATE_EMPTY) $@@.dir/pacificnew
		touch -cmr version $@@.dir/version
d1064 1
a1064 1
		  (cd $@@.dir && \
d1066 1
a1066 1
			$(TZDATA_DIST) pacificnew | \
a1069 38
# Create a tailored tarball suitable for TZUpdater and compatible tools.
# For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball
# useful for testing whether TZUpdater supports vanguard form.
# The generated tarball is not byte-for-byte equivalent to a hand-tailored
# traditional tarball, as data entries are put into 'etcetera' even if they
# came from some other source file.  However, the effect should be the same
# for ordinary use, which reads all the source files.
tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
		rm -fr $@@.dir
		mkdir $@@.dir
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		cd $@@.dir && \
		  $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \
		  `test $(DATAFORM) = vanguard || echo pacificnew`
		(grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \
		  >$@@.dir/etcetera
		touch -cmr tzdata.zi $@@.dir/etcetera
		sed -n \
		  -e '/^# *version  *\(.*\)/h' \
		  -e '/^# *ddeps  */H' \
		  -e '$$!d' \
		  -e 'g' \
		  -e 's/^# *version  *//' \
		  -e 's/\n# *ddeps  */-/' \
		  -e 's/ /-/g' \
		  -e 'p' \
		  <tzdata.zi >$@@.dir/version
		touch -cmr version $@@.dir/version
		links= && \
		  for file in $(TZDATA_DIST); do \
		    test -f $@@.dir/$$file || links="$$links $$file"; \
		  done && \
		  ln $$links $@@.dir
		LC_ALL=C && export LC_ALL && \
		  (cd $@@.dir && \
		   tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

d1121 1
a1121 1
.PHONY: posix_only posix_right public
a1127 1
.PHONY: tailored_tarballs tailored_tarballs_version
@


1.1.1.17.4.10
log
@Pull up the following, requested by kry in ticket #1928:

	external/public-domain/tz/dist/checknow.awk     up to 1.1.1.1
	external/public-domain/tz/dist/zonenow.tab      up to 1.1.1.1
	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.8
	external/public-domain/tz/dist/Makefile         up to 1.1.1.37
	external/public-domain/tz/dist/NEWS             up to 1.1.1.44
	external/public-domain/tz/dist/README           up to 1.1.1.11
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.36
	external/public-domain/tz/dist/africa           up to 1.1.1.32
	external/public-domain/tz/dist/antarctica       up to 1.1.1.18
	external/public-domain/tz/dist/asia             up to 1.11
	external/public-domain/tz/dist/australasia      up to 1.8
	external/public-domain/tz/dist/backward         up to 1.11
	external/public-domain/tz/dist/backzone         up to 1.1.1.27
	external/public-domain/tz/dist/checklinks.awk   up to 1.1.1.4
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.13
	external/public-domain/tz/dist/etcetera         up to 1.1.1.7
	external/public-domain/tz/dist/europe           up to 1.1.1.38
	external/public-domain/tz/dist/iso3166.tab      up to 1.1.1.9
	external/public-domain/tz/dist/leap-seconds.list up to 1.6
	external/public-domain/tz/dist/leapseconds      up to 1.6
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.13
	external/public-domain/tz/dist/northamerica     up to 1.1.1.34
	external/public-domain/tz/dist/southamerica     up to 1.1.1.24
	external/public-domain/tz/dist/theory.html      up to 1.1.1.18
	external/public-domain/tz/dist/version          up to 1.11
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.10
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.26
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.27
	distrib/sets/lists/base/mi			(apply patch)
	doc/3RDPARTY					(apply patch)

Update tzdata to tzdata2023dgtz.
@
text
@d2 1
a4 19
# Request POSIX conformance; this must be the first non-comment line.
.POSIX:
# On older platforms you may need to scrounge for a POSIX-conforming 'make'.
# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or
# /usr/xpg4/bin/make, not /usr/ccs/bin/make.

# To affect how this Makefile works, you can run a shell script like this:
#
#	#!/bin/sh
#	make CC='gcc -std=gnu11' "$@@"
#
# This example script is appropriate for a pre-2017 GNU/Linux system
# where a non-default setting is needed to support this package's use of C99.
#
# Alternatively, you can simply edit this Makefile to tailor the following
# macro definitions.

###############################################################################
# Start of macros that one plausibly might want to tailor.
d38 6
a43 2
# The POSIXRULES macro controls interpretation of POSIX-like TZ
# settings like TZ='EET-2EEST' that lack DST transition rules.
d45 1
d51 3
d66 1
a66 1
# if POSIXRULES is '-' or if the template file cannot be accessed.
a198 1
# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0.
d201 2
a202 3
# Add the following to an uncommented "CFLAGS=" line as needed
# to override defaults specified in the source code or by the system.
# "-DFOO" is equivalent to "-DFOO=1".
a210 1
#  -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm
d212 2
a213 6
#  -DHAVE__GENERIC=0 if _Generic does not work*
#  -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux),
#	-DHAVE_GETRANDOM=0 to avoid using getrandom
#  -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris),
#	where LDLIBS also needs to contain -lintl on some hosts;
#	-DHAVE_GETTEXT=0 to avoid using gettext
d217 1
a217 1
#  -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+
d225 3
a227 5
#  -DHAVE_SETENV=0 if your system lacks the setenv function
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+
#  -DHAVE_STDCKDINT_H=0 if neither <stdckdint.h> nor substitutes like
#	__builtin_add_overflow work*
#  -DHAVE_STDINT_H=0 if <stdint.h> does not work*+
d230 1
a230 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function+
d232 1
a232 1
#  -DHAVE_SYS_STAT_H=0 if <sys/stat.h> does not work*
d234 1
a234 2
#  -DHAVE_UNISTD_H=0 if <unistd.h> does not work*
#  -DHAVE_UTMPX_H=0 if <utmpx.h> does not work*
a235 5
#  -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
#	Typically it is better to use a later standard.  For example,
#	with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
#	Even with -DPORT_TO_C89, the code needs at least one C99
#	feature (integers at least 64 bits wide) and maybe more.
a238 2
#  -DSUPPORT_C89 if the tzcode library should support C89 callers+
#	However, this might trigger latent bugs in C99-or-later callers.
d250 1
a250 7
#	DST transitions for POSIX-style TZ strings lacking them,
#	in the usual case where POSIXRULES is '-'.  If not specified,
#	TZDEFRULESTRING defaults to US rules for future DST transitions.
#	This mishandles some past timestamps, as US DST rules have changed.
#	It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
#	as Europe and US DST rules differ.
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255)
d257 4
a260 4
#	and bugs in some TZif readers, notably older ones that
#	ignore or otherwise mishandle 64-bit data in TZif files;
#	however, fat TZif files may trigger bugs in newer TZif readers.
#	Slim TZif files are more efficient, and are the default.
a263 4
#  -g to generate symbolic debugging info
#  -Idir to include from directory 'dir'
#  -O0 to disable optimization; other -O options to enable more optimization
#  -Uname to remove any definition of the macro 'name'
a264 5
#
# * Options marked "*" can be omitted if your compiler is C23 compatible.
# * Options marked "+" are obsolescent and are planned to be removed
#   once the code assumes C99 or later, say in the year 2029.
#
d278 1
a278 1
  -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \
d291 1
a291 1
  -Wno-type-limits
d338 3
a340 2
# to the end of the "CFLAGS=" line.  This arranges for the following
# functions to be added to the time conversion library.
d343 3
a345 2
# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone.
# "timelocal" is nearly equivalent to "mktime".
a347 1
# I.e., "timeoff" is like calling "mktime_z" with a fixed-offset zone.
d357 1
a357 1
# time library, and if STD_INSPIRED is also defined to nonzero the functions
d370 1
a370 1
# which claims to test C and POSIX conformance.  If you want to pass PCTS, add
a379 3
#
# POSIX says CFLAGS defaults to "-O 1".
# Uncomment the following line and edit its contents as needed.
d381 1
a381 1
#CFLAGS= -O 1
d383 2
d386 1
a386 8
# The name of a POSIX-like library archiver, its flags, C compiler,
# linker flags, and 'make' utility.  Ordinarily the defaults suffice.
# The commented-out values are the defaults specified by POSIX 202x/D3.
#AR = ar
#ARFLAGS = -rv
#CC = c17
#LDFLAGS =
#MAKE = make
d400 2
a401 3
# To grow the files and work around bugs in older applications,
# possibly at the expense of introducing bugs in newer ones,
# append "-b fat"; see ZIC_BLOAT_DEFAULT above.
d409 1
a409 1
# The name of a POSIX-compliant 'awk' on your system.
d416 1
a416 1
# The full path name of a POSIX-compliant shell, preferably one that supports
d420 1
a420 1
# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash
d448 7
a454 4
# These non-alphabetic, non-ASCII printable characters are Latin-1,
# and so are likely displayable even in editors like XEmacs 21
# that have limited display capabilities.
UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷
d457 1
a457 1
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)
d492 1
a492 4
# When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported.
# This makes it easier to see which Zone has been affected.
DIFF_TZS=	 diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \
			   || echo ' -F^TZ=')
d494 1
a494 2
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:
d496 2
a497 3
# POSIX prohibits defining or using SHELL.  However, csh users on systems
# that use the user shell for Makefile commands may need to define SHELL.
#SHELL=		/bin/sh
d499 1
a499 2
# End of macros that one plausibly might want to tailor.
###############################################################################
d501 2
d532 1
a532 1
ZONETABLES=	zone.tab zone1970.tab zonenow.tab
d540 1
a540 1
AWK_SCRIPTS=	checklinks.awk checknow.awk checktab.awk leapseconds.awk \
d561 1
a561 1
		checklinks.awk checknow.awk checktab.awk \
d571 6
a576 1
		zone.tab zone1970.tab zonenow.tab
a645 10
tzdir.h:
		printf '%s\n' >$@@.out \
		  '#ifndef TZDEFAULT' \
		  '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \
		  '#endif' \
		  '#ifndef TZDIR' \
		  '# define TZDIR "$(TZDIR)" /* TZif directory */' \
		  '#endif'
		mv $@@.out $@@

d752 1
a752 1
		$(AR) $(ARFLAGS) $@@ $(LIBOBJS)
d760 7
a766 7
		  -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \
		  -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \
		  -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \
		  -e s\''\(REPORT_BUGS_TO\)=.*'\''\1=\'\''$(BUGEMAIL)\'\'\' \
		  -e s\''\(TZDIR\)=[^}]*'\''\1=\'\''$(TZDIR)\'\'\' \
		  -e s\''\(TZVERSION\)=.*'\''\1=\'"'$$VERSION\\''" \
		  <$@@.ksh >$@@.out
d770 2
a771 4
check: check_back check_mild
check_mild:	check_character_set check_white_space check_links \
		  check_name_lengths check_now \
		  check_slashed_abbrs check_sorted \
a773 8
# True if UTF8_LOCALE does not work;
# otherwise, false but with LC_ALL set to $(UTF8_LOCALE).
UTF8_LOCALE_MISSING = \
  { test ! '$(UTF8_LOCALE)' \
    || ! printf 'A\304\200B\n' \
         | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \
    || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; }

d775 4
a778 1
	$(UTF8_LOCALE_MISSING) || { \
a792 1
	$(UTF8_LOCALE_MISSING) || { \
d794 5
a798 4
		! grep -En "$$pat|[$s]\$$" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \
	}
	touch $@@
d820 2
a821 3
check_sorted: backward backzone
		$(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \
		  backward | LC_ALL=C sort -cu
d825 3
a827 32
check_back:	checklinks.awk $(TDATA_TO_CHECK)
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk $(TDATA_TO_CHECK)
		touch $@@

check_links:	checklinks.awk tzdata.zi
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk tzdata.zi
		touch $@@

# Check timestamps from now through 28 years from now, to make sure
# that zonenow.tab contains all sequences of planned timestamps,
# without any duplicate sequences.  In theory this might require
# 2800 years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = `./date +%s`
CHECK_NOW_FUTURE_YEARS = 28
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60
check_now:	checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@.dir
		mkdir $@@.dir
		./zic -d $@@.dir tzdata.zi
		now=$(CHECK_NOW_TIMESTAMP) && \
		  future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \
		  ./zdump -i -t $$now,$$future \
		     $$(find $$PWD/$@@.dir/????*/ -type f) \
		     >$@@.dir/zdump.tab
		$(AWK) \
		  -v zdump_table=$@@.dir/zdump.tab \
		  -f checknow.awk zonenow.tab
		rm -fr $@@.dir
d830 1
a830 1
check_tables:	checktab.awk $(YDATA) backward zone.tab zone1970.tab
d840 1
a840 1
		  $(DIFF_TZS) $(TZS) $(TZS_NEW); \
d890 1
a890 1
		rm -fr check_*.dir typecheck_*.dir
d893 1
a893 1
		  date tzdir.h tzselect version.h zdump zic libtz.a
d931 1
a931 1
  <"$$dest" && \
d933 1
a933 1
     lsout=`ls -nt --time-style="+%s" "$$@@" 2>/dev/null`; then \
d935 2
a936 8
    timestamp=`expr $$7 + $$n` && \
    echo "+ touch -md @@$$timestamp $$dest" && \
    touch -md @@$$timestamp "$$dest"; \
  else \
    newest=`ls -t "$$@@" | sed 1q` && \
    echo "+ touch -mr $$newest $$dest" && \
    touch -mr "$$newest" "$$dest"; \
  fi'
d961 2
a962 6
		      time=`TZ=UTC0 git log -1 \
			--format='tformat:%cd' \
			--date='format:%Y-%m-%dT%H:%M:%SZ' \
			$$file` && \
		      echo "+ touch -md $$time $$file" && \
		      touch -md $$time $$file; \
d987 1
a987 2
		cd public.dir \
		  && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL
d1041 1
a1041 1
		  $(DIFF_TZS) $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
d1118 1
a1118 1
		touch -mr version $@@.dir/version
d1142 1
a1142 1
		touch -mr tzdata.zi $@@.dir/etcetera
d1153 1
a1153 1
		touch -mr version $@@.dir/version
d1205 1
a1205 1
localtime.o:	private.h tzfile.h tzdir.h
d1208 1
a1208 1
zic.o:		private.h tzfile.h tzdir.h version.h
d1211 1
a1211 1
.PHONY: check check_mild check_time_t_alternatives
@


1.1.1.17.4.11
log
@Pull up the following, requested by kre in ticket #1935:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.38
	external/public-domain/tz/dist/NEWS             up to 1.1.1.45
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.37
	external/public-domain/tz/dist/africa           up to 1.1.1.33
	external/public-domain/tz/dist/asia             up to 1.12
	external/public-domain/tz/dist/australasia      up to 1.9
	external/public-domain/tz/dist/checknow.awk     up to 1.1.1.2
	external/public-domain/tz/dist/etcetera         up to 1.1.1.8
	external/public-domain/tz/dist/europe           up to 1.1.1.39
	external/public-domain/tz/dist/leap-seconds.list up to 1.7
	external/public-domain/tz/dist/leapseconds      up to 1.7
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.14
	external/public-domain/tz/dist/northamerica     up to 1.1.1.35
	external/public-domain/tz/dist/southamerica     up to 1.1.1.25
	external/public-domain/tz/dist/theory.html      up to 1.1.1.19
	external/public-domain/tz/dist/version          up to 1.12
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.9
	external/public-domain/tz/dist/zonenow.tab      up to 1.1.1.2
	doc/3RDPARTY					apply patch

Updated tzdata to 2024a
@
text
@d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ
d277 1
a277 1
#	DST transitions for POSIX.1-2017-style TZ strings lacking them,
d343 3
a345 4
# and define NO_TM_ZONE to suppress any guessing.
# Although these two fields are not required by POSIX.1-2017,
# POSIX 202x/D4 requires them and they are widely available
# on GNU/Linux and BSD systems.
d355 1
a355 1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX.1-1988 and later.
d365 2
a366 2
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI).
d430 1
a430 1
# The commented-out values are the defaults specified by POSIX.1-202x/D4.
a441 6
# Where to fetch leap-seconds.list from.
leaplist_URI = \
  https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
# The file is generated by the IERS Earth Orientation Centre, in Paris.
leaplist_TZ = Europe/Paris

d474 1
a474 2
# Name of curl <https://curl.haxx.se/>, used for HTML validation
# and to fetch leap-seconds.list from upstream.
a720 22
# Awk script to extract a Git-style author from leap-seconds.list comments.
EXTRACT_AUTHOR = \
  author_line { sub(/^.[[:space:]]*/, ""); \
      sub(/:[[:space:]]*/, " <"); \
      printf "%s>\n", $$0; \
      success = 1; \
      exit \
  } \
  /Questions or comments to:/ { author_line = 1 } \
  END { exit !success }

# Fetch leap-seconds.list from upstream.
fetch-leap-seconds.list:
		$(CURL) -OR $(leaplist_URI)

# Fetch leap-seconds.list from upstream and commit it to the local repository.
commit-leap-seconds.list: fetch-leap-seconds.list
		author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \
		date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \
		git commit --author="$$author" --date="$$date" -m'make $@@' \
		  leap-seconds.list

d1317 1
a1317 2
.PHONY: clean clean_misc commit-leap-seconds.list dummy.zd
.PHONY: fetch-leap-seconds.list force_tzs
@


1.1.1.18
log
@Import tzdata2017c from ftp://ftp.iana.org/tz/releases/tzdata2017c.tar.gz

   Northern Cyprus switches from +03 to +02/+03 on 2017-10-29.
   Fiji ends DST 2018-01-14, not 2018-01-21.
   Namibia switches from +01/+02 to +02 on 2018-04-01.
   Sudan switches from +03 to +02 on 2017-11-01.
   Tonga likely switches from +13/+14 to +13 on 2017-11-05.
   Turks & Caicos switches from -04 to -05/-04 on 2018-11-04.
   Some corrections to (mostly ancient) historical data.
@
text
@a51 1
# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
d78 1
a78 1
# below.  If you want only "right" time, with values interpreted
a94 18
# To install data in text form that has all the information of the binary data,
# (optionally incorporating leap second information), use
#	TZDATA_TEXT=	tzdata.zi leapseconds
# To install text data without leap second information (e.g., because
# REDO='posix_only'), use
#	TZDATA_TEXT=	tzdata.zi
# To avoid installing text data, use
#	TZDATA_TEXT=

TZDATA_TEXT=	leapseconds tzdata.zi

# For backward-compatibility links for old zone names, use
#	BACKWARD=	backward pacificnew
# To omit these links, use
#	BACKWARD=

BACKWARD=	backward pacificnew

a101 5
# The name of a locale using the UTF-8 encoding, used during self-tests.
# The tests are skipped if the name does not appear to work on this system.

UTF8_LOCALE=	en_US.utf8

d109 1
a109 2
# Add the following to the end of the "CFLAGS=" line as needed to override
# defaults specified in the source code.  "-DFOO" is equivalent to "-DFOO=1".
a110 6
#  -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime
#	formats that generate only the last two digits of year numbers
#  -DEPOCH_LOCAL if the 'time' function returns local time not UT
#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
#	than what POSIX specifies, assuming local time is UT.
#	For example, N is 252460800 on AmigaOS.
a111 1
#  -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
d113 3
a115 3
#  -DHAVE_GENERIC=0 if _Generic does not work
#  -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
#  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
d118 1
a118 1
#  -DHAVE_INTTYPES_H if you have a non-C99 compiler with <inttypes.h>
d122 1
d126 3
a128 4
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
#  -DHAVE_STDBOOL_H if you have a non-C99 compiler with <stdbool.h>
#  -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
#  -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
d131 2
a132 2
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
d134 10
a143 4
#  -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
#  -Dlocale_t=XXX if your system uses XXX instead of locale_t
#  -Dssize_t=long on hosts like MS-Windows that lack ssize_t
#  -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
a146 1
#	This is intended for internal use only; it mangles external names.
d152 1
a152 1
#  -DUNINIT_TRAP if reading uninitialized storage can cause problems
d160 20
a179 21
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
GCC_INSTRUMENT = \
  -fsanitize=undefined -fsanitize-address-use-after-scope \
  -fsanitize-undefined-trap-on-error -fstack-protector
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
  $(GCC_INSTRUMENT) \
  -Wall -Wextra \
  -Walloc-size-larger-than=100000 -Warray-bounds=2 \
  -Wbad-function-cast -Wcast-align -Wdate-time \
  -Wdeclaration-after-statement -Wdouble-promotion \
  -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
  -Winit-self -Wjump-misses-init -Wlogical-op \
  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
  -Wold-style-definition -Woverlength-strings -Wpointer-arith \
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=5 \
  -Wsuggest-attribute=const -Wsuggest-attribute=format \
  -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
  -Wtrampolines -Wundef -Wuninitialized -Wunused \
  -Wvariadic-macros -Wvla -Wwrite-strings \
  -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
  -Wno-type-limits -Wno-unused-parameter
a191 25
# The next batch of options control support for external variables
# exported by tzcode.  In practice these variables are less useful
# than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
# #
# # To omit or support the external variable "tzname", add one of:
# #	-DHAVE_TZNAME=0
# #	-DHAVE_TZNAME=1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX 1988 and later.
# # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
# # crashes when combined with some platforms' standard libraries,
# # presumably due to memory allocation issues.
# #
# # To omit or support the external variables "timezone" and "daylight", add
# #	-DUSG_COMPAT=0
# #	-DUSG_COMPAT=1
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by
# # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later.
# # If not defined, the code attempts to guess USG_COMPAT from other macros.
# #
# # To support the external variable "altzone", add
# #	-DALTZONE
# # to the end of the "CFLAGS=" line; although "altzone" appeared in
# # System V Release 3.1 it has not been standardized.
#
d229 5
d243 2
a244 2
# 53 as a week number (rather than 52 or 53) for January days before
# January's first Monday when a "%V" format is used and January 1
d268 1
a268 1
ZIC_INSTALL=	$(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
a291 1
# Set VALIDATE=':' if you do not have such a program.
d358 1
a358 1
TZDOBJS=	zdump.o localtime.o asctime.o strftime.o
d373 1
a373 2
COMMON=		calendars CONTRIBUTING LICENSE Makefile \
			NEWS README theory.html version
d378 1
a378 1
YDATA=		$(PRIMARY_YDATA) etcetera $(BACKWARD)
d382 1
a382 1
TABDATA=	iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
d384 3
a386 4
TZDATA_ZI_DEPS=	zishrink.awk $(TDATA) $(PACKRATDATA)
DATA=		$(YDATA) $(NDATA) backzone iso3166.tab leap-seconds.list \
			leapseconds yearistype.sh $(ZONETABLES)
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk zishrink.awk
d393 1
a393 1
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi
d399 1
a399 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README \
d408 1
a408 1
		southamerica strftime.c systemv theory.html \
d430 1
a430 1
		cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
a450 5
# This file can be tailored by setting BACKWARD, PACKRATDATA, etc.
tzdata.zi:	$(TZDATA_ZI_DEPS)
		LC_ALL=C $(AWK) -f zishrink.awk $(TDATA) $(PACKRATDATA) >$@@.out
		mv $@@.out $@@

a475 1
 BACKWARD=$(BACKWARD) \
d484 4
a487 2
install_data:	zic leapseconds yearistype tzdata.zi
		$(ZIC_INSTALL) tzdata.zi
d524 1
a524 1
$(TZS_NEW):	tzdata.zi zdump zic
d526 3
a528 3
		$(zic) -d tzs.dir tzdata.zi
		$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
		   tzdata.zi | LC_ALL=C sort >$@@.out
d531 1
a531 1
				'/^Z/{print wd "/tzs.dir/" $$2}' tzdata.zi \
d567 2
a568 3
check:		check_character_set check_white_space check_links \
		  check_name_lengths check_sorted \
		  check_tables check_web check_zishrink check_tzs
d571 1
a571 4
	test ! '$(UTF8_LOCALE)' || \
	! printf 'A\304\200B\n' | \
	  LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 || { \
		LC_ALL='$(UTF8_LOCALE)' && export LC_ALL && \
d575 1
a575 2
			CONTRIBUTING LICENSE Makefile README \
			version tzdata.zi && \
d578 1
a578 2
		! grep -Env $(OK_LINE) $(ENCHILADA); \
	}
a584 7
PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+
FILE_NAME_COMPONENT_TOO_LONG = \
  $(PRECEDES_FILE_NAME)[^[:space:]]*[^/[:space:]]{15}

check_name_lengths: $(TDATA) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' $(TDATA) backzone

a598 1
		$(AWK) -f checklinks.awk tzdata.zi
d609 2
a610 20
# This checks only the HTML 4.01 strict page.
# To check the the other pages, use <https://validator.w3.org/>.
check_web:	tz-how-to.html
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html

# Check that tzdata.zi generates the same binary data that its sources do.
check_zishrink: tzdata.zi zic leapseconds $(PACKRATDATA) $(TDATA)
		for type in posix right; do \
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-shrunk && \
		  case $$type in \
		    right) leap='-L leapseconds';; \
	            *) leap=;; \
		  esac && \
		  $(ZIC) $$leap -d time_t.dir/$$type $(TDATA) && \
		  $(AWK) '/^Rule/' $(TDATA) | \
		    $(ZIC) $$leap -d time_t.dir/$$type - $(PACKRATDATA) && \
		  $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
		  diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
		done
		rm -fr time_t.dir
d616 1
a616 1
		rm -fr *.dir tzdata.zi tzdb-*/ $(TZS_NEW)
a669 1
		touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi
d681 1
a681 1
		for i in $(TDATA) tzdata.zi; do \
d775 2
a776 2
zonenames:	tzdata.zi
		@@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
a791 1
.PHONY: check_zishrink
@


1.1.1.19
log
@Import tzdata2018c from ftp://ftp.iana.org/tz/releases/tzdata2018c.tar.gz

Summary of changes in tzdata2018c (2018-01-22 23:00:44 -0800):
Summary of changes in tzdata2018b (2018-01-17 23:24:48 -0800):
Summary of changes in tzdata2018a (2018-01-12 22:29:21 -0800):

	2018a and 2018b were (kind of) released, but never announced.
	Some "issues" were found with them that caused the relatively
	quick updates...

	The updates are from the previous version (2017c) to the
	current one (2018c) - that 2018a & 2018b intervened is best
	forgotten... (changes in 2018a that were corrected (2018b) or
	reverted (2018c) are not mentioned).

  Briefly:

     Sao Tome and Principe (An island nation off west coast of Equatorial Africa)
     switched from +00 to +01.

     Brazil's DST will now start on November's first Sunday.

     Use Debian-style installation locations, instead of 4.3BSD-style.
	(this does not affect NetBSD, we do not use the tzdata Makefile)

  Changes to past and future time stamps

    Sao Tome and Principe switched from +00 to +01 on 2018-01-01 at
    01:00.  (Thanks to Steffen Thorsen and Michael Deckers.)

  Changes to future time stamps

    Starting in 2018 southern Brazil will begin DST on November's
    first Sunday instead of October's third Sunday.  (Thanks to
    Steffen Thorsen.)

  Changes to past time stamps

    Japanese DST transitions (1948-1951) were Sundays at 00:00, not
    Saturdays or Sundays at 02:00.  (Thanks to Takayuki Nikai.)

    A discrepancy of 4 s in timestamps before 1931 in South Sudan has
    been corrected.  The 'backzone' and 'zone.tab' files did not agree
    with the 'africa' and 'zone1970.tab' files.  (Problem reported by
    Michael Deckers.)

    The abbreviation invented for Bolivia Summer Time (1931-2) is now
    BST instead of BOST, to be more consistent with the convention
    used for Latvian Summer Time (1918-9) and for British Summer Time.
@
text
@d45 1
d47 1
a47 31
# Installation locations.
#
# The defaults are suitable for Debian, except that if REDO is
# posix_right or right_posix then files that Debian puts under
# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead
# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps,
# respectively.  Problems with the Debian approach are discussed in
# the commentary for the right_posix rule (below).

# Destination directory, which can be used for staging.
# 'make DESTDIR=/stage install' installs under /stage (e.g., to
# /stage/etc/localtime instead of to /etc/localtime).  Files under
# /stage are not intended to work as-is, but can be copied by hand to
# the root directory later.  If DESTDIR is empty, 'make install' does
# not stage, but installs directly into production locations.
DESTDIR =

# Everything is installed into subdirectories of TOPDIR, and used there.
# TOPDIR should be empty (meaning the root directory),
# or a directory name that does not end in "/".
# TOPDIR should be empty or an absolute name unless you're just testing.
TOPDIR =

# The default local time zone is taken from the file TZDEFAULT.
TZDEFAULT = $(TOPDIR)/etc/localtime

# The subdirectory containing installed program and data files, and
# likewise for installed files that can be shared among architectures.
# These should be relative file names.
USRDIR = usr
USRSHAREDIR = $(USRDIR)/share
d51 1
d53 1
d55 6
a60 1
TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME)
d62 1
a62 2
# The "tzselect" and (if you do "make INSTALL") "date" commands go in:
BINDIR = $(TOPDIR)/$(USRDIR)/bin
d64 1
a64 2
# The "zdump" command goes in:
ZDUMPDIR = $(BINDIR)
d66 1
a66 2
# The "zic" command goes in:
ZICDIR = $(TOPDIR)/$(USRDIR)/sbin
d69 2
a70 1
MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man
a72 2
LIBDIR = $(TOPDIR)/$(USRDIR)/lib

d74 1
a74 2
# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t
a107 3
#	BACKWARD=	backward
# If you also want the link US/Pacific-New, even though it is confusing
# and is planned to be removed from the database eventually, use
d112 1
a112 1
BACKWARD=	backward
d316 1
a316 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
d344 2
a345 2
  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
d399 1
a399 1
CC=		$(cc) -DTZDIR='"$(TZDIR)"'
d424 1
a424 1
WEB_PAGES=	tz-art.html tz-how-to.html tz-link.html
d428 1
a428 1
YDATA=		$(PRIMARY_YDATA) etcetera
d430 1
a430 2
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward pacificnew
TDATA=		$(YDATA) $(NDATA) $(BACKWARD)
d434 2
a435 2
TZDATA_ZI_DEPS=	zishrink.awk version $(TDATA) $(PACKRATDATA)
DATA=		$(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
d460 1
a460 1
		time2posix.3 tz-art.html tz-how-to.html tz-link.html \
d476 12
a487 16
		mkdir -p '$(DESTDIR)$(BINDIR)' \
			'$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \
			'$(DESTDIR)$(LIBDIR)' \
			'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
			'$(DESTDIR)$(MANDIR)/man8'
		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \
			-t '$(DESTDIR)$(TZDEFAULT)'
		cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
		cp tzselect '$(DESTDIR)$(BINDIR)/.'
		cp zdump '$(DESTDIR)$(ZDUMPDIR)/.'
		cp zic '$(DESTDIR)$(ZICDIR)/.'
		cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
		$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
		cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
		cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
		cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
d490 3
a492 3
		mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
		cp date '$(DESTDIR)$(BINDIR)/.'
		cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
d498 1
a498 1
		  V='$(VERSION)'; } && \
d504 1
a504 3
		version=`sed 1q version` && \
		  LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
		    $(TDATA) $(PACKRATDATA) >$@@.out
d532 2
a533 2
 BACKWARD='$(BACKWARD)' \
 DESTDIR='$(DESTDIR)' \
d536 2
a537 3
 TZDEFAULT='$(TZDEFAULT)' \
 TZDIR='$(TZDIR)' \
 YEARISTYPE='$(YEARISTYPE)' \
d561 4
a564 4
		rm -fr '$(DESTDIR)$(TZDIR)-leaps'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
d567 4
a570 4
		rm -fr '$(DESTDIR)$(TZDIR)-posix'
		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
d636 1
a636 1
		! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
d644 1
a644 2
		! grep -n '[[:space:]]$$' \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
d650 2
a651 3
check_name_lengths: $(TDATA_TO_CHECK) backzone
		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
			$(TDATA_TO_CHECK) backzone
d665 2
a666 2
check_links:	checklinks.awk $(TDATA_TO_CHECK)
		$(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
d767 1
a767 1
		$(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
d769 1
a769 1
		for i in $(TDATA_TO_CHECK) tzdata.zi; do \
d772 1
a772 1
		$(zic) -v -d public.dir $(TDATA_TO_CHECK)
d793 2
a794 5
		    time_t.dir/int64_t/etc \
		    time_t.dir/$$type/etc && \
		  diff $$quiet_option -r \
		    time_t.dir/int64_t/usr/share \
		    time_t.dir/$$type/usr/share && \
d803 1
a803 1
		  time_t.dir/int64_t/usr/bin/zdump -V -t $$range $$zones \
d805 1
a805 1
		  time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \
@


1.1.1.19.2.1
log
@Resolve conflicts between branch and HEAD
@
text
@a12 9
# Choose source data features.  To get new features right away, use:
#	DATAFORM=	vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
#	DATAFORM=	main
# To wait even longer for new features, use:
#	DATAFORM=	rearguard
DATAFORM=		main

d28 1
a28 1
# When a POSIX-style environment variable is handled, the rules in the
d31 1
a31 1
# daylight saving time.
a191 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
a197 2
#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
#	with external linkage, e.g., applications cannot define 'localtime'.
a198 2
#  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
#	security implications and is not recommended for general use
a396 5
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary.  XEmacs 21.5.34 displays them correctly,
# presumably because they are Latin-1.
UNUSUAL_OK_CHARSET= °±½¾×

d398 6
a403 7
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# multibyte letters are also allowed so that commentary can contain a
# few safe symbols and people's names and can quote non-English sources.
# Other non-letters are limited to ASCII renderings for the
# convenience of maintainers using XEmacs 21.5.34, which by default
# mishandles Unicode characters U+0100 and greater.
OK_CHAR=	'[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
d465 1
a465 2
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
d468 1
a468 2
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk \
			ziguard.awk zishrink.awk
d502 1
a502 2
all:		tzselect yearistype zic zdump libtz.a $(TABDATA) \
		  vanguard.zi main.zi rearguard.zi
d537 2
a538 6
# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
		$(AWK) -v outfile='$@@' -f ziguard.awk $(TDATA) $(PACKRATDATA) \
		  >$@@.out
		mv $@@.out $@@
tzdata.zi:	$(DATAFORM).zi version
d541 1
a541 1
		    $(DATAFORM).zi >$@@.out
a616 8
# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
		./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@@ : '\(.*\).zd') >$@@

d618 1
a618 2
		rm -fr tzs.dir
		mkdir tzs.dir
d623 7
a629 8
		set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
			| LC_ALL=C sort -t . -k 2,2` && \
		shift && \
		ZDS=$$* && \
		$(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs.dir
		mv $@@.out $@@
d672 1
a672 1
			CONTRIBUTING LICENSE README \
a673 2
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
			Makefile && \
d705 1
a705 1
check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
d723 2
a724 4
# Check that zishrink.awk does not alter the data, and that ziguard.awk
# preserves main-format data.
check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
		  $(DATAFORM).zi tzdata.zi
d726 1
a726 2
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
		    time_t.dir/$$type-shrunk && \
d731 3
a733 9
		  $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
		  case $(DATAFORM) in \
		    main) \
		      $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
		      $(AWK) '/^Rule/' $(TDATA) | \
			$(ZIC) $$leap -d time_t.dir/$$type-t - \
			  $(PACKRATDATA) && \
		      diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
		  esac && \
d743 1
a743 1
		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
a858 3
# These *_version rules are intended for use if VERSION is set by some
# other means.  Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
d920 1
a920 1
.PHONY: check check_character_set check_links check_name_lengths
d924 1
a924 1
.PHONY: clean clean_misc dummy.zd force_tzs
d928 1
a928 4
.PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: typecheck
a929 1
.PHONY: $(ZDS)
@


1.1.1.19.2.2
log
@Sync with HEAD
@
text
@d24 1
a24 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d41 1
a41 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d239 1
a239 1
  -Wbad-function-cast -Wcast-align=strict -Wdate-time \
d245 1
a245 2
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
  -Wstringop-truncation -Wsuggest-attribute=cold \
a246 1
  -Wsuggest-attribute=malloc \
a516 1
		ziguard.awk zishrink.awk \
d562 2
a563 2
		$(AWK) -v DATAFORM=`expr $@@ : '\(.*\).zi'` -f ziguard.awk \
		  $(TDATA) $(PACKRATDATA) >$@@.out
a902 7
TRADITIONAL_ASC = \
  tzcode$(VERSION).tar.gz.asc \
  tzdata$(VERSION).tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) \
  tzdata$(VERSION)-rearguard.tar.gz.asc \
  tzdb-$(VERSION).tar.lz.asc

d910 1
a910 3
tarballs_version: traditional_tarballs_version \
  tzdata$(VERSION)-rearguard.tar.gz \
  tzdb-$(VERSION).tar.lz
d913 3
a915 2
signatures_version: $(ALL_ASC)
traditional_signatures_version: $(TRADITIONAL_ASC)
a929 20
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
		rm -fr tzdata$(VERSION)-rearguard.dir
		mkdir tzdata$(VERSION)-rearguard.dir
		ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
		cd tzdata$(VERSION)-rearguard.dir && \
		  rm -f $(TDATA) $(PACKRATDATA) version
		for f in $(TDATA) $(PACKRATDATA); do \
		  rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
		  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
		  touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
		done
		sed '1s/$$/-rearguard/' \
		  <version >tzdata$(VERSION)-rearguard.dir/version
		touch -cmr version tzdata$(VERSION)-rearguard.dir/version
		LC_ALL=C && export LC_ALL && \
		  (cd tzdata$(VERSION)-rearguard.dir && \
		   tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
		     gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

d940 2
d943 2
a944 1
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
a945 1
$(ALL_ASC):
@


1.1.1.19.2.3
log
@Sync with head
@
text
@a0 2
# Make and install tzdb code and data.

d22 3
a24 3
# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
d34 3
a36 3
# for handling POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
d41 1
a41 1
# Alternatively, if you discover you've got the wrong timezone, you can just
d78 1
a78 1
# The default local timezone is taken from the file TZDEFAULT.
d87 1
a87 1
# "Compiled" timezone information is placed in the "TZDIR" directory
d109 2
a110 4
# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
a111 2
# What kind of TZif data files to generate.
# (TZif is the binary time zone data format that zic generates.)
d132 1
a132 1
# To install data in text form that has all the information of the TZif data,
d174 1
d298 1
a298 1
# time (rather than the timezone specified in the TZ environment variable)
d321 1
a321 1
# argument of opaque type timezone_t that specifies the timezone.
d360 1
a360 1
# How to use zic to install TZif files.
a364 3
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
#	AWK=		gawk
a412 7
# These characters are Latin-1, and so are likely to be displayable
# even in editors with limited character sets.
UNUSUAL_OK_LATIN_1 = «°±»½¾×
# This IPA symbol is represented in Unicode as the composition of
# U+0075 and U+032F, and U+032F is not considered alphabetic by some
# grep implementations that do not grok composition.
UNUSUAL_OK_IPA = u̯
d414 3
a416 2
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
a494 1
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
d499 1
a499 3
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)
d563 1
a563 1
# These files can be tailored by setting BACKWARD and PACKRATDATA.
d568 1
a568 3
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
d570 1
a570 6
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
d608 2
a609 4
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi

# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
d612 1
a612 1
posix_only: $(INSTALL_DATA_DEPS)
d615 1
a615 1
right_only: $(INSTALL_DATA_DEPS)
d642 1
a642 1
posix_packrat: $(INSTALL_DATA_DEPS)
d653 1
a653 2
		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@@ : '\(.*\).zd') \
		  >$@@
d655 4
a658 5
TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
d662 1
a662 2
		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
a663 1
		set x $$x && \
d666 3
a668 4
		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
d671 2
a672 1
# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
d675 1
a675 1
		touch $@@
d714 1
a714 1
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
a719 1
	touch $@@
d723 1
a723 2
		! grep -En "$$pat" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a725 1
		touch $@@
a733 1
		touch $@@
a745 1
		touch $@@
a749 1
		touch $@@
a755 1
		touch $@@
d758 1
a758 6
		if test -s $(TZS); then \
		  diff -u $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@
a763 1
		touch $@@
d767 10
a776 11
check_zishrink: check_zishrink_posix check_zishrink_right
check_zishrink_posix check_zishrink_right: \
  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		mkdir $@@.dir $@@-t.dir $@@-shrunk.dir
		case $@@ in \
		  *_right) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@.dir $(DATAFORM).zi && \
		  $(ZIC) $$leap -d $@@-shrunk.dir tzdata.zi && \
d779 1
a779 1
		      $(ZIC) $$leap -d $@@-t.dir $(TDATA) && \
d781 8
a788 6
			$(ZIC) $$leap -d $@@-t.dir - $(PACKRATDATA) && \
		      diff -r $@@.dir $@@-t.dir;; \
		  esac
		diff -r $@@.dir $@@-shrunk.dir
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		touch $@@
d791 1
a791 2
		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
		  check_* core typecheck_* \
d821 1
a821 1
# Set the timestamps to those of the git repository, if available,
d828 1
a828 1
set-timestamps.out: $(EIGHT_YARDS)
d831 1
a831 1
		   files=`git ls-files $(EIGHT_YARDS)` && \
d849 1
a851 3
set-tzs-timestamp.out: $(TZS)
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch $@@
d856 6
a861 7
check_public: $(VERSION_DEPS)
		rm -fr public.dir
		mkdir public.dir
		ln $(VERSION_DEPS) public.dir
		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
d863 1
a863 1
		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
a864 1
		touch $@@
d868 6
a873 11
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		case $@@ in \
		  int32_t) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
d876 5
a880 8
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@.dir && \
		  $(MAKE) TOPDIR="$$wd/$@@.dir" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@@'" \
d882 23
a904 23
			D=$$wd/$@@.dir \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
		    $(MAKE) TOPDIR="$$wd/$@@.dir" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
			D=$$wd/$@@.dir \
		      to$$range.tzs) && \
		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
			  $@@.dir/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
					   $@@.dir/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
		      $@@.dir/usr/share; \
		}
		touch $@@
d909 2
a910 3
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
d913 1
a913 3
tarballs rearguard_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi
d920 2
a921 1
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
a922 2
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz
a925 1
rearguard_signatures_version: $(REARGUARD_ASC)
d961 1
a961 1
tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d975 1
a975 1
		gpg2 --armor --detach-sign $?
d977 8
a984 18
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: typecheck_long_long typecheck_unsigned
typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		cd $@@.dir && \
		  case $@@ in \
		    *_long_long) i="long long";; \
		    *_unsigned ) i="unsigned" ;; \
		  esac && \
		  typecheck_cflags='' && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="`pwd`" \
		    install
		$@@.dir/zdump -i -c 1970,1971 Europe/Rome
		touch $@@
d1000 3
a1002 1
.PHONY: check check_time_t_alternatives
d1006 2
a1007 4
.PHONY: posix_only posix_packrat posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
@


1.1.1.19.2.4
log
@Synch with HEAD
@
text
@a382 3
# Name of curl <https://curl.haxx.se/>, used for HTML validation.
CURL=		curl

d384 1
a384 1
# validating HTML 4.01.  The default should work on both Debian and Red Hat.
d391 1
a391 1
# The name, arguments and environment of a program to validate HTML 4.01.
a490 1
CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
d802 3
a804 9
check_web:	$(CHECK_WEB_PAGES)
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
check_tz-art.html check_tz-link.html:
		$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		    -F file=@@$$(expr $@@ : 'check_\(.*\)') -o $@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@
check_tz-how-to.html: tz-how-to.html
d1071 1
a1071 1
.PHONY: check_web check_zishrink
@


1.1.1.20
log
@Import tzdata2018d from ftp://ftp.iana.org/tz/releases/tzdata2018d.tar.gz

Summary of changes in tzdata2018d (2018-03-22 07:05:46 -0700):

	In 2018, Palestine starts DST on March 24 (today!), not March 31

	Casey Station in Antarctica changed from +11 to +08 on 2018-03-11
	at 04:00.

	Various adjustments to some historical conversions (several for
	Uruguay (1920 .. 1990), one fpr Enderbury and Kiritimati (1994/5),
	one for Portugal and colonies (1912) and Jamaica and Turks & Caicos
	(pre 1913)).
@
text
@a12 9
# Choose source data features.  To get new features right away, use:
#	DATAFORM=	vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
#	DATAFORM=	main
# To wait even longer for new features, use:
#	DATAFORM=	rearguard
DATAFORM=		main

d28 1
a28 1
# When a POSIX-style environment variable is handled, the rules in the
d31 1
a31 1
# daylight saving time.
a191 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
a197 2
#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
#	with external linkage, e.g., applications cannot define 'localtime'.
a198 2
#  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
#	security implications and is not recommended for general use
a396 5
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary.  XEmacs 21.5.34 displays them correctly,
# presumably because they are Latin-1.
UNUSUAL_OK_CHARSET= °±½¾×

d398 6
a403 7
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# multibyte letters are also allowed so that commentary can contain a
# few safe symbols and people's names and can quote non-English sources.
# Other non-letters are limited to ASCII renderings for the
# convenience of maintainers using XEmacs 21.5.34, which by default
# mishandles Unicode characters U+0100 and greater.
OK_CHAR=	'[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
d465 1
a465 2
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
d468 1
a468 2
AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk \
			ziguard.awk zishrink.awk
d502 1
a502 2
all:		tzselect yearistype zic zdump libtz.a $(TABDATA) \
		  vanguard.zi main.zi rearguard.zi
d537 2
a538 6
# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
		$(AWK) -v outfile='$@@' -f ziguard.awk $(TDATA) $(PACKRATDATA) \
		  >$@@.out
		mv $@@.out $@@
tzdata.zi:	$(DATAFORM).zi version
d541 1
a541 1
		    $(DATAFORM).zi >$@@.out
a616 8
# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
		./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@@ : '\(.*\).zd') >$@@

d618 1
a618 2
		rm -fr tzs.dir
		mkdir tzs.dir
d623 7
a629 8
		set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
			| LC_ALL=C sort -t . -k 2,2` && \
		shift && \
		ZDS=$$* && \
		$(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs.dir
		mv $@@.out $@@
d672 1
a672 1
			CONTRIBUTING LICENSE README \
a673 2
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
			Makefile && \
d705 1
a705 1
check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
d723 2
a724 4
# Check that zishrink.awk does not alter the data, and that ziguard.awk
# preserves main-format data.
check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
		  $(DATAFORM).zi tzdata.zi
d726 1
a726 2
		  mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
		    time_t.dir/$$type-shrunk && \
d731 3
a733 9
		  $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
		  case $(DATAFORM) in \
		    main) \
		      $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
		      $(AWK) '/^Rule/' $(TDATA) | \
			$(ZIC) $$leap -d time_t.dir/$$type-t - \
			  $(PACKRATDATA) && \
		      diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
		  esac && \
d743 1
a743 1
		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
a858 3
# These *_version rules are intended for use if VERSION is set by some
# other means.  Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
d920 1
a920 1
.PHONY: check check_character_set check_links check_name_lengths
d924 1
a924 1
.PHONY: clean clean_misc dummy.zd force_tzs
d928 1
a928 4
.PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: typecheck
a929 1
.PHONY: $(ZDS)
@


1.1.1.21
log
@Import tzdata2018e from ftp://ftp.iana.org/tz/releases/tzdata2018e.tar.gz

Summary of changes in tzdata2018e (2018-05-01 23:42:51 -0700):

News for the tz database

Release 2018e - 2018-05-01 23:42:51 -0700

    North Korea switches back to +09 on 2018-05-05 (tomorrow!)
@
text
@d24 1
a24 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d41 1
a41 1
# Alternatively, if you discover you've got the wrong time zone, you can just
d239 1
a239 1
  -Wbad-function-cast -Wcast-align=strict -Wdate-time \
d245 1
a245 2
  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
  -Wstringop-truncation -Wsuggest-attribute=cold \
a246 1
  -Wsuggest-attribute=malloc \
a516 1
		ziguard.awk zishrink.awk \
d562 2
a563 2
		$(AWK) -v DATAFORM=`expr $@@ : '\(.*\).zi'` -f ziguard.awk \
		  $(TDATA) $(PACKRATDATA) >$@@.out
a902 7
TRADITIONAL_ASC = \
  tzcode$(VERSION).tar.gz.asc \
  tzdata$(VERSION).tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) \
  tzdata$(VERSION)-rearguard.tar.gz.asc \
  tzdb-$(VERSION).tar.lz.asc

d910 1
a910 3
tarballs_version: traditional_tarballs_version \
  tzdata$(VERSION)-rearguard.tar.gz \
  tzdb-$(VERSION).tar.lz
d913 3
a915 2
signatures_version: $(ALL_ASC)
traditional_signatures_version: $(TRADITIONAL_ASC)
a929 20
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
		rm -fr tzdata$(VERSION)-rearguard.dir
		mkdir tzdata$(VERSION)-rearguard.dir
		ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
		cd tzdata$(VERSION)-rearguard.dir && \
		  rm -f $(TDATA) $(PACKRATDATA) version
		for f in $(TDATA) $(PACKRATDATA); do \
		  rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
		  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
		  touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
		done
		sed '1s/$$/-rearguard/' \
		  <version >tzdata$(VERSION)-rearguard.dir/version
		touch -cmr version tzdata$(VERSION)-rearguard.dir/version
		LC_ALL=C && export LC_ALL && \
		  (cd tzdata$(VERSION)-rearguard.dir && \
		   tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
		     gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

d940 2
d943 2
a944 1
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
a945 1
$(ALL_ASC):
@


1.1.1.21.2.1
log
@Sync with HEAD
@
text
@a0 2
# Make and install tzdb code and data.

d13 1
a13 4
# DATAFORM selects the data format.
# Available formats represent essentially the same data, albeit
# possibly with minor discrepancies that users are not likely to notice.
# To get new features and the best data right away, use:
d22 3
a24 3
# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
d34 5
a38 5
# for handling ruleless POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
# A ruleless environment setting like TZ='CST6CDT' uses the rules in the
# template file to determine "spring forward" and "fall back" days and
d41 1
a41 1
# Alternatively, if you discover you've got the wrong timezone, you can just
d47 1
d78 1
a78 1
# The default local timezone is taken from the file TZDEFAULT.
d87 1
a87 1
# "Compiled" timezone information is placed in the "TZDIR" directory
d109 2
a110 4
# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
a111 2
# What kind of TZif data files to generate.  (TZif is the binary time
# zone data format that zic generates; see Internet RFC 8536.)
d132 1
a132 1
# To install data in text form that has all the information of the TZif data,
d174 1
d298 1
a298 1
# time (rather than the timezone specified in the TZ environment variable)
d321 1
a321 1
# argument of opaque type timezone_t that specifies the timezone.
a357 3
# To shrink the size of installed TZif files,
# append "-r @@N" to omit data before N-seconds-after-the-Epoch.
# See the zic man page for more about -r.
d360 1
a360 1
# How to use zic to install TZif files.
a364 3
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
#	AWK=		gawk
a374 3
# Name of curl <https://curl.haxx.se/>, used for HTML validation.
CURL=		curl

d376 1
a376 1
# validating HTML 4.01.  The default should work on both Debian and Red Hat.
d383 1
a383 1
# The name, arguments and environment of a program to validate HTML 4.01.
a412 7
# These characters are Latin-1, and so are likely to be displayable
# even in editors with limited character sets.
UNUSUAL_OK_LATIN_1 = «°±»½¾×
# This IPA symbol is represented in Unicode as the composition of
# U+0075 and U+032F, and U+032F is not considered alphabetic by some
# grep implementations that do not grok composition.
UNUSUAL_OK_IPA = u̯
d414 3
a416 2
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
a476 2
CHECK_WEB_PAGES=check_theory.html check_tz-art.html \
			check_tz-how-to.html check_tz-link.html
a494 1
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
d499 1
a499 3
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)
d563 1
a563 1
# These files can be tailored by setting BACKWARD and PACKRATDATA.
d568 1
a568 3
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
d570 1
a570 6
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
d608 2
a609 4
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi

# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
d612 1
a612 1
posix_only: $(INSTALL_DATA_DEPS)
d615 1
a615 1
right_only: $(INSTALL_DATA_DEPS)
d642 1
a642 1
posix_packrat: $(INSTALL_DATA_DEPS)
d653 1
a653 2
		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@@ : '\(.*\).zd') \
		  >$@@
d655 4
a658 5
TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
d662 1
a662 2
		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
a663 1
		set x $$x && \
d666 3
a668 4
		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
d671 2
a672 1
# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
d675 1
a675 1
		touch $@@
d714 1
a714 1
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
a719 1
	touch $@@
d723 1
a723 2
		! grep -En "$$pat" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a725 1
		touch $@@
a733 1
		touch $@@
a745 1
		touch $@@
a749 1
		touch $@@
a755 1
		touch $@@
d758 1
a758 6
		if test -s $(TZS); then \
		  diff -u $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@
d760 3
a762 10
check_web:	$(CHECK_WEB_PAGES)
check_theory.html: theory.html
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
check_theory.html check_tz-art.html check_tz-link.html:
		$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		    -F file=@@$$(expr $@@ : 'check_\(.*\)') -o $@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@
check_tz-how-to.html: tz-how-to.html
a763 1
		touch $@@
d767 10
a776 11
check_zishrink: check_zishrink_posix check_zishrink_right
check_zishrink_posix check_zishrink_right: \
  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		mkdir $@@.dir $@@-t.dir $@@-shrunk.dir
		case $@@ in \
		  *_right) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@.dir $(DATAFORM).zi && \
		  $(ZIC) $$leap -d $@@-shrunk.dir tzdata.zi && \
d779 1
a779 1
		      $(ZIC) $$leap -d $@@-t.dir $(TDATA) && \
d781 8
a788 6
			$(ZIC) $$leap -d $@@-t.dir - $(PACKRATDATA) && \
		      diff -r $@@.dir $@@-t.dir;; \
		  esac
		diff -r $@@.dir $@@-shrunk.dir
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		touch $@@
d791 1
a791 3
		rm -fr check_*.dir
		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
		  check_* core typecheck_* \
d794 1
a794 2
		rm -fr *.dir tzdb-*/
		rm -f *.zi $(TZS_NEW)
d821 1
a821 1
# Set the timestamps to those of the git repository, if available,
d828 1
a828 1
set-timestamps.out: $(EIGHT_YARDS)
d831 1
a831 1
		   files=`git ls-files $(EIGHT_YARDS)` && \
d849 1
a851 3
set-tzs-timestamp.out: $(TZS)
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch $@@
d856 6
a861 7
check_public: $(VERSION_DEPS)
		rm -fr public.dir
		mkdir public.dir
		ln $(VERSION_DEPS) public.dir
		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
d863 1
a863 1
		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
a864 1
		touch $@@
d868 6
a873 11
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		case $@@ in \
		  int32_t) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
d876 5
a880 8
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@.dir && \
		  $(MAKE) TOPDIR="$$wd/$@@.dir" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@@'" \
d882 23
a904 23
			D=$$wd/$@@.dir \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
		    $(MAKE) TOPDIR="$$wd/$@@.dir" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
			D=$$wd/$@@.dir \
		      to$$range.tzs) && \
		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
			  $@@.dir/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
					   $@@.dir/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
		      $@@.dir/usr/share; \
		}
		touch $@@
d909 2
a910 3
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
d913 1
a913 3
tarballs rearguard_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi
d920 2
a921 1
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
a922 2
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz
a925 1
rearguard_signatures_version: $(REARGUARD_ASC)
d961 1
a961 1
tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d975 1
a975 1
		gpg2 --armor --detach-sign $?
d977 8
a984 18
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: typecheck_long_long typecheck_unsigned
typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		cd $@@.dir && \
		  case $@@ in \
		    *_long_long) i="long long";; \
		    *_unsigned ) i="unsigned" ;; \
		  esac && \
		  typecheck_cflags='' && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="`pwd`" \
		    install
		$@@.dir/zdump -i -c 1970,1971 Europe/Rome
		touch $@@
d1000 4
a1003 2
.PHONY: check check_time_t_alternatives
.PHONY: check_web check_zishrink
d1006 2
a1007 4
.PHONY: posix_only posix_packrat posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
@


1.1.1.21.2.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d38 2
a39 4
# The POSIXRULES macro controls interpretation of nonstandard and obsolete
# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules.
# In the reference implementation, if you want something other than Eastern
# United States time as a template for handling these settings, you can
d42 1
a42 1
# A setting like TZ='EET-2EEST' is supposed to use the rules in the
a51 11
#
# If POSIXRULES is empty, no template is installed; this is the intended
# future default for POSIXRULES.
#
# Nonempty POSIXRULES is obsolete and should not be relied on, because:
# * It does not work correctly in popular implementations such as GNU/Linux.
# * It does not work in the tzdb implementation for timestamps after 2037.
# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions
#   at standard time or UT rather than at local time.
# In short, software should avoid ruleless settings like TZ='EET-2EEST'
# and so should not depend on the value of POSIXRULES.
a233 7
#  -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and
#	similarly for "fat".  Fat TZif files work around incompatibilities
#	and bugs in some TZif readers, notably readers that mishandle 64-bit
#	data in TZif files.  Slim TZif files are more efficient and do not
#	work around these incompatibilities and bugs.  If not given, the
#	current default is "fat" but this is intended to change as readers
#	requiring fat files often mishandle timestamps after 2037 anyway.
d367 1
a367 3
# You can also append "-b slim" if that is not already the default;
# see ZIC_BLOAT_DEFAULT above.
# See the zic man page for more about -b and -r.
a390 3
# Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions.
GPG=		gpg

d565 1
a565 3
		$(ZIC_INSTALL) -l $(LOCALTIME) \
			`case '$(POSIXRULES)' in ?*) echo '-p';; esac \
			` $(POSIXRULES) \
d784 6
d1054 1
a1054 1
		$(GPG) --armor --detach-sign $?
@


1.1.1.22
log
@Import tzdata2018f from ftp://ftp.iana.org/tz/releases/tzdata2018f.tar.gz

  Volgograd moves from +03 to +04 on 2018-10-28.
  Fiji ends DST 2019-01-13, not 2019-01-20.
  Most of Chile changes DST dates, effective 2019-04-06.

  Plus corrections to North Korea's 2018-05-05 and China's April 1988
  updates (getting the actual time/date of the transition correct)
  Corrections for Macau pre 1992, Japan in late 1940's - early 1950's,
  and China (Shanghai) 1940's.  The Phillipines get their timezone
  name abbreviations back.
@
text
@a0 2
# Make and install tzdb code and data.

d22 3
a24 3
# Change the line below for your timezone (after finding the one you want in
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
d34 3
a36 3
# for handling POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
d41 1
a41 1
# Alternatively, if you discover you've got the wrong timezone, you can just
d78 1
a78 1
# The default local timezone is taken from the file TZDEFAULT.
d87 1
a87 1
# "Compiled" timezone information is placed in the "TZDIR" directory
d109 2
a110 4
# Types to try, as an alternative to time_t.
TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
a111 2
# What kind of TZif data files to generate.
# (TZif is the binary time zone data format that zic generates.)
d132 1
a132 1
# To install data in text form that has all the information of the TZif data,
d174 1
d298 1
a298 1
# time (rather than the timezone specified in the TZ environment variable)
d321 1
a321 1
# argument of opaque type timezone_t that specifies the timezone.
d360 1
a360 1
# How to use zic to install TZif files.
a364 3
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
#	AWK=		gawk
a412 7
# These characters are Latin-1, and so are likely to be displayable
# even in editors with limited character sets.
UNUSUAL_OK_LATIN_1 = «°±»½¾×
# This IPA symbol is represented in Unicode as the composition of
# U+0075 and U+032F, and U+032F is not considered alphabetic by some
# grep implementations that do not grok composition.
UNUSUAL_OK_IPA = u̯
d414 3
a416 2
# useful in commentary.
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
a494 1
TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
d499 1
a499 3
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
ENCHILADA = $(EIGHT_YARDS) $(TZS)
d563 1
a563 1
# These files can be tailored by setting BACKWARD and PACKRATDATA.
d568 1
a568 3
# This file has a version comment that attempts to capture any tailoring
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
tzdata.zi:	$(DATAFORM).zi version zishrink.awk
d570 1
a570 6
		  LC_ALL=C $(AWK) \
		    -v dataform='$(DATAFORM)' \
		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
		    -v redo='$(REDO)' \
		    -v version="$$version" \
		    -f zishrink.awk \
d608 2
a609 4
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi

# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
d612 1
a612 1
posix_only: $(INSTALL_DATA_DEPS)
d615 1
a615 1
right_only: $(INSTALL_DATA_DEPS)
d642 1
a642 1
posix_packrat: $(INSTALL_DATA_DEPS)
d653 1
a653 2
		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@@ : '\(.*\).zd') \
		  >$@@
d655 4
a658 5
TZS_NEW_DEPS = tzdata.zi zdump zic
$(TZS_NEW): $(TZS_NEW_DEPS)
		rm -fr tzs$(TZS_YEAR).dir
		mkdir tzs$(TZS_YEAR).dir
		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
d662 1
a662 2
		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
				tzdata.zi \
a663 1
		set x $$x && \
d666 3
a668 4
		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
		  ZDS="$$ZDS" $$ZDS && \
		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@@.out
		rm -fr tzs$(TZS_YEAR).dir
d671 2
a672 1
# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
d675 1
a675 1
		touch $@@
d714 1
a714 1
		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
a719 1
	touch $@@
d723 1
a723 2
		! grep -En "$$pat" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
a725 1
		touch $@@
a733 1
		touch $@@
a745 1
		touch $@@
a749 1
		touch $@@
a755 1
		touch $@@
d758 1
a758 6
		if test -s $(TZS); then \
		  diff -u $(TZS) $(TZS_NEW); \
		else \
		  cp $(TZS_NEW) $(TZS); \
		fi
		touch $@@
a763 1
		touch $@@
d767 10
a776 11
check_zishrink: check_zishrink_posix check_zishrink_right
check_zishrink_posix check_zishrink_right: \
  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		mkdir $@@.dir $@@-t.dir $@@-shrunk.dir
		case $@@ in \
		  *_right) leap='-L leapseconds';; \
		  *) leap=;; \
		esac && \
		  $(ZIC) $$leap -d $@@.dir $(DATAFORM).zi && \
		  $(ZIC) $$leap -d $@@-shrunk.dir tzdata.zi && \
d779 1
a779 1
		      $(ZIC) $$leap -d $@@-t.dir $(TDATA) && \
d781 8
a788 6
			$(ZIC) $$leap -d $@@-t.dir - $(PACKRATDATA) && \
		      diff -r $@@.dir $@@-t.dir;; \
		  esac
		diff -r $@@.dir $@@-shrunk.dir
		rm -fr $@@.dir $@@-t.dir $@@-shrunk.dir
		touch $@@
d791 1
a791 2
		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
		  check_* core typecheck_* \
d821 1
a821 1
# Set the timestamps to those of the git repository, if available,
d828 1
a828 1
set-timestamps.out: $(EIGHT_YARDS)
d831 1
a831 1
		   files=`git ls-files $(EIGHT_YARDS)` && \
d849 1
a851 3
set-tzs-timestamp.out: $(TZS)
		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
		touch $@@
d856 6
a861 7
check_public: $(VERSION_DEPS)
		rm -fr public.dir
		mkdir public.dir
		ln $(VERSION_DEPS) public.dir
		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
d863 1
a863 1
		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
a864 1
		touch $@@
d868 6
a873 11
check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		case $@@ in \
		  int32_t) range=-2147483648,2147483648;; \
		  u*) range=0,4294967296;; \
		  *) range=-4294967296,4294967296;; \
		esac && \
d876 5
a880 8
		if test $@@ = $(TIME_T_ALTERNATIVES_HEAD); then \
		  range_target=; \
		else \
		  range_target=to$$range.tzs; \
		fi && \
		(cd $@@.dir && \
		  $(MAKE) TOPDIR="$$wd/$@@.dir" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@@'" \
d882 23
a904 23
			D=$$wd/$@@.dir \
		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
		    install $$range_target) && \
		test $@@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
		    $(MAKE) TOPDIR="$$wd/$@@.dir" \
		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
			D=$$wd/$@@.dir \
		      to$$range.tzs) && \
		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
			  $@@.dir/to$$range.tzs && \
		  if diff -q Makefile Makefile 2>/dev/null; then \
		    quiet_option='-q'; \
		  else \
		    quiet_option=''; \
		  fi && \
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
					   $@@.dir/etc && \
		    diff $$quiet_option -r \
		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
		      $@@.dir/usr/share; \
		}
		touch $@@
d909 2
a910 3
REARGUARD_ASC = \
  tzdata$(VERSION)-rearguard.tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
d913 1
a913 3
tarballs rearguard_tarballs traditional_tarballs \
signatures rearguard_signatures traditional_signatures: \
  version set-timestamps.out rearguard.zi
d920 2
a921 1
tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
a922 2
rearguard_tarballs_version: \
  tzdata$(VERSION)-rearguard.tar.gz
a925 1
rearguard_signatures_version: $(REARGUARD_ASC)
d961 1
a961 1
tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
d975 1
a975 1
		gpg2 --armor --detach-sign $?
d977 8
a984 18
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
typecheck: typecheck_long_long typecheck_unsigned
typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(VERSION_DEPS) $@@.dir
		cd $@@.dir && \
		  case $@@ in \
		    *_long_long) i="long long";; \
		    *_unsigned ) i="unsigned" ;; \
		  esac && \
		  typecheck_cflags='' && \
		  $(MAKE) \
		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
		    TOPDIR="`pwd`" \
		    install
		$@@.dir/zdump -i -c 1970,1971 Europe/Rome
		touch $@@
d1000 3
a1002 1
.PHONY: check check_time_t_alternatives
d1006 2
a1007 4
.PHONY: posix_only posix_packrat posix_right public
.PHONY: rearguard_signatures rearguard_signatures_version
.PHONY: rearguard_tarballs rearguard_tarballs_version
.PHONY: right_only right_posix signatures signatures_version
@


1.1.1.23
log
@Import tzdata2018h from ftp://ftp.iana.org/tz/releases/tzdata2018h.tar.gz

Summary of changes in tzdata2018h (2018-12-23 17:59:32 -0800):

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla, Alaska observes PST this winter only.

    Add predictions for Iran from 2038 through 2090.

    Changes to some old timestamps for Nauru (1979) Guam (1959-77),
    Hong Kong (1904, 1941, 1945, 1952) (others in Pacific during WWII)
@
text
@a382 3
# Name of curl <https://curl.haxx.se/>, used for HTML validation.
CURL=		curl

d384 1
a384 1
# validating HTML 4.01.  The default should work on both Debian and Red Hat.
d391 1
a391 1
# The name, arguments and environment of a program to validate HTML 4.01.
a490 1
CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
d802 3
a804 9
check_web:	$(CHECK_WEB_PAGES)
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
check_tz-art.html check_tz-link.html:
		$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		    -F file=@@$$(expr $@@ : 'check_\(.*\)') -o $@@.out && \
		  test ! -s $@@.out || { cat $@@.out; exit 1; }
		mv $@@.out $@@
check_tz-how-to.html: tz-how-to.html
d1071 1
a1071 1
.PHONY: check_web check_zishrink
@


1.1.1.24
log
@Import tzdata2019a from ftp://ftp.iana.org/tz/releases/tzdata2019a.tar.gz

Release 20198 - 2019-03-25 22:01:33 -0700

  Briefly:
    Palestine summer time starts on 2019-03-30 instead of 2019-03-23.
    Metlakatla switched back to rejoin Alaska Time on 2019-01-20 at 02:00.

    Israel observed summer time in 1980 (08-02/09-13) and 1984 (05-05/08-25).

    Etc/UCT is now a backward-compatibility link to Etc/UTC, instead
    of being a separate zone that generates the abbreviation "UCT".
@
text
@d15 1
a15 4
# DATAFORM selects the data format.
# Available formats represent essentially the same data, albeit
# possibly with minor discrepancies that users are not likely to notice.
# To get new features and the best data right away, use:
d36 1
a36 1
# for handling ruleless POSIX-style timezone environment variables,
d39 2
a40 2
# A ruleless environment setting like TZ='CST6CDT' uses the rules in the
# template file to determine "spring forward" and "fall back" days and
d49 1
d116 2
a117 2
# What kind of TZif data files to generate.  (TZif is the binary time
# zone data format that zic generates; see Internet RFC 8536.)
a362 3
# To shrink the size of installed TZif files,
# append "-r @@N" to omit data before N-seconds-after-the-Epoch.
# See the zic man page for more about -r.
d494 1
a494 2
CHECK_WEB_PAGES=check_theory.html check_tz-art.html \
			check_tz-how-to.html check_tz-link.html
a806 1
check_theory.html: theory.html
d809 1
a809 1
check_theory.html check_tz-art.html check_tz-link.html:
a842 1
		rm -fr check_*.dir
d847 1
a847 2
		rm -fr *.dir tzdb-*/
		rm -f *.zi $(TZS_NEW)
@


1.1.1.24.2.1
log
@Pull up the following revisions, requested by kre in ticket #468:

	external/public-domain/tz/dist/Makefile 	up to 1.1.1.25
	external/public-domain/tz/dist/NEWS		up to 1.1.1.28
	external/public-domain/tz/dist/TZDATA_VERSION	up to 1.18
	external/public-domain/tz/dist/africa		up to 1.1.1.21
	external/public-domain/tz/dist/antarctica	up to 1.1.1.12
	external/public-domain/tz/dist/asia		up to 1.1.1.24
	external/public-domain/tz/dist/australasia	up to 1.1.1.18
	external/public-domain/tz/dist/backzone 	up to 1.1.1.17
	external/public-domain/tz/dist/checktab.awk	up to 1.1.1.10
	external/public-domain/tz/dist/europe		up to 1.1.1.25
	external/public-domain/tz/dist/factory		up to 1.1.1.4
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.12
	external/public-domain/tz/dist/leapseconds	up to 1.1.1.14
	external/public-domain/tz/dist/leapseconds.awk	up to 1.1.1.9
	external/public-domain/tz/dist/northamerica	up to 1.1.1.24
	external/public-domain/tz/dist/pacificnew	up to 1.1.1.3
	external/public-domain/tz/dist/southamerica	up to 1.1.1.16
	external/public-domain/tz/dist/systemv		up to 1.1.1.3
	external/public-domain/tz/dist/theory.html	up to 1.1.1.9
	external/public-domain/tz/dist/version		up to 1.1.1.15
	external/public-domain/tz/dist/zishrink.awk	up to 1.1.1.6
	external/public-domain/tz/dist/zone.tab 	up to 1.1.1.17
	external/public-domain/tz/dist/zone1970.tab	up to 1.1.1.19
	external/public-domain/tz/dist/zoneinfo2tdf.pl	up to 1.1.1.3
	doc/3RDPARTY					1.1655 (patch)

Import tzdata2019c from ftp://ftp.iana.org/tz/releases/tzdata2019c.tar.gz

Summary of changes in tzdata2019c (2019-09-11 08:59:48 -0700):
	Fiji observes DST from 2019-11-10 to 2020-01-12
	Norfolk Island starts observing Australian-style DST

	Plus historic corrections to time in Turkey (1940-85)
	South Korea (1948-51) Detroit (US) (1967-8), Perry County
	(Indiana, US) (pre 1970) Edmonton (CA) (1967, 1969)
	Vancouver (CA) (1946), Vienna (AT) (1946), Kaliningrad (1945-6).
	Louisville (US) (1946-50).  Brussles (BE) (1892).
	Hong Kong Winter Time (1941) now listed as being "DST".

Summary of changes in tzdata2019b (2019-07-01 00:09:53 -0700):

	Brazil no longer observes DST
	Predictions for Morocco extended to 2087.
	Panestine (March 2019) time zone change date corrected
	(and guesses for future transitions revised).

	Historic updates:  Honk Kong (1941 - 1947), Italy (1866).
@
text
@d38 2
a39 4
# The POSIXRULES macro controls interpretation of nonstandard and obsolete
# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules.
# In the reference implementation, if you want something other than Eastern
# United States time as a template for handling these settings, you can
d42 1
a42 1
# A setting like TZ='EET-2EEST' is supposed to use the rules in the
a51 11
#
# If POSIXRULES is empty, no template is installed; this is the intended
# future default for POSIXRULES.
#
# Nonempty POSIXRULES is obsolete and should not be relied on, because:
# * It does not work correctly in popular implementations such as GNU/Linux.
# * It does not work in the tzdb implementation for timestamps after 2037.
# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions
#   at standard time or UT rather than at local time.
# In short, software should avoid ruleless settings like TZ='EET-2EEST'
# and so should not depend on the value of POSIXRULES.
a233 7
#  -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and
#	similarly for "fat".  Fat TZif files work around incompatibilities
#	and bugs in some TZif readers, notably readers that mishandle 64-bit
#	data in TZif files.  Slim TZif files are more efficient and do not
#	work around these incompatibilities and bugs.  If not given, the
#	current default is "fat" but this is intended to change as readers
#	requiring fat files often mishandle timestamps after 2037 anyway.
d367 1
a367 3
# You can also append "-b slim" if that is not already the default;
# see ZIC_BLOAT_DEFAULT above.
# See the zic man page for more about -b and -r.
a390 3
# Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions.
GPG=		gpg

d565 1
a565 3
		$(ZIC_INSTALL) -l $(LOCALTIME) \
			`case '$(POSIXRULES)' in ?*) echo '-p';; esac \
			` $(POSIXRULES) \
d784 6
d1054 1
a1054 1
		$(GPG) --armor --detach-sign $?
@


1.1.1.24.2.2
log
@Pull up the following, requested by kre in ticket #942:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.26
	external/public-domain/tz/dist/NEWS             up to 1.1.1.29
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.19
	external/public-domain/tz/dist/africa           up to 1.1.1.22
	external/public-domain/tz/dist/asia             up to 1.1.1.25
	external/public-domain/tz/dist/backward         up to 1.1.1.11
	external/public-domain/tz/dist/backzone         up to 1.1.1.18
	external/public-domain/tz/dist/europe           up to 1.1.1.26
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.13
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.15
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.10
	external/public-domain/tz/dist/northamerica     up to 1.1.1.25
	external/public-domain/tz/dist/theory.html      up to 1.1.1.10
	external/public-domain/tz/dist/version          up to 1.1.1.16
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.18
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.20
	doc/3RDPARTY					(apply patch)
	distrib/sets/lists/base/mi			(apply patch)

Import tzdata2020a from ftp://ftp.iana.org/tz/releases/tzdata2020a.tar.gz

Summary of changes in tzdata2020a (2020-04-23 16:03:47 -0700):

    Morocco resumes summer time on 2020-05-31, not 2020-05-24.
    Canada's Yukon advanced to -07 year-round on 2020-03-08 (summer time
      will not end this year)..
    America/Nuuk renamed from America/Godthab (both names now exist).
@
text
@a152 9
# Whether to put an "Expires" line in the leapseconds file.
# Use EXPIRES_LINE=1 to put the line in, 0 to omit it.
# The EXPIRES_LINE value matters only if REDO's value contains "right".
# If you change EXPIRES_LINE, remove the leapseconds file before running "make".
# zic's support for the Expires line was introduced in tzdb 2020a,
# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file
# can be given to older zic implementations.
EXPIRES_LINE=	0

d298 2
a299 3
# #	-DHAVE_TZNAME=0 # do not support "tzname"
# #	-DHAVE_TZNAME=1 # support "tzname", which is defined by system library
# #	-DHAVE_TZNAME=2 # support and define "tzname"
d307 2
a308 3
# #	-DUSG_COMPAT=0 # do not support
# #	-DUSG_COMPAT=1 # support, and variables are defined by system library
# #	-DUSG_COMPAT=2 # support and define variables
d314 1
a314 3
# #	-DALTZONE=0 # do not support
# #	-DALTZONE=1 # support "altzone", which is defined by system library
# #	-DALTZONE=2 # support and define "altzone"
a316 1
# # If not defined, the code attempts to guess ALTZONE from other macros.
d324 3
a326 1
# "tzsetwall" is deprecated and is intended to be removed soon; see NEWS.
d336 1
d508 2
a509 2
LIBSRCS=	localtime.c asctime.c difftime.c strftime.c
LIBOBJS=	localtime.o asctime.o difftime.o strftime.o
d512 1
a512 1
NEWUCBSRCS=	date.c
d654 1
a654 2
		$(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \
		  -f leapseconds.awk leap-seconds.list >$@@.out
@


1.1.1.24.2.3
log
@Pull up the following, requested by kre in #1108:

	external/public-domain/tz/dist/systemv          delete
	external/public-domain/tz/dist/pacificnew       delete
	external/public-domain/tz/dist/yearistype.sh    delete
	external/public-domain/tz/dist/Makefile         up to 1.1.1.27
	external/public-domain/tz/dist/NEWS             up to 1.1.1.30
	external/public-domain/tz/dist/README           up to 1.1.1.9
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.20
	external/public-domain/tz/dist/africa           up to 1.1.1.23
	external/public-domain/tz/dist/antarctica       up to 1.1.1.13
	external/public-domain/tz/dist/asia             up to 1.1.1.26
	external/public-domain/tz/dist/australasia      up to 1.1.1.19
	external/public-domain/tz/dist/backzone         up to 1.1.1.19
	external/public-domain/tz/dist/europe           up to 1.1.1.27
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.14
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.16
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.11
	external/public-domain/tz/dist/northamerica     up to 1.1.1.26
	external/public-domain/tz/dist/southamerica     up to 1.1.1.17
	external/public-domain/tz/dist/theory.html      up to 1.1.1.11
	external/public-domain/tz/dist/version          up to 1.1.1.17
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.7
	external/public-domain/tz/dist/zoneinfo2tdf.pl  up to 1.1.1.4
	external/public-domain/tz/share/zoneinfo/Makefile	1.4
	distrib/sets/lists/base/mi			1.1266
	doc/3RDPARTY					1.1750 (patch)

Import tzdata2020b:
  Revised predictions for Morocco's changes starting in 2023.
  Canada's Yukon changes to -07 on 2020-11-01, not 2020-03-08.
  Macquarie Island has stayed in sync with Tasmania since 2011.
  Casey, Antarctica is at +08 in winter and +11 in summer.
@
text
@a24 1
# Rearguard users might also want "ZFLAGS = -b fat"; see below.
d30 2
a31 1
# 'zic -l -' to remove it, or 'zic -l rightzone' to change it.
d40 14
a53 3
# Such a setting uses the rules in a template file to determine
# "spring forward" and "fall back" days and times; the environment
# variable itself specifies UT offsets of standard and daylight saving time.
d55 2
a56 1
# If POSIXRULES is '-', no template is installed; this is the default.
d58 1
a58 1
# Any other value for POSIXRULES is obsolete and should not be relied on, as:
a64 9
#
# If, despite the above, you want a template for handling these settings,
# you can change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
# 'zic -p -' to remove it, or 'zic -p rightzone' to change it.
# Use the command
#	make zonenames
# to get a list of the values you can use for POSIXRULES.
d66 1
a66 1
POSIXRULES=	-
d175 3
d195 4
d256 2
a257 2
#  -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and
#	similarly for "slim".  Fat TZif files work around incompatibilities
d261 2
a262 1
#	default is "slim".
d336 1
a336 1
# "offtime", "timelocal", "timegm", "timeoff",
d338 1
d398 1
a398 1
# To grow the files and work around older application bugs, append "-b fat";
d427 20
d541 2
a542 2
NDATA=		factory
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward
d550 1
a550 1
			leapseconds $(ZONETABLES)
d576 2
a577 1
		private.h southamerica strftime.c theory.html \
d580 2
a581 1
		workman.sh zdump.8 zdump.c zic.8 zic.c \
d590 1
a590 1
all:		tzselect zic zdump libtz.a $(TABDATA) \
d660 4
d678 1
d681 1
a681 1
INSTALL_DATA_DEPS = zic leapseconds tzdata.zi
d796 1
a796 1
			leapseconds zone.tab && \
a847 1
check_tz-how-to.html: tz-how-to.html
d849 1
a849 1
check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html:
d854 3
d886 1
a886 1
		  date tzselect version.h zdump zic libtz.a
@


1.1.1.24.2.4
log
@Pull up the following, requested by kre in ticket #1116:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.28
	external/public-domain/tz/dist/NEWS             up to 1.1.1.31
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.21
	external/public-domain/tz/dist/australasia      up to 1.1.1.20
	external/public-domain/tz/dist/europe           up to 1.1.1.28
	external/public-domain/tz/dist/version          up to 1.1.1.18
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.5
	doc/3RDPARTY					(apply patch)

Import tzdata2020c:

Release 2020c - 2020-10-16 11:15:53 -0700

    Fiji starts DST later than usual, on 2020-12-20.
@
text
@a1024 3
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		touch -md 2020-10-12T22:53:00Z \
		  tzdata$(VERSION)-rearguard.dir/pacificnew
d1028 1
a1028 2
		   tar $(TARFLAGS) -cf - \
			$(COMMON) $(DATA) $(MISC) pacificnew | \
@


1.1.1.24.2.5
log
@Pull up the following, requested by kre in ticket #1122:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.29
	external/public-domain/tz/dist/NEWS             up to 1.1.1.32
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.22
	external/public-domain/tz/dist/asia             up to 1.1.1.27
	external/public-domain/tz/dist/europe           up to 1.1.1.29
	external/public-domain/tz/dist/version          up to 1.1.1.19
	doc/3RDPARTY					(apply patch)

Update tzdata to 2020d
@
text
@d1026 1
a1026 1
		TZ=UTC0 touch -mt 202010122253.00 \
@


1.1.1.24.2.6
log
@Pull up the following, requested by kre in ticket #1243:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.30
	external/public-domain/tz/dist/NEWS             up to 1.1.1.34
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.24
	external/public-domain/tz/dist/africa           up to 1.1.1.25
	external/public-domain/tz/dist/asia             up to 1.1.1.28
	external/public-domain/tz/dist/australasia      up to 1.1.1.21
	external/public-domain/tz/dist/backward         up to 1.1.1.12
	external/public-domain/tz/dist/backzone         up to 1.1.1.20
	external/public-domain/tz/dist/etcetera         up to 1.1.1.5
	external/public-domain/tz/dist/europe           up to 1.1.1.30
	external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.15
	external/public-domain/tz/dist/leapseconds      up to 1.1.1.18
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.12
	external/public-domain/tz/dist/northamerica     up to 1.1.1.27
	external/public-domain/tz/dist/theory.html      up to 1.1.1.12
	external/public-domain/tz/dist/version          up to 1.1.1.21
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.6
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.19
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.21
	doc/3RDPARTY					apply patch

Import tzdata2020f from ftp://ftp.iana.org/tz/releases/tzdata2020f.tar.gz

Release 2020f - 2020-12-29 00:17:46 -0800

    No changes to tzdata, just to a part of the build procedure
    not used on NetBSD

Release 2020e - 2020-12-22 15:14:34 -0800

    Volgograd switched to Moscow time on 2020-12-27 at 02:00.

    Correct many pre-1986 transitions, fixing entries originally
    derived from Shanks.  The fixes include changes to:
      Australia, Bahamas, Bermuda, Belize, Ghana, Israel and Palestine,
      Kenya and adjacent, Nigeria and adjacent, Seychelles, Vanuatu

    Australia/Currie has been moved to the 'backward' file and its
    corrected data moved to the 'backzone' file.

    To better match legislation in Turks and Caicos, the 2015 shift to
    year-round observance of -04 is now modeled as AST throughout before
    returning to Eastern Time with US DST in 2018, rather than as
    maintaining EDT until 2015-11-01.
@
text
@a585 4
# Calculate version number from git, if available.
# Otherwise, use $(VERSION) unless it is "unknown" and there is already
# a 'version' file, in which case reuse the existing 'version' contents
# and append "-dirty" if the contents do not already end in "-dirty".
d590 1
a590 5
		  if test '$(VERSION)' = unknown && V=`cat $@@`; then \
		    case $$V in *-dirty);; *) V=$$V-dirty;; esac; \
		  else \
		    V='$(VERSION)'; \
		  fi; } && \
a874 23
# Set file timestamps deterministically if possible,
# so that tarballs containing the timestamps are reproducible.
#
# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the
# file DEST to the maximum of the timestamps of the files A B C ...,
# plus N if GNU ls and touch are available.
SET_TIMESTAMP_N = sh -c '\
  n=$$0 dest=$$1; shift; \
  touch -cmr `ls -t "$$@@" | sed 1q` "$$dest" && \
  if test $$n != 0 && \
     lsout=`ls -n --time-style="+%s" "$$dest" 2>/dev/null`; then \
    set x $$lsout && \
    touch -cmd @@`expr $$7 + $$n` "$$dest"; \
  else :; fi'
# If DEST depends on A B C ... in this Makefile, callers should use
# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any
# downstream 'make' that considers equal timestamps to be out of date.
# POSIX allows this 'make' behavior, and HP-UX 'make' does it.
# If all that matters is that the timestamp be reproducible
# and plausible, use $(SET_TIMESTAMP).
SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0
SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1

d877 3
a879 3
# This uses GNU 'ls --time-style=+%s', which outputs the seconds count,
# and GNU 'touch -d@@N FILE', where N is the number of seconds since 1970.
# If git or GNU is absent, don't bother to sync with git timestamps.
d897 1
a897 1
		$(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS)
d899 1
a899 1
		  $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \
d902 2
a903 2
		$(SET_TIMESTAMP_DEP) version $(VERSION_DEPS)
		$(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS)
d906 1
a906 1
		$(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS)
d917 1
a917 4
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \
		    public.dir/vanguard.zi public.dir/main.zi \
		    public.dir/rearguard.zi; \
		do \
d984 1
a984 1
		$(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@@_version
d1021 1
a1021 1
		  $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \
d1040 1
a1040 1
		$(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/*
d1082 2
@


1.1.1.24.2.7
log
@Pull up the following, requested by kre in ticket #1546:
Catch up to -current of external/public-domain/tz/dist and apply corresponding
patches to distrib/sets/lists/base/mi and doc/3RDPARTY:

	external/public-domain/tz/dist/SECURITY         up to 1.1.1.1
	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.7
	external/public-domain/tz/dist/Makefile         up to 1.1.1.33
	external/public-domain/tz/dist/NEWS             up to 1.1.1.38
	external/public-domain/tz/dist/README           up to 1.1.1.10
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
	external/public-domain/tz/dist/africa           up to 1.1.1.28
	external/public-domain/tz/dist/antarctica       up to 1.1.1.15
	external/public-domain/tz/dist/asia             up to 1.5
	external/public-domain/tz/dist/australasia      up to 1.5
	external/public-domain/tz/dist/backward         up to 1.5
	external/public-domain/tz/dist/backzone         up to 1.1.1.23
	external/public-domain/tz/dist/calendars        up to 1.1.1.2
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.11
	external/public-domain/tz/dist/etcetera         up to 1.1.1.6
	external/public-domain/tz/dist/europe           up to 1.1.1.34
	external/public-domain/tz/dist/leap-seconds.list up to 1.4
	external/public-domain/tz/dist/leapseconds      up to 1.4
	external/public-domain/tz/dist/northamerica     up to 1.1.1.30
	external/public-domain/tz/dist/southamerica     up to 1.1.1.20
	external/public-domain/tz/dist/theory.html      up to 1.1.1.15
	external/public-domain/tz/dist/version          up to 1.5
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.9
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.8
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.22
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.23
	distrib/sets/lists/base/mi			(apply patch)
	doc/3RDPARTY					(apply patch)

Update timezone data to 2022e.
@
text
@d36 1
a36 1
LOCALTIME=	Factory
d48 3
a50 3
# * It does not work even in tzcode, except for historical timestamps
#   that precede the last explicit transition in the POSIXRULES file.
#   Hence it typically does not work for current and future timestamps.
d125 2
a126 2
TIME_T_ALTERNATIVES_HEAD = int_least64_t
TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t
d155 2
a156 4
# and was modified in tzdb 2021b to generate version 4 TZif files.
# EXPIRES_LINE defaults to 0 for now so that the leapseconds file
# can be given to pre-2020a zic implementations and so that TZif files
# built by newer zic implementations can be read by pre-2021b libraries.
d177 1
a177 2
# If you want out-of-scope and often-wrong data from the file 'backzone',
# but only for entries listed in the backward-compatibility file zone.tab, use
a178 4
#	PACKRATLIST=	zone.tab
# If you want all the 'backzone' data, use
#	PACKRATDATA=	backzone
#	PACKRATLIST=
a180 1
#	PACKRATLIST=
a182 1
PACKRATLIST=
a212 1
#  -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure.
d223 1
a259 1
# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow.
d264 1
a264 1
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \
a265 1
  -Wduplicated-branches -Wduplicated-cond \
d267 1
a267 1
  -Winit-self -Wlogical-op \
a268 1
  -Wnull-dereference \
d270 1
a270 2
  -Wshadow -Wshift-overflow=2 -Wstrict-overflow \
  -Wstrict-prototypes -Wstringop-overflow=4 \
d275 1
a275 1
  -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \
d288 2
a289 3
# and define NO_TM_ZONE to suppress any guessing.  Although these two fields
# not required by POSIX, a future version of POSIX is planned to require them
# and they are widely available on GNU/Linux and BSD systems.
d396 3
a398 4
# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work.
# Also, it is better (though not essential) if 'awk' supports UTF-8,
# and unfortunately mawk and busybox awk do not support UTF-8.
# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems.
a443 3
# Put this in a bracket expression to match spaces.
s = [:space:]

d463 1
a463 3
GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \
  --numeric-owner --owner=0 --group=0 \
  --mode=go+u,go-w --sort=name
d501 1
a501 1
			NEWS README SECURITY theory.html version
d515 2
a516 3
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) \
		  $(PACKRATDATA) $(PACKRATLIST)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA) $(PACKRATLIST)
d521 1
a521 1
MISC=		$(AWK_SCRIPTS)
d526 1
a526 1
TZS_DEPS=	$(YDATA) asctime.c localtime.c \
a527 1
TZDATA_DIST = $(COMMON) $(DATA) $(MISC)
d529 1
a529 1
EIGHT_YARDS = $(TZDATA_DIST) $(DOCS) $(SOURCES) tzdata.zi
d536 1
a536 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README SECURITY \
d549 1
a549 1
		zone.tab zone1970.tab
d602 1
a602 1
# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST.
d604 1
a604 5
		$(AWK) \
		  -v DATAFORM=`expr $@@ : '\(.*\).zi'` \
		  -v PACKRATDATA='$(PACKRATDATA)' \
		  -v PACKRATLIST='$(PACKRATLIST)' \
		  -f ziguard.awk \
d608 1
a608 1
# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO.
a645 1
 PACKRATLIST='$(PACKRATLIST)' \
d684 5
d739 1
a739 1
			-e 's|AWK=[^}]*|AWK='\''$(AWK)'\''|g' \
d749 2
a750 2
		  check_name_lengths check_slashed_abbrs check_sorted \
		  check_tables check_web check_ziguard check_zishrink check_tzs
d760 1
a760 1
			CONTRIBUTING LICENSE README SECURITY \
d774 1
a774 1
		! grep -n '[$s]$$' \
d778 3
a780 2
PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+
FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15}
a786 10
PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+
STDOFF = [-+]?[0-9:.]+
RULELESS_SAVE = (-|$(STDOFF)[sd]?)
RULELESS_SLASHED_ABBRS = \
  $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/

check_slashed_abbrs: $(TDATA_TO_CHECK)
		! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
		touch $@@

d799 1
a799 1
check_tables:	checktab.awk $(YDATA) backward $(ZONETABLES)
d801 1
a801 2
		  test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \
		  $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \
a824 7
check_ziguard: rearguard.zi vanguard.zi ziguard.awk
		$(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \
		  diff -u rearguard.zi -
		$(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \
		  diff -u vanguard.zi -
		touch $@@

d829 1
a829 2
  zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \
  $(TDATA) $(DATAFORM).zi tzdata.zi
d838 2
a839 2
		  case $(DATAFORM),$(PACKRATLIST) in \
		    main,) \
a954 10
		:
		: Also check 'backzone' syntax.
		rm public.dir/main.zi
		cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi
		public.dir/zic -d public.dir/zoneinfo main.zi
		rm public.dir/main.zi
		cd public.dir && \
		  $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi
		public.dir/zic -d public.dir/zoneinfo main.zi
		:
d967 1
a967 1
		  int*32_t) range=-2147483648,2147483648;; \
d1014 1
a1014 1
tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \
d1016 1
a1016 1
  version set-timestamps.out rearguard.zi vanguard.zi
a1028 2
tailored_tarballs_version: \
  tzdata$(VERSION)-tailored.tar.gz
d1042 1
a1042 1
		tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \
a1045 7
# Create empty files with a reproducible timestamp.
CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00

# The obsolescent *rearguard* targets and related macros are present
# for backwards compatibility with tz releases 2018e through 2022a.
# They should go away eventually.  To build rearguard tarballs you
# can instead use 'make DATAFORM=rearguard tailored_tarballs'.
d1047 5
a1051 4
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(TZDATA_DIST) $@@.dir
		cd $@@.dir && rm -f $(TDATA) $(PACKRATDATA) version
d1053 1
a1053 1
		  rearf=$@@.dir/$$f; \
d1057 2
a1058 1
		sed '1s/$$/-rearguard/' <version >$@@.dir/version
d1060 3
a1062 2
		$(CREATE_EMPTY) $@@.dir/pacificnew
		touch -cmr version $@@.dir/version
d1064 1
a1064 1
		  (cd $@@.dir && \
d1066 1
a1066 1
			$(TZDATA_DIST) pacificnew | \
a1069 38
# Create a tailored tarball suitable for TZUpdater and compatible tools.
# For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball
# useful for testing whether TZUpdater supports vanguard form.
# The generated tarball is not byte-for-byte equivalent to a hand-tailored
# traditional tarball, as data entries are put into 'etcetera' even if they
# came from some other source file.  However, the effect should be the same
# for ordinary use, which reads all the source files.
tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
		rm -fr $@@.dir
		mkdir $@@.dir
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		cd $@@.dir && \
		  $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \
		  `test $(DATAFORM) = vanguard || echo pacificnew`
		(grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \
		  >$@@.dir/etcetera
		touch -cmr tzdata.zi $@@.dir/etcetera
		sed -n \
		  -e '/^# *version  *\(.*\)/h' \
		  -e '/^# *ddeps  */H' \
		  -e '$$!d' \
		  -e 'g' \
		  -e 's/^# *version  *//' \
		  -e 's/\n# *ddeps  */-/' \
		  -e 's/ /-/g' \
		  -e 'p' \
		  <tzdata.zi >$@@.dir/version
		touch -cmr version $@@.dir/version
		links= && \
		  for file in $(TZDATA_DIST); do \
		    test -f $@@.dir/$$file || links="$$links $$file"; \
		  done && \
		  ln $$links $@@.dir
		LC_ALL=C && export LC_ALL && \
		  (cd $@@.dir && \
		   tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

d1121 1
a1121 1
.PHONY: posix_only posix_right public
a1127 1
.PHONY: tailored_tarballs tailored_tarballs_version
@


1.1.1.24.2.8
log
@Pull up the following, requested by kre in ticket #1782:

	external/public-domain/tz/dist/checknow.awk     up to 1.1.1.1
	external/public-domain/tz/dist/zonenow.tab      up to 1.1.1.1
	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.8
	external/public-domain/tz/dist/Makefile         up to 1.1.1.37
	external/public-domain/tz/dist/NEWS             up to 1.1.1.44
	external/public-domain/tz/dist/README           up to 1.1.1.11
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.36
	external/public-domain/tz/dist/africa           up to 1.1.1.32
	external/public-domain/tz/dist/antarctica       up to 1.1.1.18
	external/public-domain/tz/dist/asia             up to 1.11
	external/public-domain/tz/dist/australasia      up to 1.8
	external/public-domain/tz/dist/backward         up to 1.11
	external/public-domain/tz/dist/backzone         up to 1.1.1.27
	external/public-domain/tz/dist/checklinks.awk   up to 1.1.1.4
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.13
	external/public-domain/tz/dist/etcetera         up to 1.1.1.7
	external/public-domain/tz/dist/europe           up to 1.1.1.38
	external/public-domain/tz/dist/iso3166.tab      up to 1.1.1.9
	external/public-domain/tz/dist/leap-seconds.list up to 1.6
	external/public-domain/tz/dist/leapseconds      up to 1.6
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.13
	external/public-domain/tz/dist/northamerica     up to 1.1.1.34
	external/public-domain/tz/dist/southamerica     up to 1.1.1.24
	external/public-domain/tz/dist/theory.html      up to 1.1.1.18
	external/public-domain/tz/dist/version          up to 1.11
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.10
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.26
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.27
	distrib/sets/lists/base/mi			(apply patch)
	doc/3RDPARTY					(apply patch)

Update tzdata to 2023d.
@
text
@d2 1
a4 19
# Request POSIX conformance; this must be the first non-comment line.
.POSIX:
# On older platforms you may need to scrounge for a POSIX-conforming 'make'.
# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or
# /usr/xpg4/bin/make, not /usr/ccs/bin/make.

# To affect how this Makefile works, you can run a shell script like this:
#
#	#!/bin/sh
#	make CC='gcc -std=gnu11' "$@@"
#
# This example script is appropriate for a pre-2017 GNU/Linux system
# where a non-default setting is needed to support this package's use of C99.
#
# Alternatively, you can simply edit this Makefile to tailor the following
# macro definitions.

###############################################################################
# Start of macros that one plausibly might want to tailor.
d38 6
a43 2
# The POSIXRULES macro controls interpretation of POSIX-like TZ
# settings like TZ='EET-2EEST' that lack DST transition rules.
d45 1
d51 3
d66 1
a66 1
# if POSIXRULES is '-' or if the template file cannot be accessed.
a198 1
# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0.
d201 2
a202 3
# Add the following to an uncommented "CFLAGS=" line as needed
# to override defaults specified in the source code or by the system.
# "-DFOO" is equivalent to "-DFOO=1".
a210 1
#  -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm
d212 2
a213 6
#  -DHAVE__GENERIC=0 if _Generic does not work*
#  -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux),
#	-DHAVE_GETRANDOM=0 to avoid using getrandom
#  -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris),
#	where LDLIBS also needs to contain -lintl on some hosts;
#	-DHAVE_GETTEXT=0 to avoid using gettext
d217 1
a217 1
#  -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+
d225 3
a227 5
#  -DHAVE_SETENV=0 if your system lacks the setenv function
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+
#  -DHAVE_STDCKDINT_H=0 if neither <stdckdint.h> nor substitutes like
#	__builtin_add_overflow work*
#  -DHAVE_STDINT_H=0 if <stdint.h> does not work*+
d230 1
a230 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function+
d232 1
a232 1
#  -DHAVE_SYS_STAT_H=0 if <sys/stat.h> does not work*
d234 1
a234 2
#  -DHAVE_UNISTD_H=0 if <unistd.h> does not work*
#  -DHAVE_UTMPX_H=0 if <utmpx.h> does not work*
a235 5
#  -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
#	Typically it is better to use a later standard.  For example,
#	with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
#	Even with -DPORT_TO_C89, the code needs at least one C99
#	feature (integers at least 64 bits wide) and maybe more.
a238 2
#  -DSUPPORT_C89 if the tzcode library should support C89 callers+
#	However, this might trigger latent bugs in C99-or-later callers.
d250 1
a250 7
#	DST transitions for POSIX-style TZ strings lacking them,
#	in the usual case where POSIXRULES is '-'.  If not specified,
#	TZDEFRULESTRING defaults to US rules for future DST transitions.
#	This mishandles some past timestamps, as US DST rules have changed.
#	It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
#	as Europe and US DST rules differ.
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255)
d257 4
a260 4
#	and bugs in some TZif readers, notably older ones that
#	ignore or otherwise mishandle 64-bit data in TZif files;
#	however, fat TZif files may trigger bugs in newer TZif readers.
#	Slim TZif files are more efficient, and are the default.
a263 4
#  -g to generate symbolic debugging info
#  -Idir to include from directory 'dir'
#  -O0 to disable optimization; other -O options to enable more optimization
#  -Uname to remove any definition of the macro 'name'
a264 5
#
# * Options marked "*" can be omitted if your compiler is C23 compatible.
# * Options marked "+" are obsolescent and are planned to be removed
#   once the code assumes C99 or later, say in the year 2029.
#
d278 1
a278 1
  -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \
d291 1
a291 1
  -Wno-type-limits
d338 3
a340 2
# to the end of the "CFLAGS=" line.  This arranges for the following
# functions to be added to the time conversion library.
d343 3
a345 2
# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone.
# "timelocal" is nearly equivalent to "mktime".
a347 1
# I.e., "timeoff" is like calling "mktime_z" with a fixed-offset zone.
d357 1
a357 1
# time library, and if STD_INSPIRED is also defined to nonzero the functions
d370 1
a370 1
# which claims to test C and POSIX conformance.  If you want to pass PCTS, add
a379 3
#
# POSIX says CFLAGS defaults to "-O 1".
# Uncomment the following line and edit its contents as needed.
d381 1
a381 1
#CFLAGS= -O 1
d383 2
d386 1
a386 8
# The name of a POSIX-like library archiver, its flags, C compiler,
# linker flags, and 'make' utility.  Ordinarily the defaults suffice.
# The commented-out values are the defaults specified by POSIX 202x/D3.
#AR = ar
#ARFLAGS = -rv
#CC = c17
#LDFLAGS =
#MAKE = make
d400 2
a401 3
# To grow the files and work around bugs in older applications,
# possibly at the expense of introducing bugs in newer ones,
# append "-b fat"; see ZIC_BLOAT_DEFAULT above.
d409 1
a409 1
# The name of a POSIX-compliant 'awk' on your system.
d416 1
a416 1
# The full path name of a POSIX-compliant shell, preferably one that supports
d420 1
a420 1
# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash
d448 7
a454 4
# These non-alphabetic, non-ASCII printable characters are Latin-1,
# and so are likely displayable even in editors like XEmacs 21
# that have limited display capabilities.
UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷
d457 1
a457 1
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)
d492 1
a492 4
# When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported.
# This makes it easier to see which Zone has been affected.
DIFF_TZS=	 diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \
			   || echo ' -F^TZ=')
d494 1
a494 2
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:
d496 2
a497 3
# POSIX prohibits defining or using SHELL.  However, csh users on systems
# that use the user shell for Makefile commands may need to define SHELL.
#SHELL=		/bin/sh
d499 1
a499 2
# End of macros that one plausibly might want to tailor.
###############################################################################
d501 2
d532 1
a532 1
ZONETABLES=	zone.tab zone1970.tab zonenow.tab
d540 1
a540 1
AWK_SCRIPTS=	checklinks.awk checknow.awk checktab.awk leapseconds.awk \
d561 1
a561 1
		checklinks.awk checknow.awk checktab.awk \
d571 6
a576 1
		zone.tab zone1970.tab zonenow.tab
a645 10
tzdir.h:
		printf '%s\n' >$@@.out \
		  '#ifndef TZDEFAULT' \
		  '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \
		  '#endif' \
		  '#ifndef TZDIR' \
		  '# define TZDIR "$(TZDIR)" /* TZif directory */' \
		  '#endif'
		mv $@@.out $@@

d752 1
a752 1
		$(AR) $(ARFLAGS) $@@ $(LIBOBJS)
d760 7
a766 7
		  -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \
		  -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \
		  -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \
		  -e s\''\(REPORT_BUGS_TO\)=.*'\''\1=\'\''$(BUGEMAIL)\'\'\' \
		  -e s\''\(TZDIR\)=[^}]*'\''\1=\'\''$(TZDIR)\'\'\' \
		  -e s\''\(TZVERSION\)=.*'\''\1=\'"'$$VERSION\\''" \
		  <$@@.ksh >$@@.out
d770 2
a771 4
check: check_back check_mild
check_mild:	check_character_set check_white_space check_links \
		  check_name_lengths check_now \
		  check_slashed_abbrs check_sorted \
a773 8
# True if UTF8_LOCALE does not work;
# otherwise, false but with LC_ALL set to $(UTF8_LOCALE).
UTF8_LOCALE_MISSING = \
  { test ! '$(UTF8_LOCALE)' \
    || ! printf 'A\304\200B\n' \
         | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \
    || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; }

d775 4
a778 1
	$(UTF8_LOCALE_MISSING) || { \
a792 1
	$(UTF8_LOCALE_MISSING) || { \
d794 5
a798 4
		! grep -En "$$pat|[$s]\$$" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \
	}
	touch $@@
d820 2
a821 3
check_sorted: backward backzone
		$(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \
		  backward | LC_ALL=C sort -cu
d825 3
a827 32
check_back:	checklinks.awk $(TDATA_TO_CHECK)
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk $(TDATA_TO_CHECK)
		touch $@@

check_links:	checklinks.awk tzdata.zi
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk tzdata.zi
		touch $@@

# Check timestamps from now through 28 years from now, to make sure
# that zonenow.tab contains all sequences of planned timestamps,
# without any duplicate sequences.  In theory this might require
# 2800 years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = `./date +%s`
CHECK_NOW_FUTURE_YEARS = 28
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60
check_now:	checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@.dir
		mkdir $@@.dir
		./zic -d $@@.dir tzdata.zi
		now=$(CHECK_NOW_TIMESTAMP) && \
		  future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \
		  ./zdump -i -t $$now,$$future \
		     $$(find $$PWD/$@@.dir/????*/ -type f) \
		     >$@@.dir/zdump.tab
		$(AWK) \
		  -v zdump_table=$@@.dir/zdump.tab \
		  -f checknow.awk zonenow.tab
		rm -fr $@@.dir
d830 1
a830 1
check_tables:	checktab.awk $(YDATA) backward zone.tab zone1970.tab
d840 1
a840 1
		  $(DIFF_TZS) $(TZS) $(TZS_NEW); \
d890 1
a890 1
		rm -fr check_*.dir typecheck_*.dir
d893 1
a893 1
		  date tzdir.h tzselect version.h zdump zic libtz.a
d931 1
a931 1
  <"$$dest" && \
d933 1
a933 1
     lsout=`ls -nt --time-style="+%s" "$$@@" 2>/dev/null`; then \
d935 2
a936 8
    timestamp=`expr $$7 + $$n` && \
    echo "+ touch -md @@$$timestamp $$dest" && \
    touch -md @@$$timestamp "$$dest"; \
  else \
    newest=`ls -t "$$@@" | sed 1q` && \
    echo "+ touch -mr $$newest $$dest" && \
    touch -mr "$$newest" "$$dest"; \
  fi'
d961 2
a962 6
		      time=`TZ=UTC0 git log -1 \
			--format='tformat:%cd' \
			--date='format:%Y-%m-%dT%H:%M:%SZ' \
			$$file` && \
		      echo "+ touch -md $$time $$file" && \
		      touch -md $$time $$file; \
d987 1
a987 2
		cd public.dir \
		  && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL
d1041 1
a1041 1
		  $(DIFF_TZS) $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
d1118 1
a1118 1
		touch -mr version $@@.dir/version
d1142 1
a1142 1
		touch -mr tzdata.zi $@@.dir/etcetera
d1153 1
a1153 1
		touch -mr version $@@.dir/version
d1205 1
a1205 1
localtime.o:	private.h tzfile.h tzdir.h
d1208 1
a1208 1
zic.o:		private.h tzfile.h tzdir.h version.h
d1211 1
a1211 1
.PHONY: check check_mild check_time_t_alternatives
@


1.1.1.24.2.9
log
@Pullup the following, requested by kre in ticket #1796:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.38
	external/public-domain/tz/dist/NEWS             up to 1.1.1.45
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.37
	external/public-domain/tz/dist/africa           up to 1.1.1.33
	external/public-domain/tz/dist/asia             up to 1.12
	external/public-domain/tz/dist/australasia      up to 1.9
	external/public-domain/tz/dist/checknow.awk     up to 1.1.1.2
	external/public-domain/tz/dist/etcetera         up to 1.1.1.8
	external/public-domain/tz/dist/europe           up to 1.1.1.39
	external/public-domain/tz/dist/leap-seconds.list up to 1.7
	external/public-domain/tz/dist/leapseconds      up to 1.7
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.14
	external/public-domain/tz/dist/northamerica     up to 1.1.1.35
	external/public-domain/tz/dist/southamerica     up to 1.1.1.25
	external/public-domain/tz/dist/theory.html      up to 1.1.1.19
	external/public-domain/tz/dist/version          up to 1.12
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.9
	external/public-domain/tz/dist/zonenow.tab      up to 1.1.1.2
	doc/3RDPARTY					apply patch

Updated tzdata to 2024a
@
text
@d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ
d277 1
a277 1
#	DST transitions for POSIX.1-2017-style TZ strings lacking them,
d343 3
a345 4
# and define NO_TM_ZONE to suppress any guessing.
# Although these two fields are not required by POSIX.1-2017,
# POSIX 202x/D4 requires them and they are widely available
# on GNU/Linux and BSD systems.
d355 1
a355 1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX.1-1988 and later.
d365 2
a366 2
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI).
d430 1
a430 1
# The commented-out values are the defaults specified by POSIX.1-202x/D4.
a441 6
# Where to fetch leap-seconds.list from.
leaplist_URI = \
  https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
# The file is generated by the IERS Earth Orientation Centre, in Paris.
leaplist_TZ = Europe/Paris

d474 1
a474 2
# Name of curl <https://curl.haxx.se/>, used for HTML validation
# and to fetch leap-seconds.list from upstream.
a720 22
# Awk script to extract a Git-style author from leap-seconds.list comments.
EXTRACT_AUTHOR = \
  author_line { sub(/^.[[:space:]]*/, ""); \
      sub(/:[[:space:]]*/, " <"); \
      printf "%s>\n", $$0; \
      success = 1; \
      exit \
  } \
  /Questions or comments to:/ { author_line = 1 } \
  END { exit !success }

# Fetch leap-seconds.list from upstream.
fetch-leap-seconds.list:
		$(CURL) -OR $(leaplist_URI)

# Fetch leap-seconds.list from upstream and commit it to the local repository.
commit-leap-seconds.list: fetch-leap-seconds.list
		author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \
		date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \
		git commit --author="$$author" --date="$$date" -m'make $@@' \
		  leap-seconds.list

d1317 1
a1317 2
.PHONY: clean clean_misc commit-leap-seconds.list dummy.zd
.PHONY: fetch-leap-seconds.list force_tzs
@


1.1.1.24.2.10
log
@Pull up the following revisions, requested by kre in ticket #1940:

	external/public-domain/tz/dist/zoneinfo2tdf.pl	delete
	external/public-domain/tz/dist/CONTRIBUTING	up to 1.1.1.9
	external/public-domain/tz/dist/Makefile 	up to 1.3
	external/public-domain/tz/dist/NEWS		up to 1.3
	external/public-domain/tz/dist/TZDATA_VERSION	up to 1.41
	external/public-domain/tz/dist/africa		up to 1.2
	external/public-domain/tz/dist/antarctica	up to 1.3
	external/public-domain/tz/dist/asia		up to 1.14
	external/public-domain/tz/dist/australasia	up to 1.11
	external/public-domain/tz/dist/backward 	up to 1.12
	external/public-domain/tz/dist/backzone 	up to 1.2
	external/public-domain/tz/dist/checknow.awk	up to 1.3
	external/public-domain/tz/dist/checktab.awk	up to 1.3
	external/public-domain/tz/dist/etcetera 	up to 1.3
	external/public-domain/tz/dist/europe		up to 1.3
	external/public-domain/tz/dist/factory		up to 1.3
	external/public-domain/tz/dist/leap-seconds.list up to 1.9
	external/public-domain/tz/dist/leapseconds	up to 1.9
	external/public-domain/tz/dist/northamerica	up to 1.3
	external/public-domain/tz/dist/southamerica	up to 1.3
	external/public-domain/tz/dist/theory.html	up to 1.3
	external/public-domain/tz/dist/version		up to 1.14
	external/public-domain/tz/dist/ziguard.awk	up to 1.1.1.11
	external/public-domain/tz/dist/zone.tab 	up to 1.3
	external/public-domain/tz/dist/zone1970.tab	up to 1.3
	external/public-domain/tz/dist/zonenow.tab	up to 1.3
	distrib/sets/lists/base/mi			(apply patch)
	doc/3RDPARTY					(apply patch)

Updated tzdata to 2025b (using 2025btgz)
@
text
@d6 3
a8 3
# On older platforms you may need to scrounge for POSIX conformance.
# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007),
# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'.
d13 1
a13 1
#	make CC='gcc -std=gnu23' "$@@"
d15 2
a16 2
# This example script is appropriate for a circa 2024 GNU/Linux system
# where a non-default setting enables this package's optional use of C23.
d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-like TZ
d135 2
a136 3
TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck
TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
  uint_least64_t.ck
d139 1
a139 1
# zone data format that zic generates; see Internet RFC 9636.)
a221 1
#	on POSIX platforms predating POSIX.1-2024
d232 1
a232 1
#	ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier
a255 1
#  -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
d263 3
a265 6
#  -Dssize_t=int on hosts like MS-Windows that lack ssize_t
#  -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
#	Although -DSUPPORT_C89=0 might work around latent bugs in callers,
#	it does not conform to POSIX.
#  -DSUPPORT_POSIX2008 if the library should support older POSIX callers+
#	However, this might cause problems in POSIX.1-2024-or-later callers.
d277 1
a277 1
#	DST transitions for proleptic format TZ strings lacking them,
d283 1
a283 1
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254)
d305 1
a305 2
#   once the code assumes C99 or later (say in the year 2029)
#   and POSIX.1-2024 or later (say in the year 2034).
d312 1
a312 1
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
d316 1
a316 2
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \
  -Wdate-time \
d318 1
a318 1
  -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
d321 1
a321 2
  -Wmissing-declarations -Wmissing-prototypes \
  -Wmissing-variable-declarations -Wnested-externs \
d330 1
a330 1
  -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
d332 2
a333 1
  -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
d344 3
a346 2
# Although POSIX.1-2024 requires these fields and they are widely available
# on GNU/Linux and BSD systems, some older systems lack them.
d356 1
a356 3
# # to the "CFLAGS=" line.  Although "tzname" is required by POSIX.1-1988
# # and later, its contents are unspecified if you use a geographical TZ
# # and the variable is planned to be removed in a future POSIX edition.
d367 1
a367 3
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI),
# # although their contents are unspecified if you use a geographical TZ
# # and the variables are planned to be removed in a future edition of POSIX.
d431 1
a431 1
# The commented-out values are the defaults specified by POSIX.1-2024.
d438 5
d464 1
a464 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)'
a482 1
# Set CURL=: to disable use of the Internet.
d536 1
a536 1
GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \
d539 4
a542 7
SETUP_TAR= \
  export LC_ALL=C && \
  if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \
    TAR='tar $(GNUTARFLAGS)'; \
  else \
    TAR=tar; \
  fi
d549 2
a550 6
SETUP_DIFF_TZS = \
  if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \
    DIFF_TZS='diff -u -F^TZ='; \
  else \
    DIFF_TZS='diff -u'; \
  fi
d564 2
a565 2
TZDOBJS=	zdump.o localtime.o strftime.o
DATEOBJS=	date.o localtime.o strftime.o
d582 2
a583 1
CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck
d606 2
a607 2
TZS_DEPS=	$(YDATA) localtime.c private.h \
			strftime.c tzfile.h zdump.c zic.c
d644 2
a645 1
			-p $(POSIXRULES) \
d668 4
a671 4
		  V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty) || \
		  if test '$(VERSION)' = unknown && read -r V <$@@; then \
		    V=$${V%-dirty}-dirty; \
d681 1
a681 1
		  -v DATAFORM=$(@@:.zi=) \
d690 1
a690 1
		read -r version <version && \
d711 1
a711 1
		read -r VERSION <version && printf '%s\n' \
d751 1
a751 1
# Arguments to pass to submakes.
d756 1
d765 4
d770 1
a770 1
		$(ZIC_INSTALL) tzdata.zi
d773 2
a774 1
		$(ZIC_INSTALL) -L leapseconds tzdata.zi
d805 2
a806 1
		./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@@:.zd=)" >$@@
d815 2
a816 1
		x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
d818 1
a818 1
		     | LC_ALL=C sort -t . -k 2,2) && \
d822 1
a822 1
		$(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
d828 1
a828 1
# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the
d845 1
a845 1
		read -r VERSION <version && sed \
d856 5
a860 5
check: check_mild back.ck now.ck
check_mild: check_web check_zishrink \
  character-set.ck white-space.ck links.ck mainguard.ck \
  name-lengths.ck slashed-abbrs.ck sorted.ck \
  tables.ck ziguard.ck tzs.ck
d868 1
a868 1
    || { export LC_ALL='$(UTF8_LOCALE)'; false; }; }
d870 1
a870 1
character-set.ck: $(ENCHILADA)
d885 1
a885 1
white-space.ck: $(ENCHILADA)
d887 1
a887 2
		enchilada='$(ENCHILADA)' && \
		patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \
d889 1
a889 2
		    $${enchilada%leap-seconds.list*} \
		    $${enchilada#*leap-seconds.list}; \
d896 2
a897 2
name-lengths.ck: $(TDATA_TO_CHECK) backzone
		:;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
a900 5
mainguard.ck: main.zi
		test '$(PACKRATLIST)' || \
		  cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi
		touch $@@

d907 2
a908 2
slashed-abbrs.ck: $(TDATA_TO_CHECK)
		:;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
d913 1
a913 1
sorted.ck: backward backzone
d916 1
a916 1
		$(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu
d919 1
a919 1
back.ck: checklinks.awk $(TDATA_TO_CHECK)
d925 1
a925 1
links.ck: checklinks.awk tzdata.zi
d934 2
a935 2
# 2800+ years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = $$(./date +%s)
d937 5
a941 5
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60
now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@d
		mkdir $@@d
		./zic -d $@@d tzdata.zi
d943 1
a943 1
		  future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \
d945 2
a946 6
		     $$(find "$$PWD/$@@d"/????*/ -type f) \
		     >$@@d/zdump-now.tab && \
		  ./zdump -i -t 0,$$future \
		     $$(find "$$PWD/$@@d" -name Etc -prune \
			  -o -type f ! -name '*.tab' -print) \
		     >$@@d/zdump-1970.tab
d948 1
a948 1
		  -v zdump_table=$@@d/zdump-now.tab \
d950 1
a950 7
		$(AWK) \
		  'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \
		  $(PRIMARY_YDATA) backward factory | \
		 $(AWK) \
		   -v zdump_table=$@@d/zdump-1970.tab \
		   -f checknow.awk
		rm -fr $@@d
d953 1
a953 1
tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab
d961 1
a961 1
tzs.ck: $(TZS) $(TZS_NEW)
d963 1
a963 1
		  $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \
d970 7
a976 5
.SUFFIXES: .ck .html
.html.ck:
		{ ! ($(CURL) --version) >/dev/null 2>&1 || \
		    $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		          -F file=@@$<; } >$@@.out && \
d980 1
a980 1
ziguard.ck: rearguard.zi vanguard.zi ziguard.awk
d989 2
a990 2
check_zishrink: zishrink-posix.ck zishrink-right.ck
zishrink-posix.ck zishrink-right.ck: \
d993 2
a994 2
		rm -fr $@@d t-$@@d shrunk-$@@d
		mkdir $@@d t-$@@d shrunk-$@@d
d996 1
a996 1
		  *right*) leap='-L leapseconds';; \
d999 2
a1000 2
		  $(ZIC) $$leap -d $@@d $(DATAFORM).zi && \
		  $(ZIC) $$leap -d shrunk-$@@d tzdata.zi && \
d1003 1
a1003 1
		      $(ZIC) $$leap -d t-$@@d $(TDATA) && \
d1005 2
a1006 2
			$(ZIC) $$leap -d t-$@@d - $(PACKRATDATA) && \
		      diff -r $@@d t-$@@d;; \
d1008 2
a1009 2
		diff -r $@@d shrunk-$@@d
		rm -fr $@@d t-$@@d shrunk-$@@d
d1013 3
a1015 2
		rm -fr *.ckd *.dir
		rm -f *.ck *.core *.o *.out core core.* \
d1018 1
a1018 1
		rm -fr tzdb-*/
d1029 1
a1029 1
public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \
d1043 1
a1043 1
		LC_ALL=C sh workman.sh $(@@:.txt=) >$@@.out
d1056 1
a1056 1
     lsout=$$(ls -nt --time-style="+%s" "$$@@" 2>/dev/null); then \
d1058 1
a1058 1
    timestamp=$$(($$7 + $$n)) && \
d1062 1
a1062 1
    newest=$$(ls -t "$$@@" | sed 1q) && \
d1085 1
a1085 1
		   files=$$(git ls-files $(EIGHT_YARDS)) && \
d1089 2
a1090 2
		    if git diff --quiet HEAD $$file; then \
		      time=$$(TZ=UTC0 git log -1 \
d1093 1
a1093 1
			$$file) && \
d1102 2
a1103 2
		for file in $(MANTXTS); do \
		  $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \
d1116 5
a1120 5
public.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d \
d1122 3
a1124 2
		for i in $(TDATA_TO_CHECK) \
		    tzdata.zi vanguard.zi main.zi rearguard.zi; \
d1126 1
a1126 1
		  $@@d/zic -v -d $@@d/zoneinfo $@@d/$$i || exit; \
d1128 1
a1128 1
		$@@d/zic -v -d $@@d/zoneinfo-all $(TDATA_TO_CHECK)
d1131 5
a1135 5
		rm $@@d/main.zi
		cd $@@d && $(MAKE) PACKRATDATA=backzone main.zi
		$@@d/zic -d $@@d/zoneinfo main.zi
		rm $@@d/main.zi
		cd $@@d && \
d1137 1
a1137 1
		$@@d/zic -d $@@d/zoneinfo main.zi
d1139 1
a1139 1
		rm -fr $@@d
d1147 3
a1149 3
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
d1151 1
a1151 1
		  *32_t*) range=-2147483648,2147483648;; \
d1155 2
a1156 2
		wd=$$PWD && \
		zones=$$($(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab) && \
d1162 3
a1164 3
		(cd $@@d && \
		  $(MAKE) TOPDIR="$$wd/$@@d" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$(@@:.ck=)'" \
d1166 1
a1166 1
		    D="$$wd/$@@d" \
d1170 2
a1171 2
		  (cd $(TIME_T_ALTERNATIVES_HEAD)d && \
		    $(MAKE) TOPDIR="$$wd/$@@d" \
d1173 1
a1173 1
		      D="$$wd/$@@d" \
d1175 2
a1176 3
		  $(SETUP_DIFF_TZS) && \
		  $$DIFF_TZS $(TIME_T_ALTERNATIVES_HEAD)d/to$$range.tzs \
			  $@@d/to$$range.tzs && \
d1182 2
a1183 2
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \
					   $@@d/etc && \
d1185 2
a1186 2
		      $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \
		      $@@d/usr/share; \
d1201 1
a1201 1
		read -r VERSION <version && \
d1220 2
a1221 2
		$(SETUP_TAR) && \
		$$TAR -cf - \
d1227 2
a1228 2
		$(SETUP_TAR) && \
		$$TAR -cf - $(TZDATA_DIST) | \
d1253 1
a1253 1
		$(SETUP_TAR) && \
d1255 1
a1255 1
		   $$TAR -cf - \
a1270 5
		if test $(DATAFORM) = vanguard; then \
		  pacificnew=; \
		else \
		  pacificnew=pacificnew; \
		fi && \
d1273 1
a1273 1
		  $$pacificnew
d1293 1
a1293 1
		$(SETUP_TAR) && \
d1295 1
a1295 1
		   $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@@.out
d1303 2
a1304 2
		$(SETUP_TAR) && \
		$$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
d1315 6
a1320 6
typecheck: long-long.ck unsigned.ck
long-long.ck unsigned.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d && \
d1322 2
a1323 2
		    long-long.*) i="long long";; \
		    unsigned.* ) i="unsigned" ;; \
d1325 1
d1328 1
a1328 1
		    TOPDIR="$$PWD" \
d1330 1
a1330 1
		$@@d/zdump -i -c 1970,1971 Europe/Rome
d1336 1
a1336 1
asctime.o:	private.h
d1339 4
a1342 4
localtime.o:	private.h tzdir.h tzfile.h
strftime.o:	localtime.c private.h tzdir.h tzfile.h
zdump.o:	private.h version.h
zic.o:		private.h tzdir.h tzfile.h version.h
d1349 1
a1349 1
.PHONY: install maintainer-clean names
@


1.1.1.25
log
@Import tzdata2019c from ftp://ftp.iana.org/tz/releases/tzdata2019c.tar.gz

Summary of changes in tzdata2019c (2019-09-11 08:59:48 -0700):
	Fiji observes DST from 2019-11-10 to 2020-01-12
	Norfolk Island starts observing Australian-style DST

	Plus historic corrections to time in Turkey (1940-85)
	South Korea (1948-51) Detroit (US) (1967-8), Perry County
	(Indiana, US) (pre 1970) Edmonton (CA) (1967, 1969)
	Vancouver (CA) (1946), Vienna (AT) (1946), Kaliningrad (1945-6).
	Louisville (US) (1946-50).  Brussles (BE) (1892).
	Hong Kong Winter Time (1941) now listed as being "DST".

Summary of changes in tzdata2019b (2019-07-01 00:09:53 -0700):

	Brazil no longer observes DST
	Predictions for Morocco extended to 2087.
	Panestine (March 2019) time zone change date corrected
	(and guesses for future transitions revised).

	Historic updates:  Honk Kong (1941 - 1947), Italy (1866).
@
text
@d38 2
a39 4
# The POSIXRULES macro controls interpretation of nonstandard and obsolete
# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules.
# In the reference implementation, if you want something other than Eastern
# United States time as a template for handling these settings, you can
d42 1
a42 1
# A setting like TZ='EET-2EEST' is supposed to use the rules in the
a51 11
#
# If POSIXRULES is empty, no template is installed; this is the intended
# future default for POSIXRULES.
#
# Nonempty POSIXRULES is obsolete and should not be relied on, because:
# * It does not work correctly in popular implementations such as GNU/Linux.
# * It does not work in the tzdb implementation for timestamps after 2037.
# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions
#   at standard time or UT rather than at local time.
# In short, software should avoid ruleless settings like TZ='EET-2EEST'
# and so should not depend on the value of POSIXRULES.
a233 7
#  -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and
#	similarly for "fat".  Fat TZif files work around incompatibilities
#	and bugs in some TZif readers, notably readers that mishandle 64-bit
#	data in TZif files.  Slim TZif files are more efficient and do not
#	work around these incompatibilities and bugs.  If not given, the
#	current default is "fat" but this is intended to change as readers
#	requiring fat files often mishandle timestamps after 2037 anyway.
d367 1
a367 3
# You can also append "-b slim" if that is not already the default;
# see ZIC_BLOAT_DEFAULT above.
# See the zic man page for more about -b and -r.
a390 3
# Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions.
GPG=		gpg

d565 1
a565 3
		$(ZIC_INSTALL) -l $(LOCALTIME) \
			`case '$(POSIXRULES)' in ?*) echo '-p';; esac \
			` $(POSIXRULES) \
d784 6
d1054 1
a1054 1
		$(GPG) --armor --detach-sign $?
@


1.1.1.26
log
@Import tzdata2020a from ftp://ftp.iana.org/tz/releases/tzdata2020a.tar.gz

Summary of changes in tzdata2020a (2020-04-23 16:03:47 -0700):

    Morocco resumes summer time on 2020-05-31, not 2020-05-24.
    Canada's Yukon advanced to -07 year-round on 2020-03-08 (summer time
      will not end this year)..
    America/Nuuk renamed from America/Godthab (both names now exist).
@
text
@a152 9
# Whether to put an "Expires" line in the leapseconds file.
# Use EXPIRES_LINE=1 to put the line in, 0 to omit it.
# The EXPIRES_LINE value matters only if REDO's value contains "right".
# If you change EXPIRES_LINE, remove the leapseconds file before running "make".
# zic's support for the Expires line was introduced in tzdb 2020a,
# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file
# can be given to older zic implementations.
EXPIRES_LINE=	0

d298 2
a299 3
# #	-DHAVE_TZNAME=0 # do not support "tzname"
# #	-DHAVE_TZNAME=1 # support "tzname", which is defined by system library
# #	-DHAVE_TZNAME=2 # support and define "tzname"
d307 2
a308 3
# #	-DUSG_COMPAT=0 # do not support
# #	-DUSG_COMPAT=1 # support, and variables are defined by system library
# #	-DUSG_COMPAT=2 # support and define variables
d314 1
a314 3
# #	-DALTZONE=0 # do not support
# #	-DALTZONE=1 # support "altzone", which is defined by system library
# #	-DALTZONE=2 # support and define "altzone"
a316 1
# # If not defined, the code attempts to guess ALTZONE from other macros.
d324 3
a326 1
# "tzsetwall" is deprecated and is intended to be removed soon; see NEWS.
d336 1
d508 2
a509 2
LIBSRCS=	localtime.c asctime.c difftime.c strftime.c
LIBOBJS=	localtime.o asctime.o difftime.o strftime.o
d512 1
a512 1
NEWUCBSRCS=	date.c
d654 1
a654 2
		$(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \
		  -f leapseconds.awk leap-seconds.list >$@@.out
@


1.1.1.27
log
@Import tzdata2020b from ftp://ftp.iana.org/tz/releases/tzdata2020b.tar.gz

Summary of changes in tzdata2020b (2020-10-06 18:35:04 -0700):

     Revised predictions for Morocco's changes starting in 2023.
     Canada's Yukon changes to -07 on 2020-11-01, not 2020-03-08.
     Macquarie Island has stayed in sync with Tasmania since 2011.
     Casey, Antarctica is at +08 in winter and +11 in summer.
@
text
@a24 1
# Rearguard users might also want "ZFLAGS = -b fat"; see below.
d30 2
a31 1
# 'zic -l -' to remove it, or 'zic -l rightzone' to change it.
d40 14
a53 3
# Such a setting uses the rules in a template file to determine
# "spring forward" and "fall back" days and times; the environment
# variable itself specifies UT offsets of standard and daylight saving time.
d55 2
a56 1
# If POSIXRULES is '-', no template is installed; this is the default.
d58 1
a58 1
# Any other value for POSIXRULES is obsolete and should not be relied on, as:
a64 9
#
# If, despite the above, you want a template for handling these settings,
# you can change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
# Alternatively, if you discover you've got the wrong timezone, you can just
# 'zic -p -' to remove it, or 'zic -p rightzone' to change it.
# Use the command
#	make zonenames
# to get a list of the values you can use for POSIXRULES.
d66 1
a66 1
POSIXRULES=	-
d175 3
d195 4
d256 2
a257 2
#  -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and
#	similarly for "slim".  Fat TZif files work around incompatibilities
d261 2
a262 1
#	default is "slim".
d336 1
a336 1
# "offtime", "timelocal", "timegm", "timeoff",
d338 1
d398 1
a398 1
# To grow the files and work around older application bugs, append "-b fat";
d427 20
d541 2
a542 2
NDATA=		factory
TDATA_TO_CHECK=	$(YDATA) $(NDATA) backward
d550 1
a550 1
			leapseconds $(ZONETABLES)
d576 2
a577 1
		private.h southamerica strftime.c theory.html \
d580 2
a581 1
		workman.sh zdump.8 zdump.c zic.8 zic.c \
d590 1
a590 1
all:		tzselect zic zdump libtz.a $(TABDATA) \
d660 4
d678 1
d681 1
a681 1
INSTALL_DATA_DEPS = zic leapseconds tzdata.zi
d796 1
a796 1
			leapseconds zone.tab && \
a847 1
check_tz-how-to.html: tz-how-to.html
d849 1
a849 1
check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html:
d854 3
d886 1
a886 1
		  date tzselect version.h zdump zic libtz.a
@


1.1.1.28
log
@Import tzdata2020c from ftp://ftp.iana.org/tz/releases/tzdata2020c.tar.gz

News for the tz database

Release 2020c - 2020-10-16 11:15:53 -0700

    Fiji starts DST later than usual, on 2020-12-20.
@
text
@a1024 3
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		touch -md 2020-10-12T22:53:00Z \
		  tzdata$(VERSION)-rearguard.dir/pacificnew
d1028 1
a1028 2
		   tar $(TARFLAGS) -cf - \
			$(COMMON) $(DATA) $(MISC) pacificnew | \
@


1.1.1.29
log
@Import tzdata2020d from ftp://ftp.iana.org/tz/releases/tzdata2020d.tar.gz

Summary of changes in tzdata2020d (2020-10-21 11:24:13 -0700):

	Palestine ends DST earlier than predicted, on 2020-10-24.
@
text
@d1026 1
a1026 1
		TZ=UTC0 touch -mt 202010122253.00 \
@


1.1.1.30
log
@Import tzdata2020f from ftp://ftp.iana.org/tz/releases/tzdata2020f.tar.gz

Release 2020f - 2020-12-29 00:17:46 -0800

    No changes to tzdata, just to a part of the build procedure
    not used on NetBSD

Release 2020e - 2020-12-22 15:14:34 -0800

    Volgograd switched to Moscow time on 2020-12-27 at 02:00.

    Correct many pre-1986 transitions, fixing entries originally
    derived from Shanks.  The fixes include changes to:
      Australia, Bahamas, Bermuda, Belize, Ghana, Israel and Palestine,
      Kenya and adjacent, Nigeria and adjacent, Seychelles, Vanuatu

    Australia/Currie has been moved to the 'backward' file and its
    corrected data moved to the 'backzone' file.

    To better match legislation in Turks and Caicos, the 2015 shift to
    year-round observance of -04 is now modeled as AST throughout before
    returning to Eastern Time with US DST in 2018, rather than as
    maintaining EDT until 2015-11-01.
@
text
@a585 4
# Calculate version number from git, if available.
# Otherwise, use $(VERSION) unless it is "unknown" and there is already
# a 'version' file, in which case reuse the existing 'version' contents
# and append "-dirty" if the contents do not already end in "-dirty".
d590 1
a590 5
		  if test '$(VERSION)' = unknown && V=`cat $@@`; then \
		    case $$V in *-dirty);; *) V=$$V-dirty;; esac; \
		  else \
		    V='$(VERSION)'; \
		  fi; } && \
a874 23
# Set file timestamps deterministically if possible,
# so that tarballs containing the timestamps are reproducible.
#
# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the
# file DEST to the maximum of the timestamps of the files A B C ...,
# plus N if GNU ls and touch are available.
SET_TIMESTAMP_N = sh -c '\
  n=$$0 dest=$$1; shift; \
  touch -cmr `ls -t "$$@@" | sed 1q` "$$dest" && \
  if test $$n != 0 && \
     lsout=`ls -n --time-style="+%s" "$$dest" 2>/dev/null`; then \
    set x $$lsout && \
    touch -cmd @@`expr $$7 + $$n` "$$dest"; \
  else :; fi'
# If DEST depends on A B C ... in this Makefile, callers should use
# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any
# downstream 'make' that considers equal timestamps to be out of date.
# POSIX allows this 'make' behavior, and HP-UX 'make' does it.
# If all that matters is that the timestamp be reproducible
# and plausible, use $(SET_TIMESTAMP).
SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0
SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1

d877 3
a879 3
# This uses GNU 'ls --time-style=+%s', which outputs the seconds count,
# and GNU 'touch -d@@N FILE', where N is the number of seconds since 1970.
# If git or GNU is absent, don't bother to sync with git timestamps.
d897 1
a897 1
		$(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS)
d899 1
a899 1
		  $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \
d902 2
a903 2
		$(SET_TIMESTAMP_DEP) version $(VERSION_DEPS)
		$(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS)
d906 1
a906 1
		$(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS)
d917 1
a917 4
		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \
		    public.dir/vanguard.zi public.dir/main.zi \
		    public.dir/rearguard.zi; \
		do \
d984 1
a984 1
		$(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@@_version
d1021 1
a1021 1
		  $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \
d1040 1
a1040 1
		$(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/*
d1082 2
@


1.1.1.31
log
@Import tzdata2022agtz
   not from ftp://ftp.iana.org/tz/releases/tzdata2022agtz.tar.gz
   (2022a comes from ftp://ftp.iana.org/tz/releases/tzdata2022a.tar.gz)

Note that 2022agtz is mechanically derived from 2022a by moving back
zone data from the "backzone" file that had been removed as "redundant"
(because differences to some other zone are all prior to 1970) so that
this pre 1970 data is restored.   It isn't necessarily correct in all
cases, but it is usually better than using some other zone's data which
is just as likely to be incorrect for where it applies, and more so elsewhere.

Summary of changes in tzdata2022a (2022-03-15 23:02:01 -0700):
  * Palestine will spring forward on 2022-03-27, not 2022-03-26.
  * From 1992 through spring 1996, Ukraine's DST transitions were at
    02:00 standard time, not at 01:00 UTC.
  * Chile's Santiago Mean Time and its LMT precursor have been adjusted
    eastward by 1 second to align with past and present law.
  * Changes to commentary.
@
text
@d48 3
a50 3
# * It does not work even in tzcode, except for historical timestamps
#   that precede the last explicit transition in the POSIXRULES file.
#   Hence it typically does not work for current and future timestamps.
d125 2
a126 2
TIME_T_ALTERNATIVES_HEAD = int_least64_t
TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t
d155 2
a156 4
# and was modified in tzdb 2021b to generate version 4 TZif files.
# EXPIRES_LINE defaults to 0 for now so that the leapseconds file
# can be given to pre-2020a zic implementations and so that TZif files
# built by newer zic implementations can be read by pre-2021b libraries.
a212 1
#  -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure.
d223 1
a259 1
# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow.
a265 1
  -Wduplicated-branches -Wduplicated-cond \
d267 1
a267 1
  -Winit-self -Wlogical-op \
a268 1
  -Wnull-dereference \
d270 1
a270 2
  -Wshadow -Wshift-overflow=2 -Wstrict-overflow \
  -Wstrict-prototypes -Wstringop-overflow=4 \
d275 1
a275 1
  -Wtrampolines -Wundef -Wuninitialized -Wunused-macros \
d396 3
a398 4
# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work.
# Also, it is better (though not essential) if 'awk' supports UTF-8,
# and unfortunately mawk and busybox awk do not support UTF-8.
# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems.
d463 1
a463 3
GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \
  --numeric-owner --owner=0 --group=0 \
  --mode=go+u,go-w --sort=name
d501 1
a501 1
			NEWS README SECURITY theory.html version
d526 1
a526 1
TZS_DEPS=	$(YDATA) asctime.c localtime.c \
d536 1
a536 1
		calendars CONTRIBUTING LICENSE Makefile NEWS README SECURITY \
d739 1
a739 1
			-e 's|AWK=[^}]*|AWK='\''$(AWK)'\''|g' \
d760 1
a760 1
			CONTRIBUTING LICENSE README SECURITY \
d799 1
a799 1
check_tables:	checktab.awk $(YDATA) backward $(ZONETABLES)
d801 1
a801 2
		  test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \
		  $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \
a954 6
		:
		: Also check 'backzone' syntax.
		rm public.dir/main.zi
		cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi
		public.dir/zic -d public.dir/zoneinfo main.zi
		:
d967 1
a967 1
		  int*32_t) range=-2147483648,2147483648;; \
@


1.1.1.32
log
@Import tzdata2022c from https://github.com/JodaOrg/global-tz/releases/download//2022bgtz/tzdata2022bgtz.tar.gz

Summary of changes in tzdata2022c (2022-08-15 17:47:18 -0700):
  * None.

Summary of changes in tzdata2022b (2022-08-10 15:38:32 -0700):
  * Chile's 2022 DST start is delayed from September 4 to September 11.
  * Iran plans to stop observing DST permanently, after it falls back
    on 2022-09-21.
  * From fall 1994 through fall 1995, Shanks wrote that Crimea's
    DST transitions were at 02:00 standard time, not at 00:00.
  * Iran adopted standard time in 1935, not 1946.
  * Chile's observance of -04 from 1946-08-29 through 1947-03-31 was
    considered DST, not standard time.
  * Some old, small clock transitions have been removed, as people at
    the time did not change their clocks.
@
text
@d36 1
a36 1
LOCALTIME=	Factory
d179 1
a179 2
# If you want out-of-scope and often-wrong data from the file 'backzone',
# but only for entries listed in the backward-compatibility file zone.tab, use
a180 4
#	PACKRATLIST=	zone.tab
# If you want all the 'backzone' data, use
#	PACKRATDATA=	backzone
#	PACKRATLIST=
a182 1
#	PACKRATLIST=
a184 1
PACKRATLIST=
d267 1
a267 1
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \
d281 1
a281 1
  -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \
a450 3
# Put this in a bracket expression to match spaces.
s = [:space:]

d524 2
a525 3
TZDATA_ZI_DEPS=	ziguard.awk zishrink.awk version $(TDATA) \
		  $(PACKRATDATA) $(PACKRATLIST)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA) $(PACKRATLIST)
a536 1
TZDATA_DIST = $(COMMON) $(DATA) $(MISC)
d538 1
a538 1
EIGHT_YARDS = $(TZDATA_DIST) $(DOCS) $(SOURCES) tzdata.zi
d611 1
a611 1
# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST.
d613 1
a613 5
		$(AWK) \
		  -v DATAFORM=`expr $@@ : '\(.*\).zi'` \
		  -v PACKRATDATA='$(PACKRATDATA)' \
		  -v PACKRATLIST='$(PACKRATLIST)' \
		  -f ziguard.awk \
d617 1
a617 1
# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO.
a654 1
 PACKRATLIST='$(PACKRATLIST)' \
d693 5
d758 2
a759 2
		  check_name_lengths check_slashed_abbrs check_sorted \
		  check_tables check_web check_ziguard check_zishrink check_tzs
d783 1
a783 1
		! grep -n '[$s]$$' \
d787 3
a789 2
PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+
FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15}
a795 10
PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+
STDOFF = [-+]?[0-9:.]+
RULELESS_SAVE = (-|$(STDOFF)[sd]?)
RULELESS_SLASHED_ABBRS = \
  $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/

check_slashed_abbrs: $(TDATA_TO_CHECK)
		! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
		touch $@@

a834 7
check_ziguard: rearguard.zi vanguard.zi ziguard.awk
		$(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \
		  diff -u rearguard.zi -
		$(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \
		  diff -u vanguard.zi -
		touch $@@

d839 1
a839 2
  zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \
  $(TDATA) $(DATAFORM).zi tzdata.zi
d848 2
a849 2
		  case $(DATAFORM),$(PACKRATLIST) in \
		    main,) \
a969 4
		rm public.dir/main.zi
		cd public.dir && \
		  $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi
		public.dir/zic -d public.dir/zoneinfo main.zi
d1030 1
a1030 1
tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \
d1032 1
a1032 1
  version set-timestamps.out rearguard.zi vanguard.zi
a1044 2
tailored_tarballs_version: \
  tzdata$(VERSION)-tailored.tar.gz
d1058 1
a1058 1
		tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \
a1061 7
# Create empty files with a reproducible timestamp.
CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00

# The obsolescent *rearguard* targets and related macros are present
# for backwards compatibility with tz releases 2018e through 2022a.
# They should go away eventually.  To build rearguard tarballs you
# can instead use 'make DATAFORM=rearguard tailored_tarballs'.
d1063 5
a1067 4
		rm -fr $@@.dir
		mkdir $@@.dir
		ln $(TZDATA_DIST) $@@.dir
		cd $@@.dir && rm -f $(TDATA) $(PACKRATDATA) version
d1069 1
a1069 1
		  rearf=$@@.dir/$$f; \
d1073 2
a1074 1
		sed '1s/$$/-rearguard/' <version >$@@.dir/version
d1076 3
a1078 2
		$(CREATE_EMPTY) $@@.dir/pacificnew
		touch -cmr version $@@.dir/version
d1080 1
a1080 1
		  (cd $@@.dir && \
d1082 1
a1082 1
			$(TZDATA_DIST) pacificnew | \
a1085 38
# Create a tailored tarball suitable for TZUpdater and compatible tools.
# For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball
# useful for testing whether TZUpdater supports vanguard form.
# The generated tarball is not byte-for-byte equivalent to a hand-tailored
# traditional tarball, as data entries are put into 'etcetera' even if they
# came from some other source file.  However, the effect should be the same
# for ordinary use, which reads all the source files.
tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
		rm -fr $@@.dir
		mkdir $@@.dir
		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
		cd $@@.dir && \
		  $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \
		  `test $(DATAFORM) = vanguard || echo pacificnew`
		(grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \
		  >$@@.dir/etcetera
		touch -cmr tzdata.zi $@@.dir/etcetera
		sed -n \
		  -e '/^# *version  *\(.*\)/h' \
		  -e '/^# *ddeps  */H' \
		  -e '$$!d' \
		  -e 'g' \
		  -e 's/^# *version  *//' \
		  -e 's/\n# *ddeps  */-/' \
		  -e 's/ /-/g' \
		  -e 'p' \
		  <tzdata.zi >$@@.dir/version
		touch -cmr version $@@.dir/version
		links= && \
		  for file in $(TZDATA_DIST); do \
		    test -f $@@.dir/$$file || links="$$links $$file"; \
		  done && \
		  ln $$links $@@.dir
		LC_ALL=C && export LC_ALL && \
		  (cd $@@.dir && \
		   tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@@.out
		mv $@@.out $@@

d1137 1
a1137 1
.PHONY: posix_only posix_right public
a1143 1
.PHONY: tailored_tarballs tailored_tarballs_version
@


1.1.1.33
log
@Import tzdata2022d from https://github.com/JodaOrg/global-tz/releases/download/2022dgtz/tzdata2022dgtz.tar.gz

Summary of changes in tzdata2022d (2022-09-23 12:02:57 -0700):
  * Palestine now springs forward and falls back at 02:00 on the
    first Saturday on or after March 24 and October 24, respectively.
  * Simplify three Ukraine zones to one, since the post-1970
    differences seem to have been imaginary.

This is an update from 2022b to 2022d, there were no tzdata changes in 2022c
@
text
@d301 2
a302 3
# and define NO_TM_ZONE to suppress any guessing.  Although these two fields
# not required by POSIX, a future version of POSIX is planned to require them
# and they are widely available on GNU/Linux and BSD systems.
d541 1
a541 1
MISC=		$(AWK_SCRIPTS)
d570 1
a570 1
		zone.tab zone1970.tab
@


1.1.1.34
log
@Import tzdata2022f from
   https://github.com/JodaOrg/global-tz/releases/download/2022fgtz/tzdata2022fgtz.tar.gz

Summary of changes in tzdata2022f (2022-10-28 18:04:57 -0700):
  * Mexico will no longer observe DST after 2022, except for areas
    near the US border that continue to observe US DST rules.
  * Fiji will not observe DST in 2022/3.
  * Simplify four Ontario zones, as most of the post-1970 differences
    seem to have been imaginary.
@
text
@d213 1
a213 2
#  -DHAVE_GETRANDOM if getgrandom works (e.g., GNU/Linux)*
#  -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)*
a224 1
#  -DHAVE_SETENV=0 if your system lacks the setenv function
d226 2
a227 1
#  -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>*
d232 1
a232 1
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>*
d234 1
a234 2
#  -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>*
#  -DHAVE_UTMPX_H=0 if your compiler lacks a <utmpx.h>*
d257 4
a260 4
#	and bugs in some TZif readers, notably older ones that
#	ignore or otherwise mishandle 64-bit data in TZif files;
#	however, fat TZif files may trigger bugs in newer TZif readers.
#	Slim TZif files are more efficient, and are the default.
a264 3
#
# * Options marked "*" can be omitted if your compiler is C23 compatible.
#
d400 2
a401 3
# To grow the files and work around bugs in older applications,
# possibly at the expense of introducing bugs in newer ones,
# append "-b fat"; see ZIC_BLOAT_DEFAULT above.
d821 1
a821 2
		$(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} /^$$/ {g++}' \
		  backward | LC_ALL=C sort -cu
d826 2
a827 6
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk $(TDATA_TO_CHECK)
		$(AWK) \
		  -v DATAFORM=$(DATAFORM) \
		  -f checklinks.awk tzdata.zi
@


1.1.1.35
log
@Import tzdata2022g from https://github.com/JodaOrg/global-tz/releases/download/2022ggtz/tzdata2022ggtz.tar.gz

Summary of changes in tzdata2022g (2022-11-29 08:58:31 -0800):
  * In the Mexican state of Chihuahua, the border strip near the US
    will change to agree with nearby US locations on 2022-11-30.
  * Much of Greenland, represented by America/Nuuk, stops observing
    winter time after March 2023, so its daylight saving time becomes
    standard time.
  * Changes for pre-1996 northern Canada (thanks to Chris Walton):
  * Merge America/Iqaluit and America/Pangnirtung into the former,
    with a backward compatibility link for the latter name.
  * Cambridge Bay, Inuvik, Iqaluit, Rankin Inlet, Resolute and
    Yellowknife did not observe DST in 1965, and did observe DST
    from 1972 through 1979.
  * Whitehorse moved from -09 to -08 on 1966-02-27, not 1967-05-28.
  * Colombia's 1993 fallback was 02-06 24:00, not 04-04 00:00.
  * Singapore's 1981-12-31 change was at 16:00 UTC (23:30 local time),
    not 24:00 local time.

Zones added by this update:
	America/Ciudad_Juarez
@
text
@a198 1
# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0.
a210 1
#  -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm
d212 3
a214 6
#  -DHAVE_GENERIC=0 if _Generic does not work*
#  -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux),
#	-DHAVE_GETRANDOM=0 to avoid using getrandom
#  -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris),
#	where LDLIBS also needs to contain -lintl on some hosts;
#	-DHAVE_GETTEXT=0 to avoid using gettext
d218 1
a218 1
#  -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*
d228 1
a228 3
#  -DHAVE_STDCKDINT_H=0 if neither <stdckdint.h> nor substitutes like
#	__builtin_add_overflow work*
#  -DHAVE_STDINT_H=0 if <stdint.h> does not work*
d233 1
a233 1
#  -DHAVE_SYS_STAT_H=0 if <sys/stat.h> does not work*
d235 2
a236 2
#  -DHAVE_UNISTD_H=0 if <unistd.h> does not work*
#  -DHAVE_UTMPX_H=0 if <utmpx.h> does not work*
d283 1
a283 1
  -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \
d296 1
a296 1
  -Wno-type-limits
d343 3
a345 2
# to the end of the "CFLAGS=" line.  This arranges for the following
# functions to be added to the time conversion library.
d349 2
a497 5
# When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported.
# This makes it easier to see which Zone has been affected.
DIFF_TZS=	 diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \
			   || echo ' -F^TZ=')

d776 1
a776 2
check: check_back check_mild
check_mild:	check_character_set check_white_space check_links \
d827 1
a827 1
		$(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \
d832 1
a832 1
check_back:	checklinks.awk $(TDATA_TO_CHECK)
a835 3
		touch $@@

check_links:	checklinks.awk tzdata.zi
d851 1
a851 1
		  $(DIFF_TZS) $(TZS) $(TZS_NEW); \
d1052 1
a1052 1
		  $(DIFF_TZS) $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
d1222 1
a1222 1
.PHONY: check check_mild check_time_t_alternatives
@


1.1.1.35.2.1
log
@Pull up the following, requested by kre in ticket #149:

	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.8
	external/public-domain/tz/dist/Makefile         up to 1.1.1.36
	external/public-domain/tz/dist/NEWS             up to 1.1.1.43
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.35
	external/public-domain/tz/dist/africa           up to 1.1.1.31
	external/public-domain/tz/dist/antarctica       up to 1.1.1.17
	external/public-domain/tz/dist/asia             up to 1.10
	external/public-domain/tz/dist/australasia      up to 1.7
	external/public-domain/tz/dist/backward         up to 1.11
	external/public-domain/tz/dist/backzone         up to 1.1.1.26
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.12
	external/public-domain/tz/dist/europe           up to 1.1.1.37
	external/public-domain/tz/dist/iso3166.tab      up to 1.1.1.8
	external/public-domain/tz/dist/leap-seconds.list up to 1.5
	external/public-domain/tz/dist/leapseconds      up to 1.5
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.13
	external/public-domain/tz/dist/northamerica     up to 1.1.1.33
	external/public-domain/tz/dist/southamerica     up to 1.1.1.23
	external/public-domain/tz/dist/theory.html      up to 1.1.1.18
	external/public-domain/tz/dist/version          up to 1.10
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.25
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.26
	doc/3RDPARTY					(apply patch)

sync with HEAD: updated tzdata to 2023c
@
text
@d38 6
a43 2
# The POSIXRULES macro controls interpretation of POSIX-like TZ
# settings like TZ='EET-2EEST' that lack DST transition rules.
d45 1
d51 3
d66 1
a66 1
# if POSIXRULES is '-' or if the template file cannot be accessed.
d214 1
a214 1
#  -DHAVE__GENERIC=0 if _Generic does not work*
d223 1
a223 1
#  -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+
d232 1
a232 1
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+
d235 1
a235 1
#  -DHAVE_STDINT_H=0 if <stdint.h> does not work*+
d238 1
a238 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function+
a244 1
#  -DPORT_TO_C89 if tzcode should also run on C89 platforms+
a247 1
#  -DSUPPORT_C89 if the tzcode library should support C89 callers+
d259 1
a259 7
#	DST transitions for POSIX-style TZ strings lacking them,
#	in the usual case where POSIXRULES is '-'.  If not specified,
#	TZDEFRULESTRING defaults to US rules for future DST transitions.
#	This mishandles some past timestamps, as US DST rules have changed.
#	It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
#	as Europe and US DST rules differ.
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255)
a275 2
# * Options marked "+" are obsolescent and are planned to be removed
#   once the code assumes C99 or later.
d366 1
a366 1
# time library, and if STD_INSPIRED is also defined to nonzero the functions
d458 7
a464 4
# These non-alphabetic, non-ASCII printable characters are Latin-1,
# and so are likely displayable even in editors like XEmacs 21
# that have limited display capabilities.
UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷
d467 1
a467 1
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)
d836 1
a836 1
check_sorted: backward backzone
@


1.1.1.35.2.2
log
@Pull up the following, requested by kre in ticket #520:

	external/public-domain/tz/dist/checknow.awk     up to 1.1.1.1
	external/public-domain/tz/dist/zonenow.tab      up to 1.1.1.1
	external/public-domain/tz/dist/Makefile         up to 1.1.1.37
	external/public-domain/tz/dist/NEWS             up to 1.1.1.44
	external/public-domain/tz/dist/README           up to 1.1.1.11
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.36
	external/public-domain/tz/dist/africa           up to 1.1.1.32
	external/public-domain/tz/dist/antarctica       up to 1.1.1.18
	external/public-domain/tz/dist/asia             up to 1.11
	external/public-domain/tz/dist/australasia      up to 1.8
	external/public-domain/tz/dist/backzone         up to 1.1.1.27
	external/public-domain/tz/dist/checktab.awk     up to 1.1.1.13
	external/public-domain/tz/dist/europe           up to 1.1.1.38
	external/public-domain/tz/dist/iso3166.tab      up to 1.1.1.9
	external/public-domain/tz/dist/leap-seconds.list up to 1.6
	external/public-domain/tz/dist/leapseconds      up to 1.6
	external/public-domain/tz/dist/northamerica     up to 1.1.1.34
	external/public-domain/tz/dist/southamerica     up to 1.1.1.24
	external/public-domain/tz/dist/version          up to 1.11
	external/public-domain/tz/dist/zone.tab         up to 1.1.1.26
	external/public-domain/tz/dist/zone1970.tab     up to 1.1.1.27
	doc/3RDPARTY					1.1972 (patch)

Import tzdata 2023d.
@
text
@d2 1
a4 19
# Request POSIX conformance; this must be the first non-comment line.
.POSIX:
# On older platforms you may need to scrounge for a POSIX-conforming 'make'.
# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or
# /usr/xpg4/bin/make, not /usr/ccs/bin/make.

# To affect how this Makefile works, you can run a shell script like this:
#
#	#!/bin/sh
#	make CC='gcc -std=gnu11' "$@@"
#
# This example script is appropriate for a pre-2017 GNU/Linux system
# where a non-default setting is needed to support this package's use of C99.
#
# Alternatively, you can simply edit this Makefile to tailor the following
# macro definitions.

###############################################################################
# Start of macros that one plausibly might want to tailor.
d194 2
a195 3
# Add the following to an uncommented "CFLAGS=" line as needed
# to override defaults specified in the source code or by the system.
# "-DFOO" is equivalent to "-DFOO=1".
d237 1
a237 5
#  -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
#	Typically it is better to use a later standard.  For example,
#	with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
#	Even with -DPORT_TO_C89, the code needs at least one C99
#	feature (integers at least 64 bits wide) and maybe more.
a241 1
#	However, this might trigger latent bugs in C99-or-later callers.
a272 4
#  -g to generate symbolic debugging info
#  -Idir to include from directory 'dir'
#  -O0 to disable optimization; other -O options to enable more optimization
#  -Uname to remove any definition of the macro 'name'
d277 1
a277 1
#   once the code assumes C99 or later, say in the year 2029.
d356 1
a356 2
# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone.
# "timelocal" is nearly equivalent to "mktime".
a358 1
# I.e., "timeoff" is like calling "mktime_z" with a fixed-offset zone.
d381 1
a381 1
# which claims to test C and POSIX conformance.  If you want to pass PCTS, add
a390 3
#
# POSIX says CFLAGS defaults to "-O 1".
# Uncomment the following line and edit its contents as needed.
d392 1
a392 1
#CFLAGS= -O 1
d394 2
d397 1
a397 8
# The name of a POSIX-like library archiver, its flags, C compiler,
# linker flags, and 'make' utility.  Ordinarily the defaults suffice.
# The commented-out values are the defaults specified by POSIX 202x/D3.
#AR = ar
#ARFLAGS = -rv
#CC = c17
#LDFLAGS =
#MAKE = make
d421 1
a421 1
# The name of a POSIX-compliant 'awk' on your system.
d428 1
a428 1
# The full path name of a POSIX-compliant shell, preferably one that supports
d432 1
a432 1
# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash
d506 3
a508 2
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:
d510 2
a511 3
# POSIX prohibits defining or using SHELL.  However, csh users on systems
# that use the user shell for Makefile commands may need to define SHELL.
#SHELL=		/bin/sh
d513 1
a513 2
# End of macros that one plausibly might want to tailor.
###############################################################################
d515 2
d546 1
a546 1
ZONETABLES=	zone.tab zone1970.tab zonenow.tab
d554 1
a554 1
AWK_SCRIPTS=	checklinks.awk checknow.awk checktab.awk leapseconds.awk \
d575 1
a575 1
		checklinks.awk checknow.awk checktab.awk \
d585 6
a590 1
		zone.tab zone1970.tab zonenow.tab
a659 10
tzdir.h:
		printf '%s\n' >$@@.out \
		  '#ifndef TZDEFAULT' \
		  '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \
		  '#endif' \
		  '#ifndef TZDIR' \
		  '# define TZDIR "$(TZDIR)" /* TZif directory */' \
		  '#endif'
		mv $@@.out $@@

d766 1
a766 1
		$(AR) $(ARFLAGS) $@@ $(LIBOBJS)
d774 7
a780 7
		  -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \
		  -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \
		  -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \
		  -e s\''\(REPORT_BUGS_TO\)=.*'\''\1=\'\''$(BUGEMAIL)\'\'\' \
		  -e s\''\(TZDIR\)=[^}]*'\''\1=\'\''$(TZDIR)\'\'\' \
		  -e s\''\(TZVERSION\)=.*'\''\1=\'"'$$VERSION\\''" \
		  <$@@.ksh >$@@.out
d786 1
a786 2
		  check_name_lengths check_now \
		  check_slashed_abbrs check_sorted \
a788 8
# True if UTF8_LOCALE does not work;
# otherwise, false but with LC_ALL set to $(UTF8_LOCALE).
UTF8_LOCALE_MISSING = \
  { test ! '$(UTF8_LOCALE)' \
    || ! printf 'A\304\200B\n' \
         | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \
    || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; }

d790 4
a793 1
	$(UTF8_LOCALE_MISSING) || { \
a807 1
	$(UTF8_LOCALE_MISSING) || { \
d809 5
a813 4
		! grep -En "$$pat|[$s]\$$" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \
	}
	touch $@@
d853 1
a853 23
# Check timestamps from now through 28 years from now, to make sure
# that zonenow.tab contains all sequences of planned timestamps,
# without any duplicate sequences.  In theory this might require
# 2800 years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = `./date +%s`
CHECK_NOW_FUTURE_YEARS = 28
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60
check_now:	checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@.dir
		mkdir $@@.dir
		./zic -d $@@.dir tzdata.zi
		now=$(CHECK_NOW_TIMESTAMP) && \
		  future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \
		  ./zdump -i -t $$now,$$future \
		     $$(find $$PWD/$@@.dir/????*/ -type f) \
		     >$@@.dir/zdump.tab
		$(AWK) \
		  -v zdump_table=$@@.dir/zdump.tab \
		  -f checknow.awk zonenow.tab
		rm -fr $@@.dir
		touch $@@

check_tables:	checktab.awk $(YDATA) backward zone.tab zone1970.tab
d913 1
a913 1
		rm -fr check_*.dir typecheck_*.dir
d916 1
a916 1
		  date tzdir.h tzselect version.h zdump zic libtz.a
d954 1
a954 1
  <"$$dest" && \
d956 1
a956 1
     lsout=`ls -nt --time-style="+%s" "$$@@" 2>/dev/null`; then \
d958 2
a959 8
    timestamp=`expr $$7 + $$n` && \
    echo "+ touch -md @@$$timestamp $$dest" && \
    touch -md @@$$timestamp "$$dest"; \
  else \
    newest=`ls -t "$$@@" | sed 1q` && \
    echo "+ touch -mr $$newest $$dest" && \
    touch -mr "$$newest" "$$dest"; \
  fi'
d984 2
a985 6
		      time=`TZ=UTC0 git log -1 \
			--format='tformat:%cd' \
			--date='format:%Y-%m-%dT%H:%M:%SZ' \
			$$file` && \
		      echo "+ touch -md $$time $$file" && \
		      touch -md $$time $$file; \
d1010 1
a1010 2
		cd public.dir \
		  && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL
d1141 1
a1141 1
		touch -mr version $@@.dir/version
d1165 1
a1165 1
		touch -mr tzdata.zi $@@.dir/etcetera
d1176 1
a1176 1
		touch -mr version $@@.dir/version
d1228 1
a1228 1
localtime.o:	private.h tzfile.h tzdir.h
d1231 1
a1231 1
zic.o:		private.h tzfile.h tzdir.h version.h
@


1.1.1.35.2.3
log
@Pull up the following, requested by kre in ticket #586:

	external/public-domain/tz/dist/Makefile         up to 1.1.1.38
	external/public-domain/tz/dist/NEWS             up to 1.1.1.45
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.37
	external/public-domain/tz/dist/africa           up to 1.1.1.33
	external/public-domain/tz/dist/asia             up to 1.12
	external/public-domain/tz/dist/australasia      up to 1.9
	external/public-domain/tz/dist/checknow.awk     up to 1.1.1.2
	external/public-domain/tz/dist/etcetera         up to 1.1.1.8
	external/public-domain/tz/dist/europe           up to 1.1.1.39
	external/public-domain/tz/dist/leap-seconds.list up to 1.7
	external/public-domain/tz/dist/leapseconds      up to 1.7
	external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.14
	external/public-domain/tz/dist/northamerica     up to 1.1.1.35
	external/public-domain/tz/dist/southamerica     up to 1.1.1.25
	external/public-domain/tz/dist/theory.html      up to 1.1.1.19
	external/public-domain/tz/dist/version          up to 1.12
	external/public-domain/tz/dist/zishrink.awk     up to 1.1.1.9
	external/public-domain/tz/dist/zonenow.tab      up to 1.1.1.2

Updated tzdata to 2024a
@
text
@d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ
d277 1
a277 1
#	DST transitions for POSIX.1-2017-style TZ strings lacking them,
d343 3
a345 4
# and define NO_TM_ZONE to suppress any guessing.
# Although these two fields are not required by POSIX.1-2017,
# POSIX 202x/D4 requires them and they are widely available
# on GNU/Linux and BSD systems.
d355 1
a355 1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX.1-1988 and later.
d365 2
a366 2
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI).
d430 1
a430 1
# The commented-out values are the defaults specified by POSIX.1-202x/D4.
a441 6
# Where to fetch leap-seconds.list from.
leaplist_URI = \
  https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
# The file is generated by the IERS Earth Orientation Centre, in Paris.
leaplist_TZ = Europe/Paris

d474 1
a474 2
# Name of curl <https://curl.haxx.se/>, used for HTML validation
# and to fetch leap-seconds.list from upstream.
a720 22
# Awk script to extract a Git-style author from leap-seconds.list comments.
EXTRACT_AUTHOR = \
  author_line { sub(/^.[[:space:]]*/, ""); \
      sub(/:[[:space:]]*/, " <"); \
      printf "%s>\n", $$0; \
      success = 1; \
      exit \
  } \
  /Questions or comments to:/ { author_line = 1 } \
  END { exit !success }

# Fetch leap-seconds.list from upstream.
fetch-leap-seconds.list:
		$(CURL) -OR $(leaplist_URI)

# Fetch leap-seconds.list from upstream and commit it to the local repository.
commit-leap-seconds.list: fetch-leap-seconds.list
		author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \
		date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \
		git commit --author="$$author" --date="$$date" -m'make $@@' \
		  leap-seconds.list

d1317 1
a1317 2
.PHONY: clean clean_misc commit-leap-seconds.list dummy.zd
.PHONY: fetch-leap-seconds.list force_tzs
@


1.1.1.35.2.4
log
@Pullup the following revisions, requested by kre in ticket #1094:

	external/public-domain/tz/dist/zoneinfo2tdf.pl  delete
	external/public-domain/tz/dist/CONTRIBUTING     up to 1.1.1.9
	external/public-domain/tz/dist/Makefile         up to 1.3
	external/public-domain/tz/dist/NEWS             up to 1.3
	external/public-domain/tz/dist/TZDATA_VERSION   up to 1.41
	external/public-domain/tz/dist/africa           up to 1.2
	external/public-domain/tz/dist/antarctica       up to 1.3
	external/public-domain/tz/dist/asia             up to 1.14
	external/public-domain/tz/dist/australasia      up to 1.11
	external/public-domain/tz/dist/backward         up to 1.12
	external/public-domain/tz/dist/backzone         up to 1.2
	external/public-domain/tz/dist/checknow.awk     up to 1.3
	external/public-domain/tz/dist/checktab.awk     up to 1.3
	external/public-domain/tz/dist/etcetera         up to 1.3
	external/public-domain/tz/dist/europe           up to 1.3
	external/public-domain/tz/dist/factory          up to 1.3
	external/public-domain/tz/dist/leap-seconds.list up to 1.9
	external/public-domain/tz/dist/leapseconds      up to 1.9
	external/public-domain/tz/dist/northamerica     up to 1.3
	external/public-domain/tz/dist/southamerica     up to 1.3
	external/public-domain/tz/dist/theory.html      up to 1.3
	external/public-domain/tz/dist/version          up to 1.14
	external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.11
	external/public-domain/tz/dist/zone.tab         up to 1.3
	external/public-domain/tz/dist/zone1970.tab     up to 1.3
	external/public-domain/tz/dist/zonenow.tab      up to 1.3
	distrib/sets/lists/base/mi			(apply patch)
	doc/3RDPARTY					(apply patch)

Updated tzdata to 2025b (using 2025btgz)
@
text
@d6 3
a8 3
# On older platforms you may need to scrounge for POSIX conformance.
# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007),
# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'.
d13 1
a13 1
#	make CC='gcc -std=gnu23' "$@@"
d15 2
a16 2
# This example script is appropriate for a circa 2024 GNU/Linux system
# where a non-default setting enables this package's optional use of C23.
d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-like TZ
d135 2
a136 3
TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck
TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
  uint_least64_t.ck
d139 1
a139 1
# zone data format that zic generates; see Internet RFC 9636.)
a221 1
#	on POSIX platforms predating POSIX.1-2024
d232 1
a232 1
#	ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier
a255 1
#  -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
d263 3
a265 6
#  -Dssize_t=int on hosts like MS-Windows that lack ssize_t
#  -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
#	Although -DSUPPORT_C89=0 might work around latent bugs in callers,
#	it does not conform to POSIX.
#  -DSUPPORT_POSIX2008 if the library should support older POSIX callers+
#	However, this might cause problems in POSIX.1-2024-or-later callers.
d277 1
a277 1
#	DST transitions for proleptic format TZ strings lacking them,
d283 1
a283 1
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254)
d305 1
a305 2
#   once the code assumes C99 or later (say in the year 2029)
#   and POSIX.1-2024 or later (say in the year 2034).
d312 1
a312 1
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
d316 1
a316 2
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \
  -Wdate-time \
d318 1
a318 1
  -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
d321 1
a321 2
  -Wmissing-declarations -Wmissing-prototypes \
  -Wmissing-variable-declarations -Wnested-externs \
d330 1
a330 1
  -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
d332 2
a333 1
  -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
d344 3
a346 2
# Although POSIX.1-2024 requires these fields and they are widely available
# on GNU/Linux and BSD systems, some older systems lack them.
d356 1
a356 3
# # to the "CFLAGS=" line.  Although "tzname" is required by POSIX.1-1988
# # and later, its contents are unspecified if you use a geographical TZ
# # and the variable is planned to be removed in a future POSIX edition.
d367 1
a367 3
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI),
# # although their contents are unspecified if you use a geographical TZ
# # and the variables are planned to be removed in a future edition of POSIX.
d431 1
a431 1
# The commented-out values are the defaults specified by POSIX.1-2024.
d438 5
d464 1
a464 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)'
a482 1
# Set CURL=: to disable use of the Internet.
d536 1
a536 1
GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \
d539 4
a542 7
SETUP_TAR= \
  export LC_ALL=C && \
  if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \
    TAR='tar $(GNUTARFLAGS)'; \
  else \
    TAR=tar; \
  fi
d549 2
a550 6
SETUP_DIFF_TZS = \
  if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \
    DIFF_TZS='diff -u -F^TZ='; \
  else \
    DIFF_TZS='diff -u'; \
  fi
d564 2
a565 2
TZDOBJS=	zdump.o localtime.o strftime.o
DATEOBJS=	date.o localtime.o strftime.o
d582 2
a583 1
CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck
d606 2
a607 2
TZS_DEPS=	$(YDATA) localtime.c private.h \
			strftime.c tzfile.h zdump.c zic.c
d644 2
a645 1
			-p $(POSIXRULES) \
d668 4
a671 4
		  V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty) || \
		  if test '$(VERSION)' = unknown && read -r V <$@@; then \
		    V=$${V%-dirty}-dirty; \
d681 1
a681 1
		  -v DATAFORM=$(@@:.zi=) \
d690 1
a690 1
		read -r version <version && \
d711 1
a711 1
		read -r VERSION <version && printf '%s\n' \
d751 1
a751 1
# Arguments to pass to submakes.
d756 1
d765 4
d770 1
a770 1
		$(ZIC_INSTALL) tzdata.zi
d773 2
a774 1
		$(ZIC_INSTALL) -L leapseconds tzdata.zi
d805 2
a806 1
		./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@@:.zd=)" >$@@
d815 2
a816 1
		x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
d818 1
a818 1
		     | LC_ALL=C sort -t . -k 2,2) && \
d822 1
a822 1
		$(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
d828 1
a828 1
# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the
d845 1
a845 1
		read -r VERSION <version && sed \
d856 5
a860 5
check: check_mild back.ck now.ck
check_mild: check_web check_zishrink \
  character-set.ck white-space.ck links.ck mainguard.ck \
  name-lengths.ck slashed-abbrs.ck sorted.ck \
  tables.ck ziguard.ck tzs.ck
d868 1
a868 1
    || { export LC_ALL='$(UTF8_LOCALE)'; false; }; }
d870 1
a870 1
character-set.ck: $(ENCHILADA)
d885 1
a885 1
white-space.ck: $(ENCHILADA)
d887 1
a887 2
		enchilada='$(ENCHILADA)' && \
		patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \
d889 1
a889 2
		    $${enchilada%leap-seconds.list*} \
		    $${enchilada#*leap-seconds.list}; \
d896 2
a897 2
name-lengths.ck: $(TDATA_TO_CHECK) backzone
		:;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
a900 5
mainguard.ck: main.zi
		test '$(PACKRATLIST)' || \
		  cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi
		touch $@@

d907 2
a908 2
slashed-abbrs.ck: $(TDATA_TO_CHECK)
		:;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
d913 1
a913 1
sorted.ck: backward backzone
d916 1
a916 1
		$(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu
d919 1
a919 1
back.ck: checklinks.awk $(TDATA_TO_CHECK)
d925 1
a925 1
links.ck: checklinks.awk tzdata.zi
d934 2
a935 2
# 2800+ years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = $$(./date +%s)
d937 5
a941 5
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60
now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@d
		mkdir $@@d
		./zic -d $@@d tzdata.zi
d943 1
a943 1
		  future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \
d945 2
a946 6
		     $$(find "$$PWD/$@@d"/????*/ -type f) \
		     >$@@d/zdump-now.tab && \
		  ./zdump -i -t 0,$$future \
		     $$(find "$$PWD/$@@d" -name Etc -prune \
			  -o -type f ! -name '*.tab' -print) \
		     >$@@d/zdump-1970.tab
d948 1
a948 1
		  -v zdump_table=$@@d/zdump-now.tab \
d950 1
a950 7
		$(AWK) \
		  'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \
		  $(PRIMARY_YDATA) backward factory | \
		 $(AWK) \
		   -v zdump_table=$@@d/zdump-1970.tab \
		   -f checknow.awk
		rm -fr $@@d
d953 1
a953 1
tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab
d961 1
a961 1
tzs.ck: $(TZS) $(TZS_NEW)
d963 1
a963 1
		  $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \
d970 7
a976 5
.SUFFIXES: .ck .html
.html.ck:
		{ ! ($(CURL) --version) >/dev/null 2>&1 || \
		    $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		          -F file=@@$<; } >$@@.out && \
d980 1
a980 1
ziguard.ck: rearguard.zi vanguard.zi ziguard.awk
d989 2
a990 2
check_zishrink: zishrink-posix.ck zishrink-right.ck
zishrink-posix.ck zishrink-right.ck: \
d993 2
a994 2
		rm -fr $@@d t-$@@d shrunk-$@@d
		mkdir $@@d t-$@@d shrunk-$@@d
d996 1
a996 1
		  *right*) leap='-L leapseconds';; \
d999 2
a1000 2
		  $(ZIC) $$leap -d $@@d $(DATAFORM).zi && \
		  $(ZIC) $$leap -d shrunk-$@@d tzdata.zi && \
d1003 1
a1003 1
		      $(ZIC) $$leap -d t-$@@d $(TDATA) && \
d1005 2
a1006 2
			$(ZIC) $$leap -d t-$@@d - $(PACKRATDATA) && \
		      diff -r $@@d t-$@@d;; \
d1008 2
a1009 2
		diff -r $@@d shrunk-$@@d
		rm -fr $@@d t-$@@d shrunk-$@@d
d1013 3
a1015 2
		rm -fr *.ckd *.dir
		rm -f *.ck *.core *.o *.out core core.* \
d1018 1
a1018 1
		rm -fr tzdb-*/
d1029 1
a1029 1
public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \
d1043 1
a1043 1
		LC_ALL=C sh workman.sh $(@@:.txt=) >$@@.out
d1056 1
a1056 1
     lsout=$$(ls -nt --time-style="+%s" "$$@@" 2>/dev/null); then \
d1058 1
a1058 1
    timestamp=$$(($$7 + $$n)) && \
d1062 1
a1062 1
    newest=$$(ls -t "$$@@" | sed 1q) && \
d1085 1
a1085 1
		   files=$$(git ls-files $(EIGHT_YARDS)) && \
d1089 2
a1090 2
		    if git diff --quiet HEAD $$file; then \
		      time=$$(TZ=UTC0 git log -1 \
d1093 1
a1093 1
			$$file) && \
d1102 2
a1103 2
		for file in $(MANTXTS); do \
		  $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \
d1116 5
a1120 5
public.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d \
d1122 3
a1124 2
		for i in $(TDATA_TO_CHECK) \
		    tzdata.zi vanguard.zi main.zi rearguard.zi; \
d1126 1
a1126 1
		  $@@d/zic -v -d $@@d/zoneinfo $@@d/$$i || exit; \
d1128 1
a1128 1
		$@@d/zic -v -d $@@d/zoneinfo-all $(TDATA_TO_CHECK)
d1131 5
a1135 5
		rm $@@d/main.zi
		cd $@@d && $(MAKE) PACKRATDATA=backzone main.zi
		$@@d/zic -d $@@d/zoneinfo main.zi
		rm $@@d/main.zi
		cd $@@d && \
d1137 1
a1137 1
		$@@d/zic -d $@@d/zoneinfo main.zi
d1139 1
a1139 1
		rm -fr $@@d
d1147 3
a1149 3
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
d1151 1
a1151 1
		  *32_t*) range=-2147483648,2147483648;; \
d1155 2
a1156 2
		wd=$$PWD && \
		zones=$$($(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab) && \
d1162 3
a1164 3
		(cd $@@d && \
		  $(MAKE) TOPDIR="$$wd/$@@d" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$(@@:.ck=)'" \
d1166 1
a1166 1
		    D="$$wd/$@@d" \
d1170 2
a1171 2
		  (cd $(TIME_T_ALTERNATIVES_HEAD)d && \
		    $(MAKE) TOPDIR="$$wd/$@@d" \
d1173 1
a1173 1
		      D="$$wd/$@@d" \
d1175 2
a1176 3
		  $(SETUP_DIFF_TZS) && \
		  $$DIFF_TZS $(TIME_T_ALTERNATIVES_HEAD)d/to$$range.tzs \
			  $@@d/to$$range.tzs && \
d1182 2
a1183 2
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \
					   $@@d/etc && \
d1185 2
a1186 2
		      $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \
		      $@@d/usr/share; \
d1201 1
a1201 1
		read -r VERSION <version && \
d1220 2
a1221 2
		$(SETUP_TAR) && \
		$$TAR -cf - \
d1227 2
a1228 2
		$(SETUP_TAR) && \
		$$TAR -cf - $(TZDATA_DIST) | \
d1253 1
a1253 1
		$(SETUP_TAR) && \
d1255 1
a1255 1
		   $$TAR -cf - \
a1270 5
		if test $(DATAFORM) = vanguard; then \
		  pacificnew=; \
		else \
		  pacificnew=pacificnew; \
		fi && \
d1273 1
a1273 1
		  $$pacificnew
d1293 1
a1293 1
		$(SETUP_TAR) && \
d1295 1
a1295 1
		   $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@@.out
d1303 2
a1304 2
		$(SETUP_TAR) && \
		$$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
d1315 6
a1320 6
typecheck: long-long.ck unsigned.ck
long-long.ck unsigned.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d && \
d1322 2
a1323 2
		    long-long.*) i="long long";; \
		    unsigned.* ) i="unsigned" ;; \
d1325 1
d1328 1
a1328 1
		    TOPDIR="$$PWD" \
d1330 1
a1330 1
		$@@d/zdump -i -c 1970,1971 Europe/Rome
d1336 1
a1336 1
asctime.o:	private.h
d1339 4
a1342 4
localtime.o:	private.h tzdir.h tzfile.h
strftime.o:	localtime.c private.h tzdir.h tzfile.h
zdump.o:	private.h version.h
zic.o:		private.h tzdir.h tzfile.h version.h
d1349 1
a1349 1
.PHONY: install maintainer-clean names
@


1.1.1.36
log
@Import tzdata2023a from https://github.com/JodaOrg/global-tz/releases/download/2023agtz/tzdata2023agtz.tar.gz

Summary of changes in tzdata2023a (2023-03-22 12:39:33 -0700):
  * Starting in 2023, Egypt will observe DST from April's last Friday
    through October's last Thursday.
  * In 2023 Morocco's summer time start transition after Ramadan
    will occur April 23, not April 30.
  * This year Palestine will delay the start of summer time from
    March 25 to April 29 due to Ramadan.
  * Much of Greenland, represented by America/Nuuk, will continue to
    observe DST using European Union rules.
  * America/Yellowknife has changed from a Zone to a backward
    compatibility Link, as it no longer differs from America/Edmonton
    since 1970.
  * Changes to commentary.
@
text
@d38 6
a43 2
# The POSIXRULES macro controls interpretation of POSIX-like TZ
# settings like TZ='EET-2EEST' that lack DST transition rules.
d45 1
d51 3
d66 1
a66 1
# if POSIXRULES is '-' or if the template file cannot be accessed.
d214 1
a214 1
#  -DHAVE__GENERIC=0 if _Generic does not work*
d223 1
a223 1
#  -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+
d232 1
a232 1
#  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+
d235 1
a235 1
#  -DHAVE_STDINT_H=0 if <stdint.h> does not work*+
d238 1
a238 1
#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function+
a244 1
#  -DPORT_TO_C89 if tzcode should also run on C89 platforms+
a247 1
#  -DSUPPORT_C89 if the tzcode library should support C89 callers+
d259 1
a259 7
#	DST transitions for POSIX-style TZ strings lacking them,
#	in the usual case where POSIXRULES is '-'.  If not specified,
#	TZDEFRULESTRING defaults to US rules for future DST transitions.
#	This mishandles some past timestamps, as US DST rules have changed.
#	It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
#	as Europe and US DST rules differ.
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255)
a275 2
# * Options marked "+" are obsolescent and are planned to be removed
#   once the code assumes C99 or later.
d366 1
a366 1
# time library, and if STD_INSPIRED is also defined to nonzero the functions
d458 7
a464 4
# These non-alphabetic, non-ASCII printable characters are Latin-1,
# and so are likely displayable even in editors like XEmacs 21
# that have limited display capabilities.
UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷
d467 1
a467 1
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)
d836 1
a836 1
check_sorted: backward backzone
@


1.1.1.37
log
@Import tzdata2023d from https://github.com/JodaOrg/global-tz/releases/download/2023dgtz/tzdata2023dgtz.tar.gz

Summary of changes in tzdata2023d (2023-12-21 20:02:24 -0800):
  * Ittoqqortoormiit, Greenland (America/Scoresbysund) joins most of
    the rest of Greenland's timekeeping practice on 2024-03-31, by
    changing its time zone from -01/+00 to -02/-01.
  * Fix predictions for DST transitions in Palestine in 2072-2075,
    correcting a typo introduced in 2023a.
  * Various fixes to zones for several Antarctic bases.
@
text
@d2 1
a4 19
# Request POSIX conformance; this must be the first non-comment line.
.POSIX:
# On older platforms you may need to scrounge for a POSIX-conforming 'make'.
# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or
# /usr/xpg4/bin/make, not /usr/ccs/bin/make.

# To affect how this Makefile works, you can run a shell script like this:
#
#	#!/bin/sh
#	make CC='gcc -std=gnu11' "$@@"
#
# This example script is appropriate for a pre-2017 GNU/Linux system
# where a non-default setting is needed to support this package's use of C99.
#
# Alternatively, you can simply edit this Makefile to tailor the following
# macro definitions.

###############################################################################
# Start of macros that one plausibly might want to tailor.
d194 2
a195 3
# Add the following to an uncommented "CFLAGS=" line as needed
# to override defaults specified in the source code or by the system.
# "-DFOO" is equivalent to "-DFOO=1".
d237 1
a237 5
#  -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
#	Typically it is better to use a later standard.  For example,
#	with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
#	Even with -DPORT_TO_C89, the code needs at least one C99
#	feature (integers at least 64 bits wide) and maybe more.
a241 1
#	However, this might trigger latent bugs in C99-or-later callers.
a272 4
#  -g to generate symbolic debugging info
#  -Idir to include from directory 'dir'
#  -O0 to disable optimization; other -O options to enable more optimization
#  -Uname to remove any definition of the macro 'name'
d277 1
a277 1
#   once the code assumes C99 or later, say in the year 2029.
d356 1
a356 2
# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone.
# "timelocal" is nearly equivalent to "mktime".
a358 1
# I.e., "timeoff" is like calling "mktime_z" with a fixed-offset zone.
d381 1
a381 1
# which claims to test C and POSIX conformance.  If you want to pass PCTS, add
a390 3
#
# POSIX says CFLAGS defaults to "-O 1".
# Uncomment the following line and edit its contents as needed.
d392 1
a392 1
#CFLAGS= -O 1
d394 2
d397 1
a397 8
# The name of a POSIX-like library archiver, its flags, C compiler,
# linker flags, and 'make' utility.  Ordinarily the defaults suffice.
# The commented-out values are the defaults specified by POSIX 202x/D3.
#AR = ar
#ARFLAGS = -rv
#CC = c17
#LDFLAGS =
#MAKE = make
d421 1
a421 1
# The name of a POSIX-compliant 'awk' on your system.
d428 1
a428 1
# The full path name of a POSIX-compliant shell, preferably one that supports
d432 1
a432 1
# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash
d506 3
a508 2
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:
d510 2
a511 3
# POSIX prohibits defining or using SHELL.  However, csh users on systems
# that use the user shell for Makefile commands may need to define SHELL.
#SHELL=		/bin/sh
d513 1
a513 2
# End of macros that one plausibly might want to tailor.
###############################################################################
d515 2
d546 1
a546 1
ZONETABLES=	zone.tab zone1970.tab zonenow.tab
d554 1
a554 1
AWK_SCRIPTS=	checklinks.awk checknow.awk checktab.awk leapseconds.awk \
d575 1
a575 1
		checklinks.awk checknow.awk checktab.awk \
d585 6
a590 1
		zone.tab zone1970.tab zonenow.tab
a659 10
tzdir.h:
		printf '%s\n' >$@@.out \
		  '#ifndef TZDEFAULT' \
		  '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \
		  '#endif' \
		  '#ifndef TZDIR' \
		  '# define TZDIR "$(TZDIR)" /* TZif directory */' \
		  '#endif'
		mv $@@.out $@@

d766 1
a766 1
		$(AR) $(ARFLAGS) $@@ $(LIBOBJS)
d774 7
a780 7
		  -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \
		  -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \
		  -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \
		  -e s\''\(REPORT_BUGS_TO\)=.*'\''\1=\'\''$(BUGEMAIL)\'\'\' \
		  -e s\''\(TZDIR\)=[^}]*'\''\1=\'\''$(TZDIR)\'\'\' \
		  -e s\''\(TZVERSION\)=.*'\''\1=\'"'$$VERSION\\''" \
		  <$@@.ksh >$@@.out
d786 1
a786 2
		  check_name_lengths check_now \
		  check_slashed_abbrs check_sorted \
a788 8
# True if UTF8_LOCALE does not work;
# otherwise, false but with LC_ALL set to $(UTF8_LOCALE).
UTF8_LOCALE_MISSING = \
  { test ! '$(UTF8_LOCALE)' \
    || ! printf 'A\304\200B\n' \
         | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \
    || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; }

d790 4
a793 1
	$(UTF8_LOCALE_MISSING) || { \
a807 1
	$(UTF8_LOCALE_MISSING) || { \
d809 5
a813 4
		! grep -En "$$pat|[$s]\$$" \
			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \
	}
	touch $@@
d853 1
a853 23
# Check timestamps from now through 28 years from now, to make sure
# that zonenow.tab contains all sequences of planned timestamps,
# without any duplicate sequences.  In theory this might require
# 2800 years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = `./date +%s`
CHECK_NOW_FUTURE_YEARS = 28
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60
check_now:	checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@.dir
		mkdir $@@.dir
		./zic -d $@@.dir tzdata.zi
		now=$(CHECK_NOW_TIMESTAMP) && \
		  future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \
		  ./zdump -i -t $$now,$$future \
		     $$(find $$PWD/$@@.dir/????*/ -type f) \
		     >$@@.dir/zdump.tab
		$(AWK) \
		  -v zdump_table=$@@.dir/zdump.tab \
		  -f checknow.awk zonenow.tab
		rm -fr $@@.dir
		touch $@@

check_tables:	checktab.awk $(YDATA) backward zone.tab zone1970.tab
d913 1
a913 1
		rm -fr check_*.dir typecheck_*.dir
d916 1
a916 1
		  date tzdir.h tzselect version.h zdump zic libtz.a
d954 1
a954 1
  <"$$dest" && \
d956 1
a956 1
     lsout=`ls -nt --time-style="+%s" "$$@@" 2>/dev/null`; then \
d958 2
a959 8
    timestamp=`expr $$7 + $$n` && \
    echo "+ touch -md @@$$timestamp $$dest" && \
    touch -md @@$$timestamp "$$dest"; \
  else \
    newest=`ls -t "$$@@" | sed 1q` && \
    echo "+ touch -mr $$newest $$dest" && \
    touch -mr "$$newest" "$$dest"; \
  fi'
d984 2
a985 6
		      time=`TZ=UTC0 git log -1 \
			--format='tformat:%cd' \
			--date='format:%Y-%m-%dT%H:%M:%SZ' \
			$$file` && \
		      echo "+ touch -md $$time $$file" && \
		      touch -md $$time $$file; \
d1010 1
a1010 2
		cd public.dir \
		  && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL
d1141 1
a1141 1
		touch -mr version $@@.dir/version
d1165 1
a1165 1
		touch -mr tzdata.zi $@@.dir/etcetera
d1176 1
a1176 1
		touch -mr version $@@.dir/version
d1228 1
a1228 1
localtime.o:	private.h tzfile.h tzdir.h
d1231 1
a1231 1
zic.o:		private.h tzfile.h tzdir.h version.h
@


1.1.1.38
log
@Import tzdata2024a from https://github.com/JodaOrg/global-tz/releases/download/2024agtz/tzdata2024agtz.tar.gz

Summary of changes in tzdata2024a (2024-02-01 09:28:56 -0800):
  * Kazakhstan unifies on UTC+5.
  * Palestine summer time begins a week later than previously predicted
    in 2024 and 2025.
  * Historic corrections for Asia/Ho_Chi_Minh (1955) America/Toronto (1947-9)
    and America/Miquelon (1911).
@
text
@d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ
d277 1
a277 1
#	DST transitions for POSIX.1-2017-style TZ strings lacking them,
d343 3
a345 4
# and define NO_TM_ZONE to suppress any guessing.
# Although these two fields are not required by POSIX.1-2017,
# POSIX 202x/D4 requires them and they are widely available
# on GNU/Linux and BSD systems.
d355 1
a355 1
# # to the "CFLAGS=" line.  "tzname" is required by POSIX.1-1988 and later.
d365 2
a366 2
# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI).
d430 1
a430 1
# The commented-out values are the defaults specified by POSIX.1-202x/D4.
a441 6
# Where to fetch leap-seconds.list from.
leaplist_URI = \
  https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
# The file is generated by the IERS Earth Orientation Centre, in Paris.
leaplist_TZ = Europe/Paris

d474 1
a474 2
# Name of curl <https://curl.haxx.se/>, used for HTML validation
# and to fetch leap-seconds.list from upstream.
a720 22
# Awk script to extract a Git-style author from leap-seconds.list comments.
EXTRACT_AUTHOR = \
  author_line { sub(/^.[[:space:]]*/, ""); \
      sub(/:[[:space:]]*/, " <"); \
      printf "%s>\n", $$0; \
      success = 1; \
      exit \
  } \
  /Questions or comments to:/ { author_line = 1 } \
  END { exit !success }

# Fetch leap-seconds.list from upstream.
fetch-leap-seconds.list:
		$(CURL) -OR $(leaplist_URI)

# Fetch leap-seconds.list from upstream and commit it to the local repository.
commit-leap-seconds.list: fetch-leap-seconds.list
		author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \
		date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \
		git commit --author="$$author" --date="$$date" -m'make $@@' \
		  leap-seconds.list

d1317 1
a1317 2
.PHONY: clean clean_misc commit-leap-seconds.list dummy.zd
.PHONY: fetch-leap-seconds.list force_tzs
@


1.1.1.38.2.1
log
@Sync with HEAD
@
text
@d6 3
a8 3
# On older platforms you may need to scrounge for POSIX conformance.
# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007),
# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'.
d13 1
a13 1
#	make CC='gcc -std=gnu23' "$@@"
d15 2
a16 2
# This example script is appropriate for a circa 2024 GNU/Linux system
# where a non-default setting enables this package's optional use of C23.
d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-like TZ
d135 2
a136 3
TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck
TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
  uint_least64_t.ck
d139 1
a139 1
# zone data format that zic generates; see Internet RFC 9636.)
a221 1
#	on POSIX platforms predating POSIX.1-2024
d232 1
a232 1
#	ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier
a255 1
#  -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
d263 3
a265 6
#  -Dssize_t=int on hosts like MS-Windows that lack ssize_t
#  -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
#	Although -DSUPPORT_C89=0 might work around latent bugs in callers,
#	it does not conform to POSIX.
#  -DSUPPORT_POSIX2008 if the library should support older POSIX callers+
#	However, this might cause problems in POSIX.1-2024-or-later callers.
d277 1
a277 1
#	DST transitions for proleptic format TZ strings lacking them,
d283 1
a283 1
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254)
d305 1
a305 2
#   once the code assumes C99 or later (say in the year 2029)
#   and POSIX.1-2024 or later (say in the year 2034).
d312 1
a312 1
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
d316 1
a316 2
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \
  -Wdate-time \
d318 1
a318 1
  -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
d321 1
a321 2
  -Wmissing-declarations -Wmissing-prototypes \
  -Wmissing-variable-declarations -Wnested-externs \
d330 1
a330 1
  -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
d332 2
a333 1
  -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
d344 3
a346 2
# Although POSIX.1-2024 requires these fields and they are widely available
# on GNU/Linux and BSD systems, some older systems lack them.
d356 1
a356 3
# # to the "CFLAGS=" line.  Although "tzname" is required by POSIX.1-1988
# # and later, its contents are unspecified if you use a geographical TZ
# # and the variable is planned to be removed in a future POSIX edition.
d367 1
a367 3
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI),
# # although their contents are unspecified if you use a geographical TZ
# # and the variables are planned to be removed in a future edition of POSIX.
d431 1
a431 1
# The commented-out values are the defaults specified by POSIX.1-2024.
d438 5
d464 1
a464 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)'
a482 1
# Set CURL=: to disable use of the Internet.
d536 1
a536 1
GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \
d539 4
a542 7
SETUP_TAR= \
  export LC_ALL=C && \
  if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \
    TAR='tar $(GNUTARFLAGS)'; \
  else \
    TAR=tar; \
  fi
d549 2
a550 6
SETUP_DIFF_TZS = \
  if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \
    DIFF_TZS='diff -u -F^TZ='; \
  else \
    DIFF_TZS='diff -u'; \
  fi
d564 2
a565 2
TZDOBJS=	zdump.o localtime.o strftime.o
DATEOBJS=	date.o localtime.o strftime.o
d582 2
a583 1
CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck
d606 2
a607 2
TZS_DEPS=	$(YDATA) localtime.c private.h \
			strftime.c tzfile.h zdump.c zic.c
d644 2
a645 1
			-p $(POSIXRULES) \
d668 4
a671 4
		  V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty) || \
		  if test '$(VERSION)' = unknown && read -r V <$@@; then \
		    V=$${V%-dirty}-dirty; \
d681 1
a681 1
		  -v DATAFORM=$(@@:.zi=) \
d690 1
a690 1
		read -r version <version && \
d711 1
a711 1
		read -r VERSION <version && printf '%s\n' \
d751 1
a751 1
# Arguments to pass to submakes.
d756 1
d765 4
d770 1
a770 1
		$(ZIC_INSTALL) tzdata.zi
d773 2
a774 1
		$(ZIC_INSTALL) -L leapseconds tzdata.zi
d805 2
a806 1
		./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@@:.zd=)" >$@@
d815 2
a816 1
		x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
d818 1
a818 1
		     | LC_ALL=C sort -t . -k 2,2) && \
d822 1
a822 1
		$(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
d828 1
a828 1
# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the
d845 1
a845 1
		read -r VERSION <version && sed \
d856 5
a860 5
check: check_mild back.ck now.ck
check_mild: check_web check_zishrink \
  character-set.ck white-space.ck links.ck mainguard.ck \
  name-lengths.ck slashed-abbrs.ck sorted.ck \
  tables.ck ziguard.ck tzs.ck
d868 1
a868 1
    || { export LC_ALL='$(UTF8_LOCALE)'; false; }; }
d870 1
a870 1
character-set.ck: $(ENCHILADA)
d885 1
a885 1
white-space.ck: $(ENCHILADA)
d887 1
a887 2
		enchilada='$(ENCHILADA)' && \
		patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \
d889 1
a889 2
		    $${enchilada%leap-seconds.list*} \
		    $${enchilada#*leap-seconds.list}; \
d896 2
a897 2
name-lengths.ck: $(TDATA_TO_CHECK) backzone
		:;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
a900 5
mainguard.ck: main.zi
		test '$(PACKRATLIST)' || \
		  cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi
		touch $@@

d907 2
a908 2
slashed-abbrs.ck: $(TDATA_TO_CHECK)
		:;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
d913 1
a913 1
sorted.ck: backward backzone
d916 1
a916 1
		$(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu
d919 1
a919 1
back.ck: checklinks.awk $(TDATA_TO_CHECK)
d925 1
a925 1
links.ck: checklinks.awk tzdata.zi
d934 2
a935 2
# 2800+ years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = $$(./date +%s)
d937 5
a941 5
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60
now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@d
		mkdir $@@d
		./zic -d $@@d tzdata.zi
d943 1
a943 1
		  future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \
d945 2
a946 6
		     $$(find "$$PWD/$@@d"/????*/ -type f) \
		     >$@@d/zdump-now.tab && \
		  ./zdump -i -t 0,$$future \
		     $$(find "$$PWD/$@@d" -name Etc -prune \
			  -o -type f ! -name '*.tab' -print) \
		     >$@@d/zdump-1970.tab
d948 1
a948 1
		  -v zdump_table=$@@d/zdump-now.tab \
d950 1
a950 7
		$(AWK) \
		  'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \
		  $(PRIMARY_YDATA) backward factory | \
		 $(AWK) \
		   -v zdump_table=$@@d/zdump-1970.tab \
		   -f checknow.awk
		rm -fr $@@d
d953 1
a953 1
tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab
d961 1
a961 1
tzs.ck: $(TZS) $(TZS_NEW)
d963 1
a963 1
		  $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \
d970 7
a976 5
.SUFFIXES: .ck .html
.html.ck:
		{ ! ($(CURL) --version) >/dev/null 2>&1 || \
		    $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		          -F file=@@$<; } >$@@.out && \
d980 1
a980 1
ziguard.ck: rearguard.zi vanguard.zi ziguard.awk
d989 2
a990 2
check_zishrink: zishrink-posix.ck zishrink-right.ck
zishrink-posix.ck zishrink-right.ck: \
d993 2
a994 2
		rm -fr $@@d t-$@@d shrunk-$@@d
		mkdir $@@d t-$@@d shrunk-$@@d
d996 1
a996 1
		  *right*) leap='-L leapseconds';; \
d999 2
a1000 2
		  $(ZIC) $$leap -d $@@d $(DATAFORM).zi && \
		  $(ZIC) $$leap -d shrunk-$@@d tzdata.zi && \
d1003 1
a1003 1
		      $(ZIC) $$leap -d t-$@@d $(TDATA) && \
d1005 2
a1006 2
			$(ZIC) $$leap -d t-$@@d - $(PACKRATDATA) && \
		      diff -r $@@d t-$@@d;; \
d1008 2
a1009 2
		diff -r $@@d shrunk-$@@d
		rm -fr $@@d t-$@@d shrunk-$@@d
d1013 3
a1015 2
		rm -fr *.ckd *.dir
		rm -f *.ck *.core *.o *.out core core.* \
d1018 1
a1018 1
		rm -fr tzdb-*/
d1029 1
a1029 1
public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \
d1043 1
a1043 1
		LC_ALL=C sh workman.sh $(@@:.txt=) >$@@.out
d1056 1
a1056 1
     lsout=$$(ls -nt --time-style="+%s" "$$@@" 2>/dev/null); then \
d1058 1
a1058 1
    timestamp=$$(($$7 + $$n)) && \
d1062 1
a1062 1
    newest=$$(ls -t "$$@@" | sed 1q) && \
d1085 1
a1085 1
		   files=$$(git ls-files $(EIGHT_YARDS)) && \
d1089 2
a1090 2
		    if git diff --quiet HEAD $$file; then \
		      time=$$(TZ=UTC0 git log -1 \
d1093 1
a1093 1
			$$file) && \
d1102 2
a1103 2
		for file in $(MANTXTS); do \
		  $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \
d1116 5
a1120 5
public.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d \
d1122 3
a1124 2
		for i in $(TDATA_TO_CHECK) \
		    tzdata.zi vanguard.zi main.zi rearguard.zi; \
d1126 1
a1126 1
		  $@@d/zic -v -d $@@d/zoneinfo $@@d/$$i || exit; \
d1128 1
a1128 1
		$@@d/zic -v -d $@@d/zoneinfo-all $(TDATA_TO_CHECK)
d1131 5
a1135 5
		rm $@@d/main.zi
		cd $@@d && $(MAKE) PACKRATDATA=backzone main.zi
		$@@d/zic -d $@@d/zoneinfo main.zi
		rm $@@d/main.zi
		cd $@@d && \
d1137 1
a1137 1
		$@@d/zic -d $@@d/zoneinfo main.zi
d1139 1
a1139 1
		rm -fr $@@d
d1147 3
a1149 3
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
d1151 1
a1151 1
		  *32_t*) range=-2147483648,2147483648;; \
d1155 2
a1156 2
		wd=$$PWD && \
		zones=$$($(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab) && \
d1162 3
a1164 3
		(cd $@@d && \
		  $(MAKE) TOPDIR="$$wd/$@@d" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$(@@:.ck=)'" \
d1166 1
a1166 1
		    D="$$wd/$@@d" \
d1170 2
a1171 2
		  (cd $(TIME_T_ALTERNATIVES_HEAD)d && \
		    $(MAKE) TOPDIR="$$wd/$@@d" \
d1173 1
a1173 1
		      D="$$wd/$@@d" \
d1175 2
a1176 3
		  $(SETUP_DIFF_TZS) && \
		  $$DIFF_TZS $(TIME_T_ALTERNATIVES_HEAD)d/to$$range.tzs \
			  $@@d/to$$range.tzs && \
d1182 2
a1183 2
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \
					   $@@d/etc && \
d1185 2
a1186 2
		      $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \
		      $@@d/usr/share; \
d1201 1
a1201 1
		read -r VERSION <version && \
d1220 2
a1221 2
		$(SETUP_TAR) && \
		$$TAR -cf - \
d1227 2
a1228 2
		$(SETUP_TAR) && \
		$$TAR -cf - $(TZDATA_DIST) | \
d1253 1
a1253 1
		$(SETUP_TAR) && \
d1255 1
a1255 1
		   $$TAR -cf - \
a1270 5
		if test $(DATAFORM) = vanguard; then \
		  pacificnew=; \
		else \
		  pacificnew=pacificnew; \
		fi && \
d1273 1
a1273 1
		  $$pacificnew
d1293 1
a1293 1
		$(SETUP_TAR) && \
d1295 1
a1295 1
		   $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@@.out
d1303 2
a1304 2
		$(SETUP_TAR) && \
		$$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
d1315 6
a1320 6
typecheck: long-long.ck unsigned.ck
long-long.ck unsigned.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d && \
d1322 2
a1323 2
		    long-long.*) i="long long";; \
		    unsigned.* ) i="unsigned" ;; \
d1325 1
d1328 1
a1328 1
		    TOPDIR="$$PWD" \
d1330 1
a1330 1
		$@@d/zdump -i -c 1970,1971 Europe/Rome
d1336 1
a1336 1
asctime.o:	private.h
d1339 4
a1342 4
localtime.o:	private.h tzdir.h tzfile.h
strftime.o:	localtime.c private.h tzdir.h tzfile.h
zdump.o:	private.h version.h
zic.o:		private.h tzdir.h tzfile.h version.h
d1349 1
a1349 1
.PHONY: install maintainer-clean names
@


1.1.1.39
log
@Import tzdata2024b
   from https://github.com/JodaOrg/global-tz/releases/download/2024bgtz/tzdata2024bgtz.tar.gz

Summary of changes in tzdata2024b (2024-09-04 12:27:47 -0700):
  * Asia/Choibalsan is now an alias for Asia/Ulaanbaatar rather than
    being a separate Zone with differing behavior before April 2008.
  * Historical transitions for Mexico have been updated based on
    official Mexican decrees.
  * Historical transitions for Portugal, represented by Europe/Lisbon,
    Atlantic/Azores, and Atlantic/Madeira, have been updated based on a
    close reading of old Portuguese legislation, replacing previous data
    mainly originating from Whitman and Shanks & Pottenger.
  * Changes to documentation.
  * Changes to commentary.

None of these changes are significant, so no pullups of this update are planned.
The next update, whenever that occurs, when something that matters alters, is
likely to be pulled up.
@
text
@d6 3
a8 3
# On older platforms you may need to scrounge for POSIX conformance.
# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007),
# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'.
d13 1
a13 1
#	make CC='gcc -std=gnu23' "$@@"
d15 2
a16 2
# This example script is appropriate for a circa 2024 GNU/Linux system
# where a non-default setting enables this package's optional use of C23.
d56 1
a56 1
# The POSIXRULES macro controls interpretation of POSIX-like TZ
d135 2
a136 3
TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck
TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
  uint_least64_t.ck
a221 1
#	on POSIX platforms predating POSIX.1-2024
d232 1
a232 1
#	ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier
d264 2
a265 5
#  -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
#	Although -DSUPPORT_C89=0 might work around latent bugs in callers,
#	it does not conform to POSIX.
#  -DSUPPORT_POSIX2008 if the library should support older POSIX callers+
#	However, this might cause problems in POSIX.1-2024-or-later callers.
d277 1
a277 1
#	DST transitions for proleptic format TZ strings lacking them,
d305 1
a305 2
#   once the code assumes C99 or later (say in the year 2029)
#   and POSIX.1-2024 or later (say in the year 2034).
d312 1
a312 1
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
d318 1
a318 1
  -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
d321 1
a321 2
  -Wmissing-declarations -Wmissing-prototypes \
  -Wmissing-variable-declarations -Wnested-externs \
d330 1
a330 1
  -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
d332 2
a333 1
  -Wno-format-nonliteral -Wno-sign-compare
d344 3
a346 2
# Although POSIX.1-2024 requires these fields and they are widely available
# on GNU/Linux and BSD systems, some older systems lack them.
d356 1
a356 3
# # to the "CFLAGS=" line.  Although "tzname" is required by POSIX.1-1988
# # and later, its contents are unspecified if you use a geographical TZ
# # and the variable is planned to be removed in a future POSIX edition.
d367 1
a367 3
# # Systems Group code and are required by POSIX.1-2008 and later (with XSI),
# # although their contents are unspecified if you use a geographical TZ
# # and the variables are planned to be removed in a future edition of POSIX.
d431 1
a431 1
# The commented-out values are the defaults specified by POSIX.1-2024.
d438 5
d464 1
a464 1
ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)'
a482 1
# Set CURL=: to disable use of the Internet.
d536 1
a536 1
GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \
d539 4
a542 7
SETUP_TAR= \
  export LC_ALL=C && \
  if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \
    TAR='tar $(GNUTARFLAGS)'; \
  else \
    TAR=tar; \
  fi
d549 2
a550 6
SETUP_DIFF_TZS = \
  if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \
    DIFF_TZS='diff -u -F^TZ='; \
  else \
    DIFF_TZS='diff -u'; \
  fi
d564 2
a565 2
TZDOBJS=	zdump.o localtime.o strftime.o
DATEOBJS=	date.o localtime.o strftime.o
d582 2
a583 1
CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck
d644 2
a645 1
			-p $(POSIXRULES) \
d668 4
a671 4
		  V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
				--abbrev=7 --dirty) || \
		  if test '$(VERSION)' = unknown && read -r V <$@@; then \
		    V=$${V%-dirty}-dirty; \
d681 1
a681 1
		  -v DATAFORM=$(@@:.zi=) \
d690 1
a690 1
		read -r version <version && \
d711 1
a711 1
		read -r VERSION <version && printf '%s\n' \
d751 1
a751 1
# Arguments to pass to submakes.
d756 1
d765 4
d770 1
a770 1
		$(ZIC_INSTALL) tzdata.zi
d773 2
a774 1
		$(ZIC_INSTALL) -L leapseconds tzdata.zi
d805 2
a806 1
		./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@@:.zd=)" >$@@
d815 2
a816 1
		x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
d818 1
a818 1
		     | LC_ALL=C sort -t . -k 2,2) && \
d822 1
a822 1
		$(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
d828 1
a828 1
# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the
d845 1
a845 1
		read -r VERSION <version && sed \
d856 5
a860 5
check: check_mild back.ck
check_mild: check_web check_zishrink \
  character-set.ck white-space.ck links.ck mainguard.ck \
  name-lengths.ck now.ck slashed-abbrs.ck sorted.ck \
  tables.ck ziguard.ck tzs.ck
d868 1
a868 1
    || { export LC_ALL='$(UTF8_LOCALE)'; false; }; }
d870 1
a870 1
character-set.ck: $(ENCHILADA)
d885 1
a885 1
white-space.ck: $(ENCHILADA)
d887 1
a887 2
		enchilada='$(ENCHILADA)' && \
		patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \
d889 1
a889 2
		    $${enchilada%leap-seconds.list*} \
		    $${enchilada#*leap-seconds.list}; \
d896 2
a897 2
name-lengths.ck: $(TDATA_TO_CHECK) backzone
		:;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
a900 5
mainguard.ck: main.zi
		test '$(PACKRATLIST)' || \
		  cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi
		touch $@@

d907 2
a908 2
slashed-abbrs.ck: $(TDATA_TO_CHECK)
		:;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
d913 1
a913 1
sorted.ck: backward backzone
d916 1
a916 1
		$(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu
d919 1
a919 1
back.ck: checklinks.awk $(TDATA_TO_CHECK)
d925 1
a925 1
links.ck: checklinks.awk tzdata.zi
d934 2
a935 2
# 2800+ years but that would take a long time to check.
CHECK_NOW_TIMESTAMP = $$(./date +%s)
d937 5
a941 8
CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60
now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		touch $@@
# Original code:
check_now_original:	checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
		rm -fr $@@d
		mkdir $@@d
		./zic -d $@@d tzdata.zi
d943 1
a943 1
		  future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \
d945 2
a946 6
		     $$(find "$$PWD/$@@d"/????*/ -type f) \
		     >$@@d/zdump-now.tab && \
		  ./zdump -i -t 0,$$future \
		     $$(find "$$PWD/$@@d" -name Etc -prune \
			  -o -type f ! -name '*.tab' -print) \
		     >$@@d/zdump-1970.tab
d948 1
a948 1
		  -v zdump_table=$@@d/zdump-now.tab \
d950 1
a950 7
		$(AWK) \
		  'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \
		  $(PRIMARY_YDATA) backward factory | \
		 $(AWK) \
		   -v zdump_table=$@@d/zdump-1970.tab \
		   -f checknow.awk
		rm -fr $@@d
d953 1
a953 1
tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab
d961 1
a961 1
tzs.ck: $(TZS) $(TZS_NEW)
d963 1
a963 1
		  $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \
d970 7
a976 5
.SUFFIXES: .ck .html
.html.ck:
		{ ! ($(CURL) --version) >/dev/null 2>&1 || \
		    $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
		          -F file=@@$<; } >$@@.out && \
d980 1
a980 1
ziguard.ck: rearguard.zi vanguard.zi ziguard.awk
d989 2
a990 2
check_zishrink: zishrink-posix.ck zishrink-right.ck
zishrink-posix.ck zishrink-right.ck: \
d993 2
a994 2
		rm -fr $@@d t-$@@d shrunk-$@@d
		mkdir $@@d t-$@@d shrunk-$@@d
d996 1
a996 1
		  *right*) leap='-L leapseconds';; \
d999 2
a1000 2
		  $(ZIC) $$leap -d $@@d $(DATAFORM).zi && \
		  $(ZIC) $$leap -d shrunk-$@@d tzdata.zi && \
d1003 1
a1003 1
		      $(ZIC) $$leap -d t-$@@d $(TDATA) && \
d1005 2
a1006 2
			$(ZIC) $$leap -d t-$@@d - $(PACKRATDATA) && \
		      diff -r $@@d t-$@@d;; \
d1008 2
a1009 2
		diff -r $@@d shrunk-$@@d
		rm -fr $@@d t-$@@d shrunk-$@@d
d1013 3
a1015 2
		rm -fr *.ckd *.dir
		rm -f *.ck *.core *.o *.out core core.* \
d1018 1
a1018 1
		rm -fr tzdb-*/
d1029 1
a1029 1
public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \
d1043 1
a1043 1
		LC_ALL=C sh workman.sh $(@@:.txt=) >$@@.out
d1056 1
a1056 1
     lsout=$$(ls -nt --time-style="+%s" "$$@@" 2>/dev/null); then \
d1058 1
a1058 1
    timestamp=$$(($$7 + $$n)) && \
d1062 1
a1062 1
    newest=$$(ls -t "$$@@" | sed 1q) && \
d1085 1
a1085 1
		   files=$$(git ls-files $(EIGHT_YARDS)) && \
d1090 1
a1090 1
		      time=$$(TZ=UTC0 git log -1 \
d1093 1
a1093 1
			$$file) && \
d1102 2
a1103 2
		for file in $(MANTXTS); do \
		  $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \
d1116 5
a1120 5
public.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d \
d1122 3
a1124 2
		for i in $(TDATA_TO_CHECK) \
		    tzdata.zi vanguard.zi main.zi rearguard.zi; \
d1126 1
a1126 1
		  $@@d/zic -v -d $@@d/zoneinfo $@@d/$$i || exit; \
d1128 1
a1128 1
		$@@d/zic -v -d $@@d/zoneinfo-all $(TDATA_TO_CHECK)
d1131 5
a1135 5
		rm $@@d/main.zi
		cd $@@d && $(MAKE) PACKRATDATA=backzone main.zi
		$@@d/zic -d $@@d/zoneinfo main.zi
		rm $@@d/main.zi
		cd $@@d && \
d1137 1
a1137 1
		$@@d/zic -d $@@d/zoneinfo main.zi
d1139 1
a1139 1
		rm -fr $@@d
d1147 3
a1149 3
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
d1151 1
a1151 1
		  *32_t*) range=-2147483648,2147483648;; \
d1155 2
a1156 2
		wd=$$PWD && \
		zones=$$($(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab) && \
d1162 3
a1164 3
		(cd $@@d && \
		  $(MAKE) TOPDIR="$$wd/$@@d" \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$(@@:.ck=)'" \
d1166 1
a1166 1
		    D="$$wd/$@@d" \
d1170 2
a1171 2
		  (cd $(TIME_T_ALTERNATIVES_HEAD)d && \
		    $(MAKE) TOPDIR="$$wd/$@@d" \
d1173 1
a1173 1
		      D="$$wd/$@@d" \
d1175 2
a1176 3
		  $(SETUP_DIFF_TZS) && \
		  $$DIFF_TZS $(TIME_T_ALTERNATIVES_HEAD)d/to$$range.tzs \
			  $@@d/to$$range.tzs && \
d1182 2
a1183 2
		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \
					   $@@d/etc && \
d1185 2
a1186 2
		      $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \
		      $@@d/usr/share; \
d1201 1
a1201 1
		read -r VERSION <version && \
d1220 2
a1221 2
		$(SETUP_TAR) && \
		$$TAR -cf - \
d1227 2
a1228 2
		$(SETUP_TAR) && \
		$$TAR -cf - $(TZDATA_DIST) | \
d1253 1
a1253 1
		$(SETUP_TAR) && \
d1255 1
a1255 1
		   $$TAR -cf - \
a1270 5
		if test $(DATAFORM) = vanguard; then \
		  pacificnew=; \
		else \
		  pacificnew=pacificnew; \
		fi && \
d1273 1
a1273 1
		  $$pacificnew
d1293 1
a1293 1
		$(SETUP_TAR) && \
d1295 1
a1295 1
		   $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@@.out
d1303 2
a1304 2
		$(SETUP_TAR) && \
		$$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@@.out
d1315 6
a1320 6
typecheck: long-long.ck unsigned.ck
long-long.ck unsigned.ck: $(VERSION_DEPS)
		rm -fr $@@d
		mkdir $@@d
		ln $(VERSION_DEPS) $@@d
		cd $@@d && \
d1322 2
a1323 2
		    long-long.*) i="long long";; \
		    unsigned.* ) i="unsigned" ;; \
d1325 1
d1328 1
a1328 1
		    TOPDIR="$$PWD" \
d1330 1
a1330 1
		$@@d/zdump -i -c 1970,1971 Europe/Rome
d1349 1
a1349 1
.PHONY: install maintainer-clean names
@


1.1.1.40
log
@Import tzdata2025a from ftp://ftp.iana.org/tz/releases/tzdata2025a.tar.gz

Summary of changes in tzdata2025a (2025-01-15 10:47:24 -0800):
  * Paraguay stopped changing its clocks after the forward
    transition on 2024-10-06, so it is now permanently at -03.
  * Correct timestamps for the Philippines before 1900, and from 1937
    through 1990.
@
text
@d140 1
a140 1
# zone data format that zic generates; see Internet RFC 9636.)
a257 1
#  -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
d265 1
a265 1
#  -Dssize_t=int on hosts like MS-Windows that lack ssize_t
d288 1
a288 1
#  -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254)
d322 1
a322 2
  -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \
  -Wdate-time \
d339 1
a339 1
  -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
d617 2
a618 2
TZS_DEPS=	$(YDATA) localtime.c private.h \
			strftime.c tzfile.h zdump.c zic.c
d858 1
a858 1
check: check_mild back.ck now.ck
d861 1
a861 1
  name-lengths.ck slashed-abbrs.ck sorted.ck \
a930 1
		  -v backcheck=backward \
d948 3
d1108 1
a1108 1
		    if git diff --quiet HEAD $$file; then \
d1359 1
a1359 1
asctime.o:	private.h
d1362 4
a1365 4
localtime.o:	private.h tzdir.h tzfile.h
strftime.o:	localtime.c private.h tzdir.h tzfile.h
zdump.o:	private.h version.h
zic.o:		private.h tzdir.h tzfile.h version.h
@


1.1.1.41
log
@Import tzdata2025a from https://github.com/JodaOrg/global-tz/releases/download/2025agtz/tzdata2025agtz.tar.gz

Summary of changes in tzdata2025a (2025-01-15 10:47:24 -0800):
  * Paraguay stopped changing its clocks after the forward
    transition on 2024-10-06, so it is now permanently at -03.
  * Correct timestamps for the Philippines before 1900, and from 1937
    through 1990.
@
text
@d933 1
@


1.1.1.42
log
@Import tzdata2025c
	from https://github.com/JodaOrg/global-tz/releases/download/2025cgtz/tzdata2025cgtz.tar.gz

Summary of changes in tzdata2025c (2025-12-10 14:42:37 -0800):
  * Baja California agreed with California’s DST rules in 1953 and in
    1961 through 1975, instead of observing standard time all year.
  * Changes to commentary.
@
text
@a5 2
# By default, builds of code and data assume POSIX.1-2001 or later;
# this assumption can be relaxed by tailoring the build as described below.
a8 10
# Reproducible builds of distribution tarballs also need a copy of the
# Git repository, and assume the behavior of the following programs
# (or later versions):
#	Git 2.7.0 (2016)
#	GNU Coreutils 6.3 (2006)
#	GNU Tar 1.14 (2004)
#	GnuPG 1.4 (2004)
# Although tzdb does not come with a software bill of materials,
# you should be able to construct one based on the above information,
# your platform, and the way you use this Makefile.
d13 1
a13 1
#	make CFLAGS='-O2 -DHAVE_GETTEXT=0' "$@@"
d15 2
a16 3
# This example script is appropriate for a GNU/Linux system
# which needs more optimization than default, and which does not want
# gettext's internationalization of diagnostics.
d153 2
a154 3
# below.  POSIX mandates that leap seconds not be counted, and a
# nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with
# these, use "posix_only" or "posix_right".  Use POSIX time on systems with
a208 6
# Extra flags for producing man page files like tzfile.5.txt.
# These flags are used only if groff (or mandoc) is present.
# Each option should begin with "-" and should lack shell metacharacters.
# Plausible options include -Tascii and -Tutf8.
MANFLAGS=	-Tutf8

a221 2
#  -DFREE_PRESERVES_ERRNO=[01] if the 'free' function munges or preserves errno
#	(default is guessed)
a226 1
#  -DHAVE_FCHMOD=0 if your system lacks the fchmod function
a227 1
#  -DHAVE_GETEUID=0 if gete?[ug]id do not work
a229 1
#  -DHAVE_GETRESUID=0 if getres[ug]id do not work
a236 3
#  -DHAVE_ISSETUGID=1 if issetugid works, 0 otherwise (default is guessed)
#	If 0, you may also use -DHAVE_SYS_AUXV_H=1 if <sys/auxv.h> works,
#	0 otherwise (default is guessed).
a241 1
#  -DHAVE_MEMPCPY=1 if your system has mempcpy, 0 if not (default is guessed)
d243 1
a243 4
#	variables like 'tzname' required by POSIX
#  -DHAVE_PWD_H=0 if your system lacks pwd.h, grp.h and corresponding functions
#	If 0, you may also need -Dgid_t=G -Duid_t=U
#	to define gid_t and uid_t to be types G and U.
a244 2
#  -DHAVE_SETMODE=[01] if your system lacks or has the setmode and getmode
#	functions (default is guessed)
a250 1
#  -DHAVE_STRNLEN=0 if your system lacks the strnlen function+
a251 2
#  -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a member st_ctim+
#  -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+
a253 1
#	If 0, you may also need -Dmode_t=M to define mode_t to be type M.
a258 2
#  -DOPENAT_TZDIR if tzset should use openat on TZDIR then a relative open.
#	See localtime.c for details.
a276 20
#	The following options can also be used:
#	  -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps,
#	    at some cost in CPU time and energy in multi-threaded apps.
#	    The following options can also be used:
#	      -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded
#		variable, 0 otherwise (default is guessed)
#	      -DHAVE_SYS_SINGLE_THREADED_H=0 if <sys/single_threaded.h> works,
#		0 otherwise (default is guessed)
#	  -DTHREAD_RWLOCK to use read-write locks intead of mutexes.
#	    This can improve paralellism and thus save real time
#	    if many threads call tzcode functions simultaneously.
#	    It also costs CPU time and thus energy.
#	  -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime
#	    return different struct tm * addresses in different threads.
#	    This supports unportable programs that call
#	    gmtime/localtime/offtime when they should call
#	    gmtime_r/localtime_r/offtime_r to avoid races.
#	    Because the corresponding storage is freed on thread exit,
#	    this option is incompatible with POSIX.1-2024 and earlier.
#	    It also costs CPU time and memory.
a278 8
#  -DTZ_CHANGE_INTERVAL=N if functions depending on TZ should check
#	no more often than every N seconds for TZif file changes.
#	If N is negative (the default), no such checking is done.
#	This option is intended for platforms that want localtime etc.
#	to respond to changes to a file selected by TZ, including to
#	TZDEFAULT (normally /etc/localtime) if TZ is unset.
#	On these platforms, REDO should be "posix_only" or "posix_right".
#	This option does not affect tzalloc-allocated objects.
d317 1
a317 1
  -fsanitize-trap=all -fstack-protector
d396 1
a396 3
# "offtime_r" is to "offtime" what "gmtime_r" is to "gmtime".
# I.e., "offtime" and "offtime_r" are like calling "localtime_rz"
# with a fixed-offset zone.
a453 5
#
# To fetch leap-seconds.list from NIST via a less-secure protocol
# and with less-volatile metadata, use these settings:
#leaplist_URI = ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list
#leaplist_TZ = America/Denver
d513 7
a519 4
# These non-alphabetic, non-ASCII printable characters are
# used in commentary or in generated *.txt files
# and are not likely to cause confusion.
UNUSUAL_OK_CHARSET= §«°±»½¾×–‘’“”•→−≤★⟨⟩⯪
d528 3
d877 3
a879 3
		! grep -Env $(SAFE_LINE) $(MANS) date.1 \
			$(MISC) $(SOURCES) \
			LICENSE \
d891 1
d894 2
a895 1
		    $(ENCHILADA:leap-seconds.list=); \
d961 1
a961 1
		     >$@@d/zdump-1970.tab && \
a962 2
		  -v now=$$now \
		  -v now_out=$@@.out \
d972 1
a972 2
		touch $@@.out
		mv $@@.out $@@
d1033 1
a1033 1
		rm -f *.ck *.core *.o *.out *.t core core.* \
d1061 1
a1061 1
		LC_ALL=C sh workman.sh $(MANFLAGS) $(@@:.txt=) >$@@.out
d1110 1
a1110 1
			--date='format-local:%Y-%m-%dT%H:%M:%SZ' \
d1209 2
a1210 2
  tzcode$(VERSION).tar.gz.asc.t \
  tzdata$(VERSION).tar.gz.asc.t
d1212 1
a1212 1
  tzdata$(VERSION)-rearguard.tar.gz.asc.t
d1214 1
a1214 1
  tzdb-$(VERSION).tar.lz.asc.t
d1226 1
a1226 1
  tzdb-$(VERSION).tar.lz.t
d1228 1
a1228 1
  tzdata$(VERSION)-rearguard.tar.gz.t
d1230 1
a1230 1
  tzcode$(VERSION).tar.gz.t tzdata$(VERSION).tar.gz.t
d1232 1
a1232 1
  tzdata$(VERSION)-tailored.tar.gz.t
d1237 1
a1237 1
tzcode$(VERSION).tar.gz.t: set-timestamps.out
d1241 2
a1242 3
		  gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(COMMON) $(DOCS) $(SOURCES)
		touch $@@
d1244 1
a1244 1
tzdata$(VERSION).tar.gz.t: set-timestamps.out
d1247 2
a1248 3
		  gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(TZDATA_DIST)
		touch $@@
d1257 1
a1257 1
tzdata$(VERSION)-rearguard.tar.gz.t: rearguard.zi set-timestamps.out
d1275 2
a1276 5
		     gzip $(GZIPFLAGS)) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) \
		  $$(cd $@@.dir && \
		       ls $(TZDATA_DIST) pacificnew | sed 's,^,$@@.dir/,')
		touch $@@
d1285 1
a1285 1
tzdata$(VERSION)-tailored.tar.gz.t: set-timestamps.out
d1297 1
a1297 1
		(sed '/^#/!d' tzdata.zi && echo && cat $(DATAFORM).zi) \
d1318 2
a1319 4
		   $$TAR -cf - *) | gzip $(GZIPFLAGS) >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) \
		  $$(cd $@@.dir && ls * | sed 's,^,$@@.dir/,')
		touch $@@
d1321 1
a1321 1
tzdb-$(VERSION).tar.lz.t: set-timestamps.out set-tzs-timestamp.out
d1327 2
a1328 3
		  $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$(@@:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) tzdb-$(VERSION)
		touch $@@
d1330 4
a1333 4
tzcode$(VERSION).tar.gz.asc.t: tzcode$(VERSION).tar.gz.t
tzdata$(VERSION).tar.gz.asc.t: tzdata$(VERSION).tar.gz.t
tzdata$(VERSION)-rearguard.tar.gz.asc.t: tzdata$(VERSION)-rearguard.tar.gz.t
tzdb-$(VERSION).tar.lz.asc.t: tzdb-$(VERSION).tar.lz.t
d1335 1
a1335 3
		$(GPG) --armor --detach-sign $(?:.t=)
		$(SET_TIMESTAMP) $(@@:.t=) $(?:.t=)
		touch $@@
@


1.1.1.43
log
@Import tzdata2026a from https://github.com/JodaOrg/global-tz/releases/download/2026agtz/tzdata2026agtz.tar.gz

Summary of changes in tzdata2026a (2026-03-01 22:59:49 -0800):

    Moldova has used EU transition times since 2022.
@
text
@d69 22
d173 1
a173 1
REDO=		posix_only
d287 1
a287 4
#  -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a status-change member
#	of type struct timespec, so code should use st_ctime instead;
#	but if the status-change member name is st_ctimespec,
#	use -Dst_ctim=st_ctimespec instead (default is guessed)+
d325 2
a326 2
#	  -DTHREAD_RWLOCK to use read-write locks instead of mutexes.
#	    This can improve parallelism and thus save real time
d331 1
a331 1
#	    This supports nonportable programs that call
a349 4
#  -DTZ_RUNTIME_LEAPS=0 to disable runtime support for leap seconds.
#	This conforms to POSIX, shrinks tzcode's attack surface,
#	and is more efficient.  However, it fails to support Internet
#	RFC 9636's leap seconds.
d351 3
a353 2
#	DST transitions for proleptic format TZ strings lacking them.
#	If not specified, it defaults to US rules for future DST transitions.
d403 1
a403 1
  -Wsuggest-attribute=cold \
a408 1
  -Wzero-as-null-pointer-constant \
d726 1
@


1.1.1.1.6.1
log
@file Makefile was added on branch tls-maxphys on 2014-08-20 00:00:20 +0000
@
text
@d1 624
@


1.1.1.1.6.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a0 624
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.

# Package name for the code distribution.
PACKAGE=	tzcode

# Version numbers of the code and data distributions.
VERSION=	2014f

# Email address for bug reports.
BUGEMAIL=	tz@@iana.org

# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
#	zic -l rightzone
# to correct things.
# Use the command
#	make zonenames
# to get a list of the values you can use for LOCALTIME.

LOCALTIME=	GMT

# If you want something other than Eastern United States time as a template
# for handling POSIX-style time zone environment variables,
# change the line below (after finding the zone you want in the
# time zone files, or adding it to a time zone file).
# (When a POSIX-style environment variable is handled, the rules in the
# template file are used to determine "spring forward" and "fall back" days and
# times; the environment variable itself specifies UT offsets of standard and
# summer time.)
# Alternately, if you discover you've got the wrong time zone, you can just
#	zic -p rightzone
# to correct things.
# Use the command
#	make zonenames
# to get a list of the values you can use for POSIXRULES.
# If you want POSIX compatibility, use "America/New_York".

POSIXRULES=	America/New_York

# Also see TZDEFRULESTRING below, which takes effect only
# if the time zone files cannot be accessed.

# Everything gets put in subdirectories of. . .

TOPDIR=		/usr/local

# "Compiled" time zone information is placed in the "TZDIR" directory
# (and subdirectories).
# Use an absolute path name for TZDIR unless you're just testing the software.

TZDIR_BASENAME=	zoneinfo
TZDIR=		$(TOPDIR)/etc/$(TZDIR_BASENAME)

# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t

# The "tzselect", "zic", and "zdump" commands get installed in. . .

ETCDIR=		$(TOPDIR)/etc

# If you "make INSTALL", the "date" command gets installed in. . .

BINDIR=		$(TOPDIR)/bin

# Manual pages go in subdirectories of. . .

MANDIR=		$(TOPDIR)/man

# Library functions are put in an archive in LIBDIR.

LIBDIR=		$(TOPDIR)/lib

# If you always want time values interpreted as "seconds since the epoch
# (not counting leap seconds)", use
#	REDO=		posix_only
# below.  If you always want right time values interpreted as "seconds since
# the epoch" (counting leap seconds)", use
#	REDO=		right_only
# below.  If you want both sets of data available, with leap seconds not
# counted normally, use
#	REDO=		posix_right
# below.  If you want both sets of data available, with leap seconds counted
# normally, use
#	REDO=		right_posix
# below.
# POSIX mandates that leap seconds not be counted; for compatibility with it,
# use either "posix_only" or "posix_right".

REDO=		posix_right

# Since "." may not be in PATH...

YEARISTYPE=	./yearistype

# Non-default libraries needed to link.
# Add -lintl if you want to use 'gettext' on Solaris.
LDLIBS=

# Add the following to the end of the "CFLAGS=" line as needed.
#  -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
#  -DHAVE_ADJTIME=0 if 'adjtime' does not exist (SVR0?)
#  -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
#  -DHAVE_GETTEXT=1 if 'gettext' works (GNU, Linux, Solaris); also see LDLIBS
#  -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
#	ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
#  -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
#  -DHAVE_LINK=0 if your system lacks a link function
#  -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?)
#  -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4)
#  -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD)
#  -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD)
#  -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h"
#  -DHAVE_SYMLINK=0 if your system lacks the symlink function
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h"
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
#  -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
#  -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h"
#  -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale"
#  -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
#	if you do not want run time warnings about formats that may cause
#	year 2000 grief
#  -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
#  -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
#  -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
#	the default is system-supplied, typically "/usr/lib/locale"
#  -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
#	DST transitions if the time zone files cannot be accessed
#  -DZIC_MAX_ABBR_LEN_WO_WARN=3
#	(or some other number) to set the maximum time zone abbreviation length
#	that zic will accept without a warning (the default is 6)
#  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
	-Wall -Wextra \
	-Wbad-function-cast -Wcast-align -Wcast-qual \
	-Wdeclaration-after-statement \
	-Wformat=2 -Winit-self -Wjump-misses-init \
	-Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
	-Wnested-externs -Wno-address -Wno-cast-qual \
	-Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
	-Wno-type-limits \
	-Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
	-Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
	-Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
	-Wsuggest-attribute=pure -Wtrampolines \
	-Wwrite-strings
#
# If you want to use System V compatibility code, add
#	-DUSG_COMPAT
# to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
# variables to be kept up-to-date by the time conversion functions.  Neither
# "timezone" nor "daylight" is described in X3J11's work.
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
#	-DTM_GMTOFF=tm_gmtoff
# or
#	-DTM_GMTOFF=_tm_gmtoff
# to the end of the "CFLAGS=" line.
# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
# in its work, use of "tm_gmtoff" is described as non-conforming.
# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
# their recent releases.
#
# If your system has a "zone abbreviation" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
#	-DTM_ZONE=tm_zone
# or
#	-DTM_ZONE=_tm_zone
# to the end of the "CFLAGS=" line.
# Neither tm_zone nor _tm_zone is described in X3J11's work;
# in its work, use of "tm_zone" is described as non-conforming.
# Both UCB and Sun have done the equivalent of defining TM_ZONE in
# their recent releases.
#
# If you want functions that were inspired by early versions of X3J11's work,
# add
#	-DSTD_INSPIRED
# to the end of the "CFLAGS=" line.  This arranges for the functions
# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
# "posix2time", and "time2posix" to be added to the time conversion library.
# "tzsetwall" is like "tzset" except that it arranges for local wall clock
# time (rather than the time specified in the TZ environment variable)
# to be used.
# "offtime" is like "gmtime" except that it accepts a second (long) argument
# that gives an offset to add to the time_t when converting it.
# "timelocal" is equivalent to "mktime".
# "timegm" is like "timelocal" except that it turns a struct tm into
# a time_t using UT (rather than local time as "timelocal" does).
# "timeoff" is like "timegm" except that it accepts a second (long) argument
# that gives an offset to use when converting to a time_t.
# "posix2time" and "time2posix" are described in an included manual page.
# X3J11's work does not describe any of these functions.
# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
# These functions may well disappear in future releases of the time
# conversion package.
#
# If you want to allocate state structures in localtime, add
#	-DALL_STATE
# to the end of the "CFLAGS=" line.  Storage is obtained by calling malloc.
#
# If you want an "altzone" variable (a la System V Release 3.1), add
#	-DALTZONE
# to the end of the "CFLAGS=" line.
# This variable is not described in X3J11's work.
#
# If you want a "gtime" function (a la MACH), add
#	-DCMUCS
# to the end of the "CFLAGS=" line
# This function is not described in X3J11's work.
#
# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
# out by the National Institute of Standards and Technology
# which claims to test C and Posix conformance.  If you want to pass PCTS, add
#	-DPCTS
# to the end of the "CFLAGS=" line.
#
# If you want strict compliance with XPG4 as of 1994-04-09, add
#	-DXPG4_1994_04_09
# to the end of the "CFLAGS=" line.  This causes "strftime" to always return
# 53 as a week number (rather than 52 or 53) for those days in January that
# before the first Monday in January when a "%V" format is used and January 1
# falls on a Friday, Saturday, or Sunday.

CFLAGS=

# Linker flags.  Default to $(LFLAGS) for backwards compatibility
# to tzcode2012h and earlier.

LDFLAGS=	$(LFLAGS)

zic=		./zic
ZIC=		$(zic) $(ZFLAGS)

ZFLAGS=

# The name of a Posix-compliant 'awk' on your system.
AWK=		awk

# The full path name of a Posix-compliant shell, preferably one that supports
# the Korn shell's 'select' statement as an extension.
# These days, Bash is the most popular.
# It should be OK to set this to /bin/sh, on platforms where /bin/sh
# lacks 'select' or doesn't completely conform to Posix, but /bin/bash
# is typically nicer if it works.
KSHELL=		/bin/bash

# The path where SGML DTDs are kept and the catalog file(s) to use when
# validating.  The default is appropriate for Ubuntu 13.10.
SGML_TOPDIR= /usr
SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
SGML_CATALOG_FILES= \
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat

# The name, arguments and environment of a program to validate your web pages.
# See <http://www.jclark.com/sp/> for a validator, and
# <http://validator.w3.org/source/> for a validation library.
VALIDATE = nsgmls
VALIDATE_FLAGS = -s -B -wall -wno-unused-param
VALIDATE_ENV = \
  SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
  SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
  SP_CHARSET_FIXED=YES \
  SP_ENCODING=UTF-8

# SAFE_CHAR is a regular expression that matches a safe character.
# Some parts of this distribution are limited to safe characters;
# others can use any UTF-8 character.
# For now, the safe characters are a safe subset of ASCII.
# The caller must set the shell variable 'sharp' to the character '#',
# since Makefile macros cannot contain '#'.
# TAB_CHAR is a single tab character, in single quotes.
TAB_CHAR=	'	'
SAFE_CHARSET1=	$(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@@'
SAFE_CHARSET2=	'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
SAFE_CHARSET3=	'abcdefghijklmnopqrstuvwxyz{|}~'
SAFE_CHARSET=	]$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)-
SAFE_CHAR=	'['$(SAFE_CHARSET)']'
# NONSYM_CHAR is a regular expression that matches any character
# except for a small number of symbols, where we prefer to stick with
# ASCII renderings for the convenience of maintainers whose text editors
# mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
NONSYM_CHAR=	'[^–—°′″≈≠≤≥±−×÷∞←→↔·•§¶«»‘’‚‛“”„‟‹›「」『』〝〞〟]'

# SAFE_LINE matches a line of safe characters.
# SAFE_SHARP_LINE is similar, except any character can follow '#';
# this is so that comments can contain non-ASCII characters.
# NONSYM_LINE matches a line of non-symbols.
# VALID_LINE matches a line of any validly-encoded characters.
SAFE_LINE=	'^'$(SAFE_CHAR)'*$$'
SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(NONSYM_CHAR)'*)?$$'
NONSYM_LINE=	'^'$(NONSYM_CHAR)'*$$'
VALID_LINE=	'^.*$$'

# Flags to give 'tar' when making a distribution.
# Try to use flags appropriate for GNU tar.
GNUTARFLAGS=	--numeric-owner --owner=0 --group=0 --mode=go+u,go-w
TARFLAGS=	`if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \
		 then echo $(GNUTARFLAGS); \
		 else :; \
		 fi`

# Flags to give 'gzip' when making a distribution.
GZIPFLAGS=	-9n

###############################################################################

cc=		cc
CC=		$(cc) -DTZDIR=\"$(TZDIR)\"

AR=		ar

# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:

TZCOBJS=	zic.o scheck.o ialloc.o
TZDOBJS=	zdump.o localtime.o ialloc.o asctime.o
DATEOBJS=	date.o localtime.o strftime.o asctime.o
LIBSRCS=	localtime.c asctime.c difftime.c
LIBOBJS=	localtime.o asctime.o difftime.o
HEADERS=	tzfile.h private.h
NONLIBSRCS=	zic.c zdump.c scheck.c ialloc.c
NEWUCBSRCS=	date.c strftime.c
SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) tzselect.ksh
MANS=		newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
			tzfile.5 tzselect.8 zic.8 zdump.8
MANTXTS=	newctime.3.txt newstrftime.3.txt newtzset.3.txt \
			time2posix.3.txt \
			tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
			date.1.txt
COMMON=		Makefile README
WEB_PAGES=	tz-art.htm tz-link.htm
DOCS=		NEWS Theory $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
PRIMARY_YDATA=	africa antarctica asia australasia \
		europe northamerica southamerica
YDATA=		$(PRIMARY_YDATA) pacificnew etcetera backward
NDATA=		systemv factory
TDATA=		$(YDATA) $(NDATA)
ZONETABLES=	zone1970.tab zone.tab
TABDATA=	iso3166.tab leapseconds $(ZONETABLES)
LEAP_DEPS=	leapseconds.awk leap-seconds.list
DATA=		$(YDATA) $(NDATA) $(TABDATA) \
			$(LEAP_DEPS) yearistype.sh
AWK_SCRIPTS=	checktab.awk leapseconds.awk
MISC=		$(AWK_SCRIPTS) workman.sh zoneinfo2tdf.pl
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC)

# And for the benefit of csh users on systems that assume the user
# shell should be used to handle commands in Makefiles. . .

SHELL=		/bin/sh

all:		tzselect zic zdump libtz.a $(TABDATA)

ALL:		all date

install:	all $(DATA) $(REDO) $(MANS)
		mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
			$(DESTDIR)$(LIBDIR) \
			$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
			$(DESTDIR)$(MANDIR)/man8
		$(ZIC) -y $(YEARISTYPE) \
			-d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
		cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
		cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
		cp libtz.a $(DESTDIR)$(LIBDIR)/.
		$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
		cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
		cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
		cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.

INSTALL:	ALL install date.1
		mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
		cp date $(DESTDIR)$(BINDIR)/.
		cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.

version.h:
		(echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \
		 echo 'static char const TZVERSION[]="$(VERSION)";' && \
		 echo 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";') >$@@

zdump:		$(TZDOBJS)
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)

zic:		$(TZCOBJS) yearistype
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)

yearistype:	yearistype.sh
		cp yearistype.sh yearistype
		chmod +x yearistype

leapseconds:	$(LEAP_DEPS)
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@

posix_only:	zic $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L /dev/null $(TDATA)

right_only:	zic leapseconds $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L leapseconds $(TDATA)

# In earlier versions of this makefile, the other two directories were
# subdirectories of $(TZDIR).  However, this led to configuration errors.
# For example, with posix_right under the earlier scheme,
# TZ='right/Australia/Adelaide' got you localtime with leap seconds,
# but gmtime without leap seconds, which led to problems with applications
# like sendmail that subtract gmtime from localtime.
# Therefore, the other two directories are now siblings of $(TZDIR).
# You must replace all of $(TZDIR) to switch from not using leap seconds
# to using them, or vice versa.
right_posix:	right_only leapseconds
		rm -fr $(DESTDIR)$(TZDIR)-leaps
		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
			-L leapseconds $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
			-L /dev/null $(TDATA)

posix_right:	posix_only leapseconds
		rm -fr $(DESTDIR)$(TZDIR)-posix
		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
			-L /dev/null $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
			-L leapseconds $(TDATA)

zones:		$(REDO)

libtz.a:	$(LIBOBJS)
		$(AR) ru $@@ $(LIBOBJS)
		$(RANLIB) $@@

date:		$(DATEOBJS)
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)

tzselect:	tzselect.ksh
		sed \
			-e 's|#!/bin/bash|#!$(KSHELL)|g' \
			-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
			-e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \
			-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
			-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
			-e 's|\(TZVERSION\)=.*|\1=$(VERSION)|' \
			<$? >$@@
		chmod +x $@@

check:		check_character_set check_tables check_web

check_character_set: $(ENCHILADA)
		LC_ALL=en_US.utf8 && export LC_ALL && \
		sharp='#' && \
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) && \
		! grep -Env $(SAFE_SHARP_LINE) $(YDATA) $(NDATA) iso3166.tab \
			zone.tab leapseconds $(LEAP_DEPS) yearistype.sh && \
		test $$(grep -Ecv $(SAFE_SHARP_LINE) Makefile) -eq 1 && \
		! grep -Env $(NONSYM_LINE) README NEWS Theory $(MANS) date.1 \
			zone1970.tab && \
		! grep -Env $(VALID_LINE) $(ENCHILADA)

check_tables:	checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
		for tab in $(ZONETABLES); do \
		  $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
		    || exit; \
		done

check_web:	$(WEB_PAGES)
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES)

clean_misc:
		rm -f core *.o *.out \
		  date tzselect version.h zdump zic yearistype libtz.a
clean:		clean_misc
		rm -fr tzpublic

maintainer-clean: clean
		@@echo 'This command is intended for maintainers to use; it'
		@@echo 'deletes files that may need special tools to rebuild.'
		rm -f leapseconds $(MANTXTS) *.asc *.tar.gz

names:
		@@echo $(ENCHILADA)

public:		check check_public check_time_t_alternatives \
		tarballs signatures

date.1.txt:	date.1
newctime.3.txt:	newctime.3
newstrftime.3.txt: newstrftime.3
newtzset.3.txt:	newtzset.3
time2posix.3.txt: time2posix.3
tzfile.5.txt:	tzfile.5
tzselect.8.txt:	tzselect.8
zdump.8.txt:	zdump.8
zic.8.txt:	zic.8

$(MANTXTS):	workman.sh
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@

# Set the time stamps to those of the git repository, if available,
# and if the files have not changed since then.
# This uses GNU 'touch' syntax 'touch -d@@N FILE',
# where N is the number of seconds since 1970.
# If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
# Also, set the timestamp of each prebuilt file like 'leapseconds'
# to be the maximum of the files it depends on.
set-timestamps.out: $(ENCHILADA)
		rm -f $@@
		if files=`git ls-files $(ENCHILADA)` && \
		   touch -md @@1 test.out; then \
		  rm -f test.out && \
		  for file in $$files; do \
		    if git diff --quiet $$file; then \
		      time=`git log -1 --format='tformat:%ct' $$file` && \
		      touch -cmd @@$$time $$file; \
		    else \
		      echo >&2 "$$file: warning: does not match repository"; \
		    fi || exit; \
		  done; \
		fi
		touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
		for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
		  touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
		    exit; \
		done
		touch $@@

# The zics below ensure that each data file can stand on its own.
# We also do an all-files run to catch links to links.

check_public:	$(ENCHILADA)
		make maintainer-clean
		make "CFLAGS=$(GCC_DEBUG_FLAGS)" $(ENCHILADA) all
		mkdir tzpublic
		for i in $(TDATA) ; do \
		  $(zic) -v -d tzpublic $$i 2>&1 || exit; \
		done
		$(zic) -v -d tzpublic $(TDATA)
		rm -fr tzpublic

# Check that the code works under various alternative
# implementations of time_t.
check_time_t_alternatives:
		zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
		for type in $(TIME_T_ALTERNATIVES); do \
		  mkdir -p tzpublic/$$type && \
		  make clean_misc && \
		  make TOPDIR=`pwd`/tzpublic/$$type \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
		    install && \
		  diff -qr tzpublic/int64_t/etc/zoneinfo tzpublic/$$type/etc/zoneinfo && \
		  case $$type in \
		  int32_t) range=-2147483648,2147483647;; \
		  uint32_t) range=0,4294967296;; \
		  int64_t) continue;; \
		  *u*) range=0,10000000000;; \
		  *) range=-10000000000,10000000000;; \
		  esac && \
		  echo checking $$type zones ... && \
		  tzpublic/int64_t/etc/zdump -V -t $$range $$zones \
		      >tzpublic/int64_t.out && \
		  tzpublic/$$type/etc/zdump -V -t $$range $$zones \
		      >tzpublic/$$type.out && \
		  diff -u tzpublic/int64_t.out tzpublic/$$type.out \
		    || exit; \
		done
		rm -fr tzpublic

tarballs:	tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz

tzcode$(VERSION).tar.gz: set-timestamps.out
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - \
		    $(COMMON) $(DOCS) $(SOURCES) $(MISC) | \
		  gzip $(GZIPFLAGS) > $@@

tzdata$(VERSION).tar.gz: set-timestamps.out
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - $(COMMON) $(DATA) | \
		  gzip $(GZIPFLAGS) > $@@

signatures:	tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc

tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
		gpg --armor --detach-sign $?

tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
		gpg --armor --detach-sign $?

typecheck:
		make clean
		for i in "long long" unsigned; \
		do \
			make CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
			./zdump -v Europe/Rome ; \
			make clean ; \
		done

zonenames:	$(TDATA)
		@@$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)

asctime.o:	private.h tzfile.h
date.o:		private.h
difftime.o:	private.h
ialloc.o:	private.h
localtime.o:	private.h tzfile.h
scheck.o:	private.h
strftime.o:	tzfile.h
zdump.o:	version.h
zic.o:		private.h tzfile.h version.h

.KEEP_STATE:

.PHONY: ALL INSTALL all
.PHONY: check check_character_set check_public check_tables
.PHONY: check_time_t_alternatives check_web clean clean_misc
.PHONY: install maintainer-clean names posix_only posix_right
.PHONY: public right_only right_posix signatures tarballs typecheck
.PHONY: zonenames zones
@


1.1.1.1.2.1
log
@file Makefile was added on branch tls-earlyentropy on 2014-08-10 06:51:01 +0000
@
text
@d1 624
@


1.1.1.1.2.2
log
@Rebase.
@
text
@a0 624
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.

# Package name for the code distribution.
PACKAGE=	tzcode

# Version numbers of the code and data distributions.
VERSION=	2014f

# Email address for bug reports.
BUGEMAIL=	tz@@iana.org

# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
#	zic -l rightzone
# to correct things.
# Use the command
#	make zonenames
# to get a list of the values you can use for LOCALTIME.

LOCALTIME=	GMT

# If you want something other than Eastern United States time as a template
# for handling POSIX-style time zone environment variables,
# change the line below (after finding the zone you want in the
# time zone files, or adding it to a time zone file).
# (When a POSIX-style environment variable is handled, the rules in the
# template file are used to determine "spring forward" and "fall back" days and
# times; the environment variable itself specifies UT offsets of standard and
# summer time.)
# Alternately, if you discover you've got the wrong time zone, you can just
#	zic -p rightzone
# to correct things.
# Use the command
#	make zonenames
# to get a list of the values you can use for POSIXRULES.
# If you want POSIX compatibility, use "America/New_York".

POSIXRULES=	America/New_York

# Also see TZDEFRULESTRING below, which takes effect only
# if the time zone files cannot be accessed.

# Everything gets put in subdirectories of. . .

TOPDIR=		/usr/local

# "Compiled" time zone information is placed in the "TZDIR" directory
# (and subdirectories).
# Use an absolute path name for TZDIR unless you're just testing the software.

TZDIR_BASENAME=	zoneinfo
TZDIR=		$(TOPDIR)/etc/$(TZDIR_BASENAME)

# Types to try, as an alternative to time_t.  int64_t should be first.
TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t

# The "tzselect", "zic", and "zdump" commands get installed in. . .

ETCDIR=		$(TOPDIR)/etc

# If you "make INSTALL", the "date" command gets installed in. . .

BINDIR=		$(TOPDIR)/bin

# Manual pages go in subdirectories of. . .

MANDIR=		$(TOPDIR)/man

# Library functions are put in an archive in LIBDIR.

LIBDIR=		$(TOPDIR)/lib

# If you always want time values interpreted as "seconds since the epoch
# (not counting leap seconds)", use
#	REDO=		posix_only
# below.  If you always want right time values interpreted as "seconds since
# the epoch" (counting leap seconds)", use
#	REDO=		right_only
# below.  If you want both sets of data available, with leap seconds not
# counted normally, use
#	REDO=		posix_right
# below.  If you want both sets of data available, with leap seconds counted
# normally, use
#	REDO=		right_posix
# below.
# POSIX mandates that leap seconds not be counted; for compatibility with it,
# use either "posix_only" or "posix_right".

REDO=		posix_right

# Since "." may not be in PATH...

YEARISTYPE=	./yearistype

# Non-default libraries needed to link.
# Add -lintl if you want to use 'gettext' on Solaris.
LDLIBS=

# Add the following to the end of the "CFLAGS=" line as needed.
#  -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
#  -DHAVE_ADJTIME=0 if 'adjtime' does not exist (SVR0?)
#  -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
#  -DHAVE_GETTEXT=1 if 'gettext' works (GNU, Linux, Solaris); also see LDLIBS
#  -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
#	ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
#  -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
#  -DHAVE_LINK=0 if your system lacks a link function
#  -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?)
#  -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4)
#  -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD)
#  -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD)
#  -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h"
#  -DHAVE_SYMLINK=0 if your system lacks the symlink function
#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h"
#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
#  -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
#  -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h"
#  -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale"
#  -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
#	if you do not want run time warnings about formats that may cause
#	year 2000 grief
#  -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
#  -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
#  -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
#	the default is system-supplied, typically "/usr/lib/locale"
#  -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
#	DST transitions if the time zone files cannot be accessed
#  -DZIC_MAX_ABBR_LEN_WO_WARN=3
#	(or some other number) to set the maximum time zone abbreviation length
#	that zic will accept without a warning (the default is 6)
#  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
	-Wall -Wextra \
	-Wbad-function-cast -Wcast-align -Wcast-qual \
	-Wdeclaration-after-statement \
	-Wformat=2 -Winit-self -Wjump-misses-init \
	-Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
	-Wnested-externs -Wno-address -Wno-cast-qual \
	-Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
	-Wno-type-limits \
	-Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
	-Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
	-Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
	-Wsuggest-attribute=pure -Wtrampolines \
	-Wwrite-strings
#
# If you want to use System V compatibility code, add
#	-DUSG_COMPAT
# to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
# variables to be kept up-to-date by the time conversion functions.  Neither
# "timezone" nor "daylight" is described in X3J11's work.
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
#	-DTM_GMTOFF=tm_gmtoff
# or
#	-DTM_GMTOFF=_tm_gmtoff
# to the end of the "CFLAGS=" line.
# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
# in its work, use of "tm_gmtoff" is described as non-conforming.
# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
# their recent releases.
#
# If your system has a "zone abbreviation" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
#	-DTM_ZONE=tm_zone
# or
#	-DTM_ZONE=_tm_zone
# to the end of the "CFLAGS=" line.
# Neither tm_zone nor _tm_zone is described in X3J11's work;
# in its work, use of "tm_zone" is described as non-conforming.
# Both UCB and Sun have done the equivalent of defining TM_ZONE in
# their recent releases.
#
# If you want functions that were inspired by early versions of X3J11's work,
# add
#	-DSTD_INSPIRED
# to the end of the "CFLAGS=" line.  This arranges for the functions
# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
# "posix2time", and "time2posix" to be added to the time conversion library.
# "tzsetwall" is like "tzset" except that it arranges for local wall clock
# time (rather than the time specified in the TZ environment variable)
# to be used.
# "offtime" is like "gmtime" except that it accepts a second (long) argument
# that gives an offset to add to the time_t when converting it.
# "timelocal" is equivalent to "mktime".
# "timegm" is like "timelocal" except that it turns a struct tm into
# a time_t using UT (rather than local time as "timelocal" does).
# "timeoff" is like "timegm" except that it accepts a second (long) argument
# that gives an offset to use when converting to a time_t.
# "posix2time" and "time2posix" are described in an included manual page.
# X3J11's work does not describe any of these functions.
# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
# These functions may well disappear in future releases of the time
# conversion package.
#
# If you want to allocate state structures in localtime, add
#	-DALL_STATE
# to the end of the "CFLAGS=" line.  Storage is obtained by calling malloc.
#
# If you want an "altzone" variable (a la System V Release 3.1), add
#	-DALTZONE
# to the end of the "CFLAGS=" line.
# This variable is not described in X3J11's work.
#
# If you want a "gtime" function (a la MACH), add
#	-DCMUCS
# to the end of the "CFLAGS=" line
# This function is not described in X3J11's work.
#
# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
# out by the National Institute of Standards and Technology
# which claims to test C and Posix conformance.  If you want to pass PCTS, add
#	-DPCTS
# to the end of the "CFLAGS=" line.
#
# If you want strict compliance with XPG4 as of 1994-04-09, add
#	-DXPG4_1994_04_09
# to the end of the "CFLAGS=" line.  This causes "strftime" to always return
# 53 as a week number (rather than 52 or 53) for those days in January that
# before the first Monday in January when a "%V" format is used and January 1
# falls on a Friday, Saturday, or Sunday.

CFLAGS=

# Linker flags.  Default to $(LFLAGS) for backwards compatibility
# to tzcode2012h and earlier.

LDFLAGS=	$(LFLAGS)

zic=		./zic
ZIC=		$(zic) $(ZFLAGS)

ZFLAGS=

# The name of a Posix-compliant 'awk' on your system.
AWK=		awk

# The full path name of a Posix-compliant shell, preferably one that supports
# the Korn shell's 'select' statement as an extension.
# These days, Bash is the most popular.
# It should be OK to set this to /bin/sh, on platforms where /bin/sh
# lacks 'select' or doesn't completely conform to Posix, but /bin/bash
# is typically nicer if it works.
KSHELL=		/bin/bash

# The path where SGML DTDs are kept and the catalog file(s) to use when
# validating.  The default is appropriate for Ubuntu 13.10.
SGML_TOPDIR= /usr
SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
SGML_CATALOG_FILES= \
  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat

# The name, arguments and environment of a program to validate your web pages.
# See <http://www.jclark.com/sp/> for a validator, and
# <http://validator.w3.org/source/> for a validation library.
VALIDATE = nsgmls
VALIDATE_FLAGS = -s -B -wall -wno-unused-param
VALIDATE_ENV = \
  SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
  SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
  SP_CHARSET_FIXED=YES \
  SP_ENCODING=UTF-8

# SAFE_CHAR is a regular expression that matches a safe character.
# Some parts of this distribution are limited to safe characters;
# others can use any UTF-8 character.
# For now, the safe characters are a safe subset of ASCII.
# The caller must set the shell variable 'sharp' to the character '#',
# since Makefile macros cannot contain '#'.
# TAB_CHAR is a single tab character, in single quotes.
TAB_CHAR=	'	'
SAFE_CHARSET1=	$(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@@'
SAFE_CHARSET2=	'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
SAFE_CHARSET3=	'abcdefghijklmnopqrstuvwxyz{|}~'
SAFE_CHARSET=	]$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)-
SAFE_CHAR=	'['$(SAFE_CHARSET)']'
# NONSYM_CHAR is a regular expression that matches any character
# except for a small number of symbols, where we prefer to stick with
# ASCII renderings for the convenience of maintainers whose text editors
# mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
NONSYM_CHAR=	'[^–—°′″≈≠≤≥±−×÷∞←→↔·•§¶«»‘’‚‛“”„‟‹›「」『』〝〞〟]'

# SAFE_LINE matches a line of safe characters.
# SAFE_SHARP_LINE is similar, except any character can follow '#';
# this is so that comments can contain non-ASCII characters.
# NONSYM_LINE matches a line of non-symbols.
# VALID_LINE matches a line of any validly-encoded characters.
SAFE_LINE=	'^'$(SAFE_CHAR)'*$$'
SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(NONSYM_CHAR)'*)?$$'
NONSYM_LINE=	'^'$(NONSYM_CHAR)'*$$'
VALID_LINE=	'^.*$$'

# Flags to give 'tar' when making a distribution.
# Try to use flags appropriate for GNU tar.
GNUTARFLAGS=	--numeric-owner --owner=0 --group=0 --mode=go+u,go-w
TARFLAGS=	`if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \
		 then echo $(GNUTARFLAGS); \
		 else :; \
		 fi`

# Flags to give 'gzip' when making a distribution.
GZIPFLAGS=	-9n

###############################################################################

cc=		cc
CC=		$(cc) -DTZDIR=\"$(TZDIR)\"

AR=		ar

# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB=		:

TZCOBJS=	zic.o scheck.o ialloc.o
TZDOBJS=	zdump.o localtime.o ialloc.o asctime.o
DATEOBJS=	date.o localtime.o strftime.o asctime.o
LIBSRCS=	localtime.c asctime.c difftime.c
LIBOBJS=	localtime.o asctime.o difftime.o
HEADERS=	tzfile.h private.h
NONLIBSRCS=	zic.c zdump.c scheck.c ialloc.c
NEWUCBSRCS=	date.c strftime.c
SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) tzselect.ksh
MANS=		newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
			tzfile.5 tzselect.8 zic.8 zdump.8
MANTXTS=	newctime.3.txt newstrftime.3.txt newtzset.3.txt \
			time2posix.3.txt \
			tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
			date.1.txt
COMMON=		Makefile README
WEB_PAGES=	tz-art.htm tz-link.htm
DOCS=		NEWS Theory $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
PRIMARY_YDATA=	africa antarctica asia australasia \
		europe northamerica southamerica
YDATA=		$(PRIMARY_YDATA) pacificnew etcetera backward
NDATA=		systemv factory
TDATA=		$(YDATA) $(NDATA)
ZONETABLES=	zone1970.tab zone.tab
TABDATA=	iso3166.tab leapseconds $(ZONETABLES)
LEAP_DEPS=	leapseconds.awk leap-seconds.list
DATA=		$(YDATA) $(NDATA) $(TABDATA) \
			$(LEAP_DEPS) yearistype.sh
AWK_SCRIPTS=	checktab.awk leapseconds.awk
MISC=		$(AWK_SCRIPTS) workman.sh zoneinfo2tdf.pl
ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC)

# And for the benefit of csh users on systems that assume the user
# shell should be used to handle commands in Makefiles. . .

SHELL=		/bin/sh

all:		tzselect zic zdump libtz.a $(TABDATA)

ALL:		all date

install:	all $(DATA) $(REDO) $(MANS)
		mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
			$(DESTDIR)$(LIBDIR) \
			$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
			$(DESTDIR)$(MANDIR)/man8
		$(ZIC) -y $(YEARISTYPE) \
			-d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
		cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
		cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
		cp libtz.a $(DESTDIR)$(LIBDIR)/.
		$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
		cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
		cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
		cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.

INSTALL:	ALL install date.1
		mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
		cp date $(DESTDIR)$(BINDIR)/.
		cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.

version.h:
		(echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \
		 echo 'static char const TZVERSION[]="$(VERSION)";' && \
		 echo 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";') >$@@

zdump:		$(TZDOBJS)
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)

zic:		$(TZCOBJS) yearistype
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)

yearistype:	yearistype.sh
		cp yearistype.sh yearistype
		chmod +x yearistype

leapseconds:	$(LEAP_DEPS)
		$(AWK) -f leapseconds.awk leap-seconds.list >$@@

posix_only:	zic $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L /dev/null $(TDATA)

right_only:	zic leapseconds $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
			-L leapseconds $(TDATA)

# In earlier versions of this makefile, the other two directories were
# subdirectories of $(TZDIR).  However, this led to configuration errors.
# For example, with posix_right under the earlier scheme,
# TZ='right/Australia/Adelaide' got you localtime with leap seconds,
# but gmtime without leap seconds, which led to problems with applications
# like sendmail that subtract gmtime from localtime.
# Therefore, the other two directories are now siblings of $(TZDIR).
# You must replace all of $(TZDIR) to switch from not using leap seconds
# to using them, or vice versa.
right_posix:	right_only leapseconds
		rm -fr $(DESTDIR)$(TZDIR)-leaps
		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
			-L leapseconds $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
			-L /dev/null $(TDATA)

posix_right:	posix_only leapseconds
		rm -fr $(DESTDIR)$(TZDIR)-posix
		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
		  $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
			-L /dev/null $(TDATA)
		$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
			-L leapseconds $(TDATA)

zones:		$(REDO)

libtz.a:	$(LIBOBJS)
		$(AR) ru $@@ $(LIBOBJS)
		$(RANLIB) $@@

date:		$(DATEOBJS)
		$(CC) -o $@@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)

tzselect:	tzselect.ksh
		sed \
			-e 's|#!/bin/bash|#!$(KSHELL)|g' \
			-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
			-e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \
			-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
			-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
			-e 's|\(TZVERSION\)=.*|\1=$(VERSION)|' \
			<$? >$@@
		chmod +x $@@

check:		check_character_set check_tables check_web

check_character_set: $(ENCHILADA)
		LC_ALL=en_US.utf8 && export LC_ALL && \
		sharp='#' && \
		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
			$(MISC) $(SOURCES) $(WEB_PAGES) && \
		! grep -Env $(SAFE_SHARP_LINE) $(YDATA) $(NDATA) iso3166.tab \
			zone.tab leapseconds $(LEAP_DEPS) yearistype.sh && \
		test $$(grep -Ecv $(SAFE_SHARP_LINE) Makefile) -eq 1 && \
		! grep -Env $(NONSYM_LINE) README NEWS Theory $(MANS) date.1 \
			zone1970.tab && \
		! grep -Env $(VALID_LINE) $(ENCHILADA)

check_tables:	checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
		for tab in $(ZONETABLES); do \
		  $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
		    || exit; \
		done

check_web:	$(WEB_PAGES)
		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES)

clean_misc:
		rm -f core *.o *.out \
		  date tzselect version.h zdump zic yearistype libtz.a
clean:		clean_misc
		rm -fr tzpublic

maintainer-clean: clean
		@@echo 'This command is intended for maintainers to use; it'
		@@echo 'deletes files that may need special tools to rebuild.'
		rm -f leapseconds $(MANTXTS) *.asc *.tar.gz

names:
		@@echo $(ENCHILADA)

public:		check check_public check_time_t_alternatives \
		tarballs signatures

date.1.txt:	date.1
newctime.3.txt:	newctime.3
newstrftime.3.txt: newstrftime.3
newtzset.3.txt:	newtzset.3
time2posix.3.txt: time2posix.3
tzfile.5.txt:	tzfile.5
tzselect.8.txt:	tzselect.8
zdump.8.txt:	zdump.8
zic.8.txt:	zic.8

$(MANTXTS):	workman.sh
		LC_ALL=C sh workman.sh `expr $@@ : '\(.*\)\.txt$$'` >$@@

# Set the time stamps to those of the git repository, if available,
# and if the files have not changed since then.
# This uses GNU 'touch' syntax 'touch -d@@N FILE',
# where N is the number of seconds since 1970.
# If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
# Also, set the timestamp of each prebuilt file like 'leapseconds'
# to be the maximum of the files it depends on.
set-timestamps.out: $(ENCHILADA)
		rm -f $@@
		if files=`git ls-files $(ENCHILADA)` && \
		   touch -md @@1 test.out; then \
		  rm -f test.out && \
		  for file in $$files; do \
		    if git diff --quiet $$file; then \
		      time=`git log -1 --format='tformat:%ct' $$file` && \
		      touch -cmd @@$$time $$file; \
		    else \
		      echo >&2 "$$file: warning: does not match repository"; \
		    fi || exit; \
		  done; \
		fi
		touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
		for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
		  touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
		    exit; \
		done
		touch $@@

# The zics below ensure that each data file can stand on its own.
# We also do an all-files run to catch links to links.

check_public:	$(ENCHILADA)
		make maintainer-clean
		make "CFLAGS=$(GCC_DEBUG_FLAGS)" $(ENCHILADA) all
		mkdir tzpublic
		for i in $(TDATA) ; do \
		  $(zic) -v -d tzpublic $$i 2>&1 || exit; \
		done
		$(zic) -v -d tzpublic $(TDATA)
		rm -fr tzpublic

# Check that the code works under various alternative
# implementations of time_t.
check_time_t_alternatives:
		zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
		for type in $(TIME_T_ALTERNATIVES); do \
		  mkdir -p tzpublic/$$type && \
		  make clean_misc && \
		  make TOPDIR=`pwd`/tzpublic/$$type \
		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
		    install && \
		  diff -qr tzpublic/int64_t/etc/zoneinfo tzpublic/$$type/etc/zoneinfo && \
		  case $$type in \
		  int32_t) range=-2147483648,2147483647;; \
		  uint32_t) range=0,4294967296;; \
		  int64_t) continue;; \
		  *u*) range=0,10000000000;; \
		  *) range=-10000000000,10000000000;; \
		  esac && \
		  echo checking $$type zones ... && \
		  tzpublic/int64_t/etc/zdump -V -t $$range $$zones \
		      >tzpublic/int64_t.out && \
		  tzpublic/$$type/etc/zdump -V -t $$range $$zones \
		      >tzpublic/$$type.out && \
		  diff -u tzpublic/int64_t.out tzpublic/$$type.out \
		    || exit; \
		done
		rm -fr tzpublic

tarballs:	tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz

tzcode$(VERSION).tar.gz: set-timestamps.out
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - \
		    $(COMMON) $(DOCS) $(SOURCES) $(MISC) | \
		  gzip $(GZIPFLAGS) > $@@

tzdata$(VERSION).tar.gz: set-timestamps.out
		LC_ALL=C && export LC_ALL && \
		tar $(TARFLAGS) -cf - $(COMMON) $(DATA) | \
		  gzip $(GZIPFLAGS) > $@@

signatures:	tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc

tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
		gpg --armor --detach-sign $?

tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
		gpg --armor --detach-sign $?

typecheck:
		make clean
		for i in "long long" unsigned; \
		do \
			make CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
			./zdump -v Europe/Rome ; \
			make clean ; \
		done

zonenames:	$(TDATA)
		@@$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)

asctime.o:	private.h tzfile.h
date.o:		private.h
difftime.o:	private.h
ialloc.o:	private.h
localtime.o:	private.h tzfile.h
scheck.o:	private.h
strftime.o:	tzfile.h
zdump.o:	version.h
zic.o:		private.h tzfile.h version.h

.KEEP_STATE:

.PHONY: ALL INSTALL all
.PHONY: check check_character_set check_public check_tables
.PHONY: check_time_t_alternatives check_web clean clean_misc
.PHONY: install maintainer-clean names posix_only posix_right
.PHONY: public right_only right_posix signatures tarballs typecheck
.PHONY: zonenames zones
@


