head	1.129;
access;
symbols
	netbsd-11-0-RC6:1.128
	netbsd-11-0-RC5:1.128
	netbsd-11-0-RC4:1.128
	netbsd-11-0-RC3:1.128
	netbsd-11-0-RC2:1.128
	netbsd-11-0-RC1:1.128
	perseant-exfatfs-base-20250801:1.128
	netbsd-11:1.128.0.2
	netbsd-11-base:1.128
	netbsd-10-1-RELEASE:1.123
	perseant-exfatfs-base-20240630:1.127
	perseant-exfatfs:1.127.0.2
	perseant-exfatfs-base:1.127
	netbsd-8-3-RELEASE:1.59
	netbsd-9-4-RELEASE:1.61
	netbsd-10-0-RELEASE:1.123
	netbsd-10-0-RC6:1.123
	netbsd-10-0-RC5:1.123
	netbsd-10-0-RC4:1.123
	netbsd-10-0-RC3:1.123
	netbsd-10-0-RC2:1.123
	netbsd-10-0-RC1:1.123
	netbsd-10:1.123.0.2
	netbsd-10-base:1.123
	netbsd-9-3-RELEASE:1.61
	cjep_sun2x-base1:1.115
	cjep_sun2x:1.115.0.2
	cjep_sun2x-base:1.115
	cjep_staticlib_x-base1:1.115
	netbsd-9-2-RELEASE:1.61
	cjep_staticlib_x:1.114.0.2
	cjep_staticlib_x-base:1.114
	netbsd-9-1-RELEASE:1.61
	phil-wifi-20200421:1.69
	phil-wifi-20200411:1.69
	is-mlppp:1.69.0.2
	is-mlppp-base:1.69
	phil-wifi-20200406:1.69
	netbsd-8-2-RELEASE:1.59
	netbsd-9-0-RELEASE:1.61
	netbsd-9-0-RC2:1.61
	netbsd-9-0-RC1:1.61
	phil-wifi-20191119:1.63
	netbsd-9:1.61.0.2
	netbsd-9-base:1.61
	phil-wifi-20190609:1.61
	netbsd-8-1-RELEASE:1.59
	netbsd-8-1-RC1:1.59
	pgoyette-compat-merge-20190127:1.59.14.1
	pgoyette-compat-20190127:1.60
	pgoyette-compat-20190118:1.60
	pgoyette-compat-1226:1.60
	pgoyette-compat-1126:1.60
	pgoyette-compat-1020:1.60
	pgoyette-compat-0930:1.60
	pgoyette-compat-0906:1.60
	netbsd-7-2-RELEASE:1.57
	pgoyette-compat-0728:1.60
	netbsd-8-0-RELEASE:1.59
	phil-wifi:1.60.0.2
	phil-wifi-base:1.60
	pgoyette-compat-0625:1.60
	netbsd-8-0-RC2:1.59
	pgoyette-compat-0521:1.59
	pgoyette-compat-0502:1.59
	pgoyette-compat-0422:1.59
	netbsd-8-0-RC1:1.59
	pgoyette-compat-0415:1.59
	pgoyette-compat-0407:1.59
	pgoyette-compat-0330:1.59
	pgoyette-compat-0322:1.59
	pgoyette-compat-0315:1.59
	netbsd-7-1-2-RELEASE:1.57
	pgoyette-compat:1.59.0.14
	pgoyette-compat-base:1.59
	netbsd-7-1-1-RELEASE:1.57
	matt-nb8-mediatek:1.59.0.12
	matt-nb8-mediatek-base:1.59
	perseant-stdc-iso10646:1.59.0.10
	perseant-stdc-iso10646-base:1.59
	netbsd-8:1.59.0.8
	netbsd-8-base:1.59
	prg-localcount2-base3:1.59
	prg-localcount2-base2:1.59
	prg-localcount2-base1:1.59
	prg-localcount2:1.59.0.6
	prg-localcount2-base:1.59
	pgoyette-localcount-20170426:1.59
	bouyer-socketcan-base1:1.59
	pgoyette-localcount-20170320:1.59
	netbsd-7-1:1.57.0.8
	netbsd-7-1-RELEASE:1.57
	netbsd-7-1-RC2:1.57
	netbsd-7-nhusb-base-20170116:1.57
	bouyer-socketcan:1.59.0.4
	bouyer-socketcan-base:1.59
	pgoyette-localcount-20170107:1.59
	netbsd-7-1-RC1:1.57
	pgoyette-localcount-20161104:1.59
	netbsd-7-0-2-RELEASE:1.57
	localcount-20160914:1.59
	netbsd-7-nhusb:1.57.0.6
	netbsd-7-nhusb-base:1.57
	pgoyette-localcount-20160806:1.59
	pgoyette-localcount-20160726:1.59
	pgoyette-localcount:1.59.0.2
	pgoyette-localcount-base:1.59
	netbsd-7-0-1-RELEASE:1.57
	netbsd-7-0:1.57.0.4
	netbsd-7-0-RELEASE:1.57
	netbsd-7-0-RC3:1.57
	netbsd-7-0-RC2:1.57
	netbsd-7-0-RC1:1.57
	netbsd-5-2-3-RELEASE:1.44
	netbsd-5-1-5-RELEASE:1.44
	netbsd-6-0-6-RELEASE:1.55
	netbsd-6-1-5-RELEASE:1.55
	netbsd-7:1.57.0.2
	netbsd-7-base:1.57
	yamt-pagecache-base9:1.56
	yamt-pagecache-tag8:1.55.2.1
	netbsd-6-1-4-RELEASE:1.55
	netbsd-6-0-5-RELEASE:1.55
	tls-earlyentropy:1.56.0.8
	tls-earlyentropy-base:1.57
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.56
	riastradh-drm2-base3:1.56
	netbsd-6-1-3-RELEASE:1.55
	netbsd-6-0-4-RELEASE:1.55
	netbsd-5-2-2-RELEASE:1.44
	netbsd-5-1-4-RELEASE:1.44
	netbsd-6-1-2-RELEASE:1.55
	netbsd-6-0-3-RELEASE:1.55
	netbsd-5-2-1-RELEASE:1.44
	netbsd-5-1-3-RELEASE:1.44
	netbsd-6-1-1-RELEASE:1.55
	riastradh-drm2-base2:1.56
	riastradh-drm2-base1:1.56
	riastradh-drm2:1.56.0.4
	riastradh-drm2-base:1.56
	netbsd-6-1:1.55.0.10
	netbsd-6-0-2-RELEASE:1.55
	netbsd-6-1-RELEASE:1.55
	netbsd-6-1-RC4:1.55
	netbsd-6-1-RC3:1.55
	agc-symver:1.56.0.6
	agc-symver-base:1.56
	netbsd-6-1-RC2:1.55
	dholland-make-base:1.56
	netbsd-6-1-RC1:1.55
	yamt-pagecache-base8:1.56
	netbsd-5-2:1.44.0.12
	netbsd-6-0-1-RELEASE:1.55
	yamt-pagecache-base7:1.56
	netbsd-5-2-RELEASE:1.44
	netbsd-5-2-RC1:1.44
	matt-nb6-plus-nbase:1.55
	yamt-pagecache-base6:1.56
	netbsd-6-0:1.55.0.8
	netbsd-6-0-RELEASE:1.55
	netbsd-6-0-RC2:1.55
	tls-maxphys:1.56.0.2
	tls-maxphys-base:1.57
	matt-nb6-plus:1.55.0.6
	matt-nb6-plus-base:1.55
	netbsd-6-0-RC1:1.55
	yamt-pagecache-base5:1.55
	yamt-pagecache-base4:1.55
	netbsd-6:1.55.0.4
	netbsd-6-base:1.55
	netbsd-5-1-2-RELEASE:1.44
	netbsd-5-1-1-RELEASE:1.44
	yamt-pagecache-base3:1.55
	yamt-pagecache-base2:1.55
	yamt-pagecache:1.55.0.2
	yamt-pagecache-base:1.55
	cherry-xenmp:1.53.0.2
	cherry-xenmp-base:1.53
	bouyer-quota2-nbase:1.51
	bouyer-quota2:1.51.0.2
	bouyer-quota2-base:1.51
	matt-mips64-premerge-20101231:1.51
	matt-nb5-mips64-premerge-20101231:1.44
	matt-nb5-pq3:1.44.0.10
	matt-nb5-pq3-base:1.44
	netbsd-5-1:1.44.0.8
	netbsd-5-1-RELEASE:1.44
	netbsd-5-1-RC4:1.44
	matt-nb5-mips64-k15:1.44
	netbsd-5-1-RC3:1.44
	netbsd-5-1-RC2:1.44
	netbsd-5-1-RC1:1.44
	netbsd-5-0-2-RELEASE:1.44
	matt-nb5-mips64-premerge-20091211:1.44
	matt-premerge-20091211:1.49
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.44
	matt-nb4-mips64-k7-u2a-k9b:1.44
	matt-nb5-mips64-u1-k1-k5:1.44
	matt-nb5-mips64:1.44.0.6
	netbsd-5-0-1-RELEASE:1.44
	jym-xensuspend-nbase:1.49
	netbsd-5-0:1.44.0.4
	netbsd-5-0-RELEASE:1.44
	netbsd-5-0-RC4:1.44
	netbsd-5-0-RC3:1.44
	netbsd-5-0-RC2:1.44
	jym-xensuspend:1.46.0.2
	jym-xensuspend-base:1.49
	netbsd-5-0-RC1:1.44
	netbsd-5:1.44.0.2
	netbsd-5-base:1.44
	matt-mips64-base2:1.44
	matt-mips64:1.41.0.10
	mjf-devfs2:1.43.0.8
	mjf-devfs2-base:1.43
	netbsd-4-0-1-RELEASE:1.41.2.1
	wrstuden-revivesa-base-3:1.43
	wrstuden-revivesa-base-2:1.43
	wrstuden-fixsa-newbase:1.41.2.1
	wrstuden-revivesa-base-1:1.43
	yamt-pf42-base4:1.43
	yamt-pf42-base3:1.43
	hpcarm-cleanup-nbase:1.43
	yamt-pf42-baseX:1.43
	yamt-pf42-base2:1.43
	wrstuden-revivesa:1.43.0.6
	wrstuden-revivesa-base:1.43
	yamt-pf42:1.43.0.4
	yamt-pf42-base:1.43
	keiichi-mipv6-nbase:1.43
	keiichi-mipv6:1.43.0.2
	keiichi-mipv6-base:1.43
	christos-broken:1.43
	matt-armv6-nbase:1.43
	matt-armv6-prevmlocking:1.41.8.1
	wrstuden-fixsa-base-1:1.41.2.1
	netbsd-4-0:1.41.2.1.0.2
	netbsd-4-0-RELEASE:1.41.2.1
	cube-autoconf:1.42.0.2
	cube-autoconf-base:1.42
	netbsd-4-0-RC5:1.41.2.1
	netbsd-4-0-RC4:1.41.2.1
	netbsd-4-0-RC3:1.41.2.1
	netbsd-4-0-RC2:1.41.2.1
	netbsd-4-0-RC1:1.41
	matt-armv6:1.41.0.8
	matt-armv6-base:1.42
	matt-mips64-base:1.41
	hpcarm-cleanup:1.41.0.6
	hpcarm-cleanup-base:1.43
	netbsd-3-1-1-RELEASE:1.33
	netbsd-3-0-3-RELEASE:1.33
	wrstuden-fixsa:1.41.0.4
	wrstuden-fixsa-base:1.41.2.1
	abandoned-netbsd-4-base:1.36
	abandoned-netbsd-4:1.36.0.2
	netbsd-3-1:1.33.0.6
	netbsd-3-1-RELEASE:1.33
	netbsd-3-0-2-RELEASE:1.33
	netbsd-3-1-RC4:1.33
	netbsd-3-1-RC3:1.33
	netbsd-3-1-RC2:1.33
	netbsd-3-1-RC1:1.33
	netbsd-4:1.41.0.2
	netbsd-4-base:1.41
	chap-midi-nbase:1.36
	netbsd-3-0-1-RELEASE:1.33
	chap-midi:1.35.0.2
	chap-midi-base:1.36
	netbsd-3-0:1.33.0.4
	netbsd-3-0-RELEASE:1.33
	netbsd-3-0-RC6:1.33
	netbsd-3-0-RC5:1.33
	netbsd-3-0-RC4:1.33
	netbsd-3-0-RC3:1.33
	netbsd-3-0-RC2:1.33
	netbsd-3-0-RC1:1.33
	netbsd-2-0-3-RELEASE:1.31.2.2
	netbsd-2-1:1.31.2.2.0.4
	netbsd-2-1-RELEASE:1.31.2.2
	netbsd-2-1-RC6:1.31.2.2
	netbsd-2-1-RC5:1.31.2.2
	netbsd-2-1-RC4:1.31.2.2
	netbsd-2-1-RC3:1.31.2.2
	netbsd-2-1-RC2:1.31.2.2
	netbsd-2-1-RC1:1.31.2.2
	netbsd-2-0-2-RELEASE:1.31.2.2
	netbsd-3:1.33.0.2
	netbsd-3-base:1.33
	netbsd-2-0-1-RELEASE:1.31.2.2
	netbsd-2:1.31.2.2.0.2
	netbsd-2-base:1.31.2.2
	netbsd-2-0-RELEASE:1.31.2.2
	netbsd-2-0-RC5:1.31.2.2
	netbsd-2-0-RC4:1.31.2.2
	netbsd-2-0-RC3:1.31.2.2
	netbsd-2-0-RC2:1.31.2.2
	netbsd-2-0-RC1:1.31.2.2
	netbsd-2-0:1.31.0.2
	netbsd-2-0-base:1.31
	netbsd-1-6-PATCH002-RELEASE:1.26
	netbsd-1-6-PATCH002:1.26
	netbsd-1-6-PATCH002-RC4:1.26
	netbsd-1-6-PATCH002-RC3:1.26
	netbsd-1-6-PATCH002-RC2:1.26
	netbsd-1-6-PATCH002-RC1:1.26
	netbsd-1-6-PATCH001:1.26
	netbsd-1-6-PATCH001-RELEASE:1.26
	netbsd-1-6-PATCH001-RC3:1.26
	netbsd-1-6-PATCH001-RC2:1.26
	netbsd-1-6-PATCH001-RC1:1.26
	fvdl_fs64_base:1.26
	netbsd-1-6-RELEASE:1.26
	netbsd-1-6-RC3:1.26
	netbsd-1-6-RC2:1.26
	netbsd-1-6-RC1:1.26
	netbsd-1-6:1.26.0.2
	netbsd-1-6-base:1.26
	netbsd-1-5-PATCH003:1.20.8.1
	netbsd-1-5-PATCH002:1.20.8.1
	netbsd-1-5-PATCH001:1.20.8.1
	netbsd-1-5-RELEASE:1.20.8.1
	netbsd-1-5-BETA2:1.20.8.1
	netbsd-1-5-BETA:1.20.8.1
	netbsd-1-4-PATCH003:1.18.2.1
	netbsd-1-5-ALPHA2:1.20
	netbsd-1-5:1.20.0.8
	netbsd-1-5-base:1.20
	minoura-xpg4dl-base:1.20
	minoura-xpg4dl:1.20.0.6
	netbsd-1-4-PATCH002:1.18
	wrstuden-devbsize-19991221:1.20
	wrstuden-devbsize:1.20.0.4
	wrstuden-devbsize-base:1.20
	comdex-fall-1999:1.20.0.2
	comdex-fall-1999-base:1.20
	netbsd-1-4-PATCH001:1.18
	netbsd-1-4-RELEASE:1.18
	netbsd-1-4:1.18.0.2
	netbsd-1-4-base:1.18
	netbsd-1-3-PATCH003:1.17.2.1
	netbsd-1-3-PATCH003-CANDIDATE2:1.17.2.1
	netbsd-1-3-PATCH003-CANDIDATE1:1.17.2.1
	netbsd-1-3-PATCH003-CANDIDATE0:1.17.2.1
	netbsd-1-3-PATCH002:1.17.2.1
	netbsd-1-3-PATCH001:1.17.2.1
	netbsd-1-3-RELEASE:1.17.2.1
	netbsd-1-3-BETA:1.17.2.1
	netbsd-1-3:1.17.0.2
	netbsd-1-3-base:1.17
	netbsd-1-2-PATCH001:1.10.4.1
	lite-2:1.1.1.2
	CSRG:1.1.1
	netbsd-1-2-RELEASE:1.10
	netbsd-1-2-BETA:1.10
	netbsd-1-2:1.10.0.4
	netbsd-1-2-base:1.10
	netbsd-1-1-PATCH001:1.8
	netbsd-1-1-RELEASE:1.8
	netbsd-1-1:1.8.0.2
	netbsd-1-1-base:1.8
	netbsd-1-0-PATCH06:1.6
	netbsd-1-0-PATCH05:1.6
	netbsd-1-0-PATCH04:1.6
	netbsd-1-0-PATCH03:1.6
	netbsd-1-0-PATCH02:1.6
	netbsd-1-0-PATCH1:1.6
	netbsd-1-0-PATCH0:1.6
	netbsd-1-0-RELEASE:1.6
	netbsd-1-0:1.6.0.2
	netbsd-1-0-base:1.6
	netbsd-0-9-RELEASE:1.1.1.1
	netbsd-0-9-BETA:1.1.1.1
	netbsd-0-9-ALPHA2:1.1.1.1
	netbsd-0-9-ALPHA:1.1.1.1
	netbsd-0-9:1.1.1.1.0.2
	netbsd-0-9-base:1.1.1.1
	netbsd-0-8:1.1.1.1
	netbsd-alpha-1:1.1.1.1
	patchkit-0-2-2:1.1.1.1
	WFJ-386bsd-01:1.1.1.1
	WFJ-920714:1.1.1;
locks; strict;
comment	@# @;


1.129
date	2026.04.23.19.34.07;	author rillig;	state Exp;
branches;
next	1.128;
commitid	LMsEPFkL9JZVp7DG;

1.128
date	2025.01.19.10.57.10;	author rillig;	state Exp;
branches;
next	1.127;
commitid	3cJgxc5cJoUXj5GF;

1.127
date	2023.12.19.20.08.27;	author rillig;	state Exp;
branches
	1.127.2.1;
next	1.126;
commitid	c6nj8b2fIG0U77RE;

1.126
date	2023.12.17.10.48.10;	author rillig;	state Exp;
branches;
next	1.125;
commitid	8cd4pQ9qXqCb6OQE;

1.125
date	2023.06.19.20.14.45;	author rillig;	state Exp;
branches;
next	1.124;
commitid	plnvuAVW1pBg3BtE;

1.124
date	2023.06.03.09.09.17;	author lukem;	state Exp;
branches;
next	1.123;
commitid	aBaIRnuykonRStrE;

1.123
date	2022.09.27.17.46.58;	author rillig;	state Exp;
branches;
next	1.122;
commitid	BmH7YPE3keIGKwVD;

1.122
date	2022.05.03.19.05.34;	author rillig;	state Exp;
branches;
next	1.121;
commitid	DHoaWBe6mXhvUDCD;

1.121
date	2022.01.26.23.00.55;	author rillig;	state Exp;
branches;
next	1.120;
commitid	6bm9F8fhOZVEkcqD;

1.120
date	2022.01.09.18.49.28;	author rillig;	state Exp;
branches;
next	1.119;
commitid	kkdcdHQnpaIttZnD;

1.119
date	2021.12.12.10.53.37;	author rillig;	state Exp;
branches;
next	1.118;
commitid	EejGz7VqZwkPKlkD;

1.118
date	2021.12.12.10.33.03;	author rillig;	state Exp;
branches;
next	1.117;
commitid	cG3Q8qiErLWRClkD;

1.117
date	2021.11.28.18.58.58;	author rillig;	state Exp;
branches;
next	1.116;
commitid	8C5rqlWhbccTQAiD;

1.116
date	2021.07.31.09.30.17;	author rillig;	state Exp;
branches;
next	1.115;
commitid	Q2vg2J92PP91B73D;

1.115
date	2021.05.30.21.03.08;	author rillig;	state Exp;
branches;
next	1.114;
commitid	QhlKFmjrnguxpdVC;

1.114
date	2021.04.11.11.41.27;	author rillig;	state Exp;
branches
	1.114.2.1;
next	1.113;
commitid	EhcSRSiTAUtoTROC;

1.113
date	2021.02.22.20.45.46;	author rillig;	state Exp;
branches;
next	1.112;
commitid	1sjz7zre7AeBrKIC;

1.112
date	2021.01.30.16.05.45;	author rillig;	state Exp;
branches;
next	1.111;
commitid	W4mdxusUOKWxCLFC;

1.111
date	2020.12.12.16.54.20;	author rillig;	state Exp;
branches;
next	1.110;
commitid	nuU4pVlv7zA1utzC;

1.110
date	2020.12.12.16.06.27;	author rillig;	state Exp;
branches;
next	1.109;
commitid	nqF7xXUSuaVzdtzC;

1.109
date	2020.12.06.13.29.34;	author rillig;	state Exp;
branches;
next	1.108;
commitid	SxROmu2hPFjExGyC;

1.108
date	2020.12.06.12.54.32;	author rillig;	state Exp;
branches;
next	1.107;
commitid	mijPtAud8FXClGyC;

1.107
date	2020.12.03.18.43.02;	author rillig;	state Exp;
branches;
next	1.106;
commitid	G3zqqn0FAY8FmkyC;

1.106
date	2020.10.25.13.25.19;	author rillig;	state Exp;
branches;
next	1.105;
commitid	iSN4ITrwg0RYRhtC;

1.105
date	2020.10.23.15.44.38;	author rillig;	state Exp;
branches;
next	1.104;
commitid	cwv3EpmDQBxHH2tC;

1.104
date	2020.10.18.19.11.35;	author rillig;	state Exp;
branches;
next	1.103;
commitid	LDNgQCQ6ppTdZpsC;

1.103
date	2020.10.05.22.15.45;	author rillig;	state Exp;
branches;
next	1.102;
commitid	YQQv4ZlhO3dtqLqC;

1.102
date	2020.10.05.19.27.47;	author rillig;	state Exp;
branches;
next	1.101;
commitid	9lHelH7u8FJYvKqC;

1.101
date	2020.10.05.19.24.29;	author rillig;	state Exp;
branches;
next	1.100;
commitid	M1zOj70zpBbWqKqC;

1.100
date	2020.10.05.15.11.37;	author rillig;	state Exp;
branches;
next	1.99;
commitid	Axt04OFjhrJ16JqC;

1.99
date	2020.09.01.17.12.30;	author rillig;	state Exp;
branches;
next	1.98;
commitid	AGkzTQcMrZQARmmC;

1.98
date	2020.08.31.16.41.19;	author rillig;	state Exp;
branches;
next	1.97;
commitid	9oVN1LSjLCXNIemC;

1.97
date	2020.08.31.06.44.12;	author rillig;	state Exp;
branches;
next	1.96;
commitid	zIwLlvJZKiqZpbmC;

1.96
date	2020.08.28.20.57.54;	author rillig;	state Exp;
branches;
next	1.95;
commitid	jb5eDsAPYxBxeSlC;

1.95
date	2020.08.27.19.09.37;	author rillig;	state Exp;
branches;
next	1.94;
commitid	6NwGSYLP5FjDFJlC;

1.94
date	2020.08.26.23.00.47;	author rillig;	state Exp;
branches;
next	1.93;
commitid	gVdvXZZlE8NSYClC;

1.93
date	2020.08.25.16.39.19;	author rillig;	state Exp;
branches;
next	1.92;
commitid	IezJxrn8A9Z8UslC;

1.92
date	2020.08.23.17.22.52;	author rillig;	state Exp;
branches;
next	1.91;
commitid	4m18hOOBm4jUcdlC;

1.91
date	2020.08.22.20.50.43;	author sjg;	state Exp;
branches;
next	1.90;
commitid	2sG9gyrSZFYoo6lC;

1.90
date	2020.08.19.06.30.37;	author rillig;	state Exp;
branches;
next	1.89;
commitid	y6TH1rngoywcIDkC;

1.89
date	2020.08.15.01.49.07;	author rillig;	state Exp;
branches;
next	1.88;
commitid	NxG7HqEj1KD1i6kC;

1.88
date	2020.08.12.19.21.05;	author rillig;	state Exp;
branches;
next	1.87;
commitid	0zMyNxf6099adOjC;

1.87
date	2020.08.12.18.48.36;	author rillig;	state Exp;
branches;
next	1.86;
commitid	6NQjuhrhpIXg2OjC;

1.86
date	2020.08.10.18.40.24;	author rillig;	state Exp;
branches;
next	1.85;
commitid	oS22ZAjvjXjv3yjC;

1.85
date	2020.08.10.18.20.28;	author rillig;	state Exp;
branches;
next	1.84;
commitid	yrHp35IYb10FWxjC;

1.84
date	2020.08.09.05.51.04;	author rillig;	state Exp;
branches;
next	1.83;
commitid	ZeuYSYpde2UuPljC;

1.83
date	2020.08.08.13.50.23;	author rillig;	state Exp;
branches;
next	1.82;
commitid	ZZoD0me23PuWugjC;

1.82
date	2020.08.07.05.13.04;	author rillig;	state Exp;
branches;
next	1.81;
commitid	2XJ6cHlInDDwG5jC;

1.81
date	2020.08.06.05.32.26;	author rillig;	state Exp;
branches;
next	1.80;
commitid	FpXsTkZLmiJOOXiC;

1.80
date	2020.08.06.05.27.31;	author rillig;	state Exp;
branches;
next	1.79;
commitid	rjETJrFyENjtNXiC;

1.79
date	2020.08.03.20.26.09;	author rillig;	state Exp;
branches;
next	1.78;
commitid	XYAV0J5ckaFgPEiC;

1.78
date	2020.08.01.21.48.17;	author rillig;	state Exp;
branches;
next	1.77;
commitid	3V2xtaJwMzBJnpiC;

1.77
date	2020.07.31.07.29.21;	author rillig;	state Exp;
branches;
next	1.76;
commitid	mlN7toSgDtxVEciC;

1.76
date	2020.07.29.20.57.31;	author rillig;	state Exp;
branches;
next	1.75;
commitid	zVl1nAlDbvVXb1iC;

1.75
date	2020.07.26.20.04.57;	author rillig;	state Exp;
branches;
next	1.74;
commitid	FwqDDGrCjEXXZChC;

1.74
date	2020.07.26.07.15.26;	author rillig;	state Exp;
branches;
next	1.73;
commitid	kUoWChhsyDdoJyhC;

1.73
date	2020.07.25.21.00.48;	author rillig;	state Exp;
branches;
next	1.72;
commitid	WGsHytau5bldlvhC;

1.72
date	2020.07.25.20.50.00;	author rillig;	state Exp;
branches;
next	1.71;
commitid	BeJMNPS5QmsIhvhC;

1.71
date	2020.07.25.20.44.50;	author rillig;	state Exp;
branches;
next	1.70;
commitid	OJxGehESH5F9gvhC;

1.70
date	2020.07.25.20.41.58;	author rillig;	state Exp;
branches;
next	1.69;
commitid	O4tHCpp2GYDafvhC;

1.69
date	2020.02.06.01.13.19;	author sjg;	state Exp;
branches;
next	1.68;
commitid	sGaJlDilUhy4fyVB;

1.68
date	2020.01.19.19.50.54;	author riastradh;	state Exp;
branches;
next	1.67;
commitid	OREG8JoIcI9l0lTB;

1.67
date	2020.01.19.19.49.36;	author riastradh;	state Exp;
branches;
next	1.66;
commitid	hC5uyNjc6p9TZkTB;

1.66
date	2020.01.19.19.42.32;	author riastradh;	state Exp;
branches;
next	1.65;
commitid	VsMoUyupIKprXkTB;

1.65
date	2019.12.19.07.14.07;	author maxv;	state Exp;
branches;
next	1.64;
commitid	vt1hQnA4kLw2OhPB;

1.64
date	2019.12.18.07.37.19;	author maxv;	state Exp;
branches;
next	1.63;
commitid	p344TaOkdu7MX9PB;

1.63
date	2019.10.13.07.28.15;	author mrg;	state Exp;
branches;
next	1.62;
commitid	vRNwN94v7NgB2GGB;

1.62
date	2019.09.29.23.45.01;	author mrg;	state Exp;
branches;
next	1.61;
commitid	xrLFk44PaFrGTXEB;

1.61
date	2019.02.04.03.58.41;	author mrg;	state Exp;
branches;
next	1.60;
commitid	NeK5cdn2EvI8XoaB;

1.60
date	2018.06.10.17.55.11;	author christos;	state Exp;
branches
	1.60.2.1;
next	1.59;
commitid	BcxRqUGZukqpgLFA;

1.59
date	2016.02.18.20.33.40;	author sjg;	state Exp;
branches
	1.59.14.1;
next	1.58;
commitid	eOnaaU2NgTcRerVy;

1.58
date	2015.06.17.17.43.23;	author christos;	state Exp;
branches;
next	1.57;
commitid	9ehTDqjribxqcOpy;

1.57
date	2014.07.05.19.22.05;	author dholland;	state Exp;
branches;
next	1.56;
commitid	3a5SlnCocjK3UdHx;

1.56
date	2012.05.30.21.54.23;	author sjg;	state Exp;
branches
	1.56.2.1
	1.56.8.1;
next	1.55;

1.55
date	2011.08.14.13.06.09;	author christos;	state Exp;
branches
	1.55.2.1;
next	1.54;

1.54
date	2011.06.22.02.49.44;	author mrg;	state Exp;
branches;
next	1.53;

1.53
date	2011.05.18.06.36.48;	author dsl;	state Exp;
branches;
next	1.52;

1.52
date	2011.05.17.21.56.51;	author dsl;	state Exp;
branches;
next	1.51;

1.51
date	2010.09.13.15.36.57;	author sjg;	state Exp;
branches;
next	1.50;

1.50
date	2010.04.22.19.15.23;	author sjg;	state Exp;
branches;
next	1.49;

1.49
date	2009.04.14.22.15.23;	author lukem;	state Exp;
branches;
next	1.48;

1.48
date	2009.03.24.13.54.37;	author perry;	state Exp;
branches;
next	1.47;

1.47
date	2009.03.20.20.48.00;	author perry;	state Exp;
branches;
next	1.46;

1.46
date	2009.01.24.11.59.39;	author dsl;	state Exp;
branches
	1.46.2.1;
next	1.45;

1.45
date	2008.12.20.22.41.53;	author dsl;	state Exp;
branches;
next	1.44;

1.44
date	2008.10.06.22.09.21;	author joerg;	state Exp;
branches;
next	1.43;

1.43
date	2008.02.14.22.11.20;	author christos;	state Exp;
branches;
next	1.42;

1.42
date	2007.09.25.21.28.26;	author uwe;	state Exp;
branches;
next	1.41;

1.41
date	2006.11.01.23.48.20;	author sjg;	state Exp;
branches
	1.41.2.1
	1.41.4.1
	1.41.8.1;
next	1.40;

1.40
date	2006.10.25.20.05.59;	author dsl;	state Exp;
branches;
next	1.39;

1.39
date	2006.10.08.17.52.29;	author peter;	state Exp;
branches;
next	1.38;

1.38
date	2006.08.29.16.54.03;	author christos;	state Exp;
branches;
next	1.37;

1.37
date	2006.08.26.18.17.42;	author christos;	state Exp;
branches;
next	1.36;

1.36
date	2006.06.15.10.55.02;	author skrll;	state Exp;
branches;
next	1.35;

1.35
date	2006.05.08.11.07.57;	author he;	state Exp;
branches
	1.35.2.1;
next	1.34;

1.34
date	2006.04.22.19.40.40;	author christos;	state Exp;
branches;
next	1.33;

1.33
date	2004.05.07.00.04.38;	author ross;	state Exp;
branches;
next	1.32;

1.32
date	2004.05.06.23.15.46;	author ross;	state Exp;
branches;
next	1.31;

1.31
date	2004.02.15.19.05.45;	author sjg;	state Exp;
branches
	1.31.2.1;
next	1.30;

1.30
date	2003.08.01.03.55.59;	author sjg;	state Exp;
branches;
next	1.29;

1.29
date	2003.07.28.22.52.10;	author sjg;	state Exp;
branches;
next	1.28;

1.28
date	2003.07.26.16.04.29;	author mrg;	state Exp;
branches;
next	1.27;

1.27
date	2003.07.14.18.19.11;	author christos;	state Exp;
branches;
next	1.26;

1.26
date	2002.01.27.01.50.54;	author reinoud;	state Exp;
branches;
next	1.25;

1.25
date	2001.10.31.03.59.42;	author tv;	state Exp;
branches;
next	1.24;

1.24
date	2001.06.09.05.17.51;	author sjg;	state Exp;
branches;
next	1.23;

1.23
date	2000.12.30.02.06.42;	author sommerfeld;	state Exp;
branches;
next	1.22;

1.22
date	2000.12.30.02.05.20;	author sommerfeld;	state Exp;
branches;
next	1.21;

1.21
date	2000.10.11.14.46.12;	author is;	state Exp;
branches;
next	1.20;

1.20
date	99.08.04.16.44.07;	author ross;	state Exp;
branches
	1.20.8.1;
next	1.19;

1.19
date	99.08.04.02.54.56;	author ross;	state Exp;
branches;
next	1.18;

1.18
date	97.10.24.09.00.47;	author lukem;	state Exp;
branches
	1.18.2.1;
next	1.17;

1.17
date	97.10.19.04.23.02;	author lukem;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	97.10.11.09.34.46;	author mycroft;	state Exp;
branches;
next	1.15;

1.15
date	97.07.01.21.17.00;	author christos;	state Exp;
branches;
next	1.14;

1.14
date	97.05.08.21.11.43;	author gwr;	state Exp;
branches;
next	1.13;

1.13
date	97.05.06.20.45.36;	author gwr;	state Exp;
branches;
next	1.12;

1.12
date	96.11.06.17.58.58;	author christos;	state Exp;
branches;
next	1.11;

1.11
date	96.05.28.23.34.35;	author christos;	state Exp;
branches;
next	1.10;

1.10
date	96.03.11.13.45.31;	author christos;	state Exp;
branches
	1.10.4.1;
next	1.9;

1.9
date	96.02.04.22.20.27;	author christos;	state Exp;
branches;
next	1.8;

1.8
date	95.06.14.15.18.37;	author christos;	state Exp;
branches;
next	1.7;

1.7
date	95.05.03.05.09.14;	author jtc;	state Exp;
branches;
next	1.6;

1.6
date	94.06.30.05.33.39;	author cgd;	state Exp;
branches;
next	1.5;

1.5
date	94.06.25.05.57.47;	author cgd;	state Exp;
branches;
next	1.4;

1.4
date	94.03.05.00.34.29;	author cgd;	state Exp;
branches;
next	1.3;

1.3
date	93.12.14.18.27.15;	author jtc;	state Exp;
branches;
next	1.2;

1.2
date	93.07.31.15.19.42;	author mycroft;	state Exp;
branches;
next	1.1;

1.1
date	93.03.21.09.45.37;	author cgd;	state Exp;
branches
	1.1.1.1;
next	;

1.127.2.1
date	2025.08.02.05.58.29;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.114.2.1
date	2021.05.31.22.15.25;	author cjep;	state Exp;
branches;
next	;
commitid	eWz9SBW0XqKjJlVC;

1.60.2.1
date	2019.06.10.22.10.21;	author christos;	state Exp;
branches;
next	1.60.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.60.2.2
date	2020.04.08.14.09.16;	author martin;	state Exp;
branches;
next	1.60.2.3;
commitid	Qli2aW9E74UFuA3C;

1.60.2.3
date	2020.04.13.08.05.43;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.59.14.1
date	2018.06.25.07.26.11;	author pgoyette;	state Exp;
branches;
next	;
commitid	8PtAu9af7VvhiDHA;

1.56.2.1
date	2014.08.20.00.05.00;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.56.8.1
date	2014.08.10.06.58.27;	author tls;	state Exp;
branches;
next	;
commitid	K9Bn7Rt8OayeDMLx;

1.55.2.1
date	2012.10.30.19.00.20;	author yamt;	state Exp;
branches;
next	;

1.46.2.1
date	2009.05.13.19.19.56;	author jym;	state Exp;
branches;
next	;

1.41.2.1
date	2007.09.27.14.04.35;	author xtraeme;	state Exp;
branches;
next	;

1.41.4.1
date	2007.09.30.03.39.19;	author wrstuden;	state Exp;
branches;
next	;

1.41.8.1
date	2007.11.06.23.35.59;	author matt;	state Exp;
branches;
next	1.41.8.2;

1.41.8.2
date	2008.03.23.00.49.02;	author matt;	state Exp;
branches;
next	;

1.35.2.1
date	2006.06.19.04.17.06;	author chap;	state Exp;
branches;
next	;

1.31.2.1
date	2004.05.10.15.34.30;	author tron;	state Exp;
branches;
next	1.31.2.2;

1.31.2.2
date	2004.05.10.15.44.22;	author tron;	state Exp;
branches;
next	;

1.20.8.1
date	2000.10.18.01.32.46;	author tv;	state Exp;
branches;
next	;

1.18.2.1
date	2000.10.19.16.31.47;	author he;	state Exp;
branches;
next	;

1.17.2.1
date	97.11.08.10.37.28;	author lukem;	state Exp;
branches;
next	;

1.10.4.1
date	97.01.26.05.51.27;	author rat;	state Exp;
branches;
next	;

1.1.1.1
date	93.03.21.09.45.37;	author cgd;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	96.12.28.04.40.51;	author tls;	state Exp;
branches;
next	;


desc
@@


1.129
log
@lint, make: only enable strict bool mode when using GCC

The GCC precompiler marks each token whether it comes from a system
header. Lint uses this information to allow some expressions that aren't
strictly bool, such as in __predict_true and __predict_false. The Clang
preprocessor treats all tokens as not coming from system headers, thus
being too strict.
@
text
@#	$NetBSD: Makefile,v 1.128 2025/01/19 10:57:10 rillig Exp $
#	@@(#)Makefile	5.2 (Berkeley) 12/28/90

PROG=	make
SRCS=	arch.c
SRCS+=  buf.c
SRCS+=  compat.c
SRCS+=  cond.c
SRCS+=  dir.c
SRCS+=  for.c
SRCS+=  hash.c
SRCS+=  job.c
SRCS+=  lst.c
SRCS+=  main.c
SRCS+=	make.c
SRCS+=  make_malloc.c
SRCS+=  metachar.c
SRCS+=  parse.c
SRCS+=	str.c
SRCS+=  suff.c
SRCS+=  targ.c
SRCS+=  trace.c
SRCS+=  var.c
SRCS+=  util.c
WARNS=	6

# Whether to generate a coverage report after running the tests.
USE_COVERAGE?=	no		# works only with gcc; clang9 fails to link
.if ${USE_COVERAGE} == "yes"
GCOV?=		gcov
CPPFLAGS+=	-DFORK_FUNCTION=fork
COPTS+=		--coverage -O0 -ggdb
GCOV_PERL=	if (/^File '(?:.*\/)?(\S+)'/) {
GCOV_PERL+=		$$file = $$1; $$func = "";
GCOV_PERL+=	} elsif (/^Function '(\S+)'/) {
GCOV_PERL+=		$$func = $$1;
GCOV_PERL+=	} elsif (/^Lines executed:(\d+\.\d+)% of (\d+)/ && defined($$file)) {
GCOV_PERL+=		my ($$percent, $$lines) = ($$1, $$2);
GCOV_PERL+=		my $$uncovered =
GCOV_PERL+=		    $$percent eq '100.00' ? '0'
GCOV_PERL+=		    : $$file =~ /\.h$$/ ? '?'
GCOV_PERL+=		    : `grep -c '\#\#\#\#\#:' < \$$(basename $$file.gcov)`;
GCOV_PERL+=		chomp($$uncovered);
GCOV_PERL+=		printf("%7.2f  %4s/%4d  %s%s\n",
GCOV_PERL+=		    $$percent, $$uncovered, $$lines, $$file, $$func);
GCOV_PERL+=		$$file = undef;
GCOV_PERL+=	}
LDADD+=		--coverage
.endif
CLEANFILES+=	*.gcda *.gcno *.gcov

# Whether to compile using the Undefined Behavior Sanitizer (GCC, Clang).
USE_UBSAN?=	no
.if ${USE_UBSAN} == "yes"
COPTS+=		-fsanitize=undefined
LDADD+=		-fsanitize=undefined
.endif

USE_META?=	yes
.if ${USE_META:tl} != "no"

SRCS+=		meta.c
CPPFLAGS+=	-DUSE_META

USE_FILEMON?=	ktrace
.  if ${USE_FILEMON:tl} != "no"

.PATH:	${.CURDIR}/filemon
SRCS+=		filemon_${USE_FILEMON}.c
CPPFLAGS+=	-DUSE_FILEMON
CPPFLAGS+=	-DUSE_FILEMON_${USE_FILEMON:tu}

.    if ${USE_FILEMON} == "dev"
FILEMON_H?=	/usr/include/dev/filemon/filemon.h
.      if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
COPTS.filemon_dev.c+= \
		-DHAVE_FILEMON_H -I${FILEMON_H:H}
.      endif
.    endif
.  endif
.endif

SUBDIR.roff+=	PSD.doc
.if make(obj) || make(clean) || make(cleandir)
SUBDIR+=	unit-tests
.endif

LINTFLAGS+=	${ACTIVE_CC:Mgcc:%=-T}	# strict bool mode
LINTFLAGS+=	-w	# treat warnings as errors
CLEANFILES+=	*.o	# for filemon objects

COPTS.arch.c+=	${CC_WNO_FORMAT_TRUNCATION}
COPTS.dir.c+=	${CC_WNO_FORMAT_TRUNCATION}
COPTS.job.c+=	-Wno-format-nonliteral	# custom shell templates
COPTS.main.c+=	${CC_WNO_FORMAT_TRUNCATION} ${CC_WNO_STRINGOP_TRUNCATION}
COPTS.meta.c+=	${CC_WNO_FORMAT_TRUNCATION}
COPTS.var.c+=	-Wno-format-nonliteral	# strftime

CPPFLAGS+=	-DMAKE_NATIVE

.if defined(TOOLDIR)
# This is a native NetBSD build, use libutil rather than the local emalloc etc.
CPPFLAGS+=	-DUSE_EMALLOC
LDADD+=		-lutil
DPADD+=		${LIBUTIL}
.endif

COPTS+=		-Wdeclaration-after-statement

# A simple unit-test driver to help catch regressions
TEST_MAKE ?= ${.OBJDIR}/${PROG:T}
test: .MAKE
	cd ${.CURDIR}/unit-tests \
	&& MAKEFLAGS= ${TEST_MAKE} -r -m / TEST_MAKE=${TEST_MAKE} ${TESTS:DTESTS=${TESTS:Q}} ${.TARGET}
.if ${USE_COVERAGE} == yes
	${MAKE} report-coverage
.endif

accept sync-mi: .MAKE
	cd ${.CURDIR}/unit-tests && ${.MAKE} ${.TARGET}

retest:
	${.MAKE} -C ${.CURDIR}/unit-tests cleandir
.if ${USE_COVERAGE} == yes
	rm -f *.gcov *.gcda
.endif
	${.MAKE} test

# Just out of curiosity, during development.
.SUFFIXES: .cpre .casm
.c.cpre:
	${COMPILE.c:S,^-c$,-E,} ${COPTS.${.IMPSRC}} ${.IMPSRC} -o ${.TARGET}
.c.casm:
	${COMPILE.c:S,^-c$,-S,} ${COPTS.${.IMPSRC}} ${.IMPSRC} -o ${.TARGET}

test-coverage: .PHONY
	@@make -s clean cleandir
	@@env USE_COVERAGE=yes COPTS="-O0 -ggdb" USER_CPPFLAGS="-DCLEANUP" \
		sh -c 'make -s all -j8 && make -s test'
	@@env USE_COVERAGE=yes make report-coverage > coverage.txt

.if ${USE_COVERAGE} == "yes"
report-coverage: .PHONY
	@@echo 'covered  uncovered  file'
	@@${GCOV} ${GCOV_OPTS} *.gcda \
	| perl -ne ${GCOV_PERL:Q} \
	| sort -r -k4 \
	| sort -nr -k1
	@@sed -i \
	    -e '1d' \
	    -e 's,^\([^:]*\): *[0-9]*:,\1: ,' \
	    -e 's, *$$,,g' \
	    *.gcov
.endif

.include <bsd.prog.mk>
.include <bsd.subdir.mk>

# For -DCLEANUP and similar feature toggles.
CPPFLAGS+=	${USER_CPPFLAGS}
# For overriding -std=gnu99 or similar options.
CFLAGS+=	${USER_CFLAGS}
@


1.128
log
@make: fix code coverage counts

See tests/usr.bin/gcov/t_gcov.sh.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.127 2023/12/19 20:08:27 rillig Exp $
d88 1
a88 1
LINTFLAGS+=	-T	# strict bool mode, available since 2021-01-11
@


1.127
log
@make: clean up code coverage report files

Remove trailing whitespace.

Remove the first line, as it only repeats the filename.

Remove the line numbers, as they are mostly the same as in the original
source file.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.126 2023/12/17 10:48:10 rillig Exp $
d31 1
@


1.127.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.128 2025/01/19 10:57:10 rillig Exp $
a30 1
CPPFLAGS+=	-DFORK_FUNCTION=fork
@


1.126
log
@make: on cleandir, clean the unit-tests as well
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.125 2023/06/19 20:14:45 rillig Exp $
d148 5
a152 1
	@@sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov
@


1.125
log
@make: sort files in coverage report alphabetically
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.124 2023/06/03 09:09:17 lukem Exp $
d83 1
a83 1
.if make(obj) || make(clean)
@


1.124
log
@bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.123 2022/09/27 17:46:58 rillig Exp $
d146 2
a147 1
	| sort -nr
@


1.123
log
@make: set WARNS to 6, from the default 5

No binary change on x86_64.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.122 2022/05/03 19:05:34 rillig Exp $
d91 2
a92 2
COPTS.arch.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.dir.c+=	${GCC_NO_FORMAT_TRUNCATION}
d94 2
a95 2
COPTS.main.c+=	${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION}
COPTS.meta.c+=	${GCC_NO_FORMAT_TRUNCATION}
@


1.122
log
@make: remove test scenarios for old GCC versions

These had been useful for NetBSD 8, which used GCC 5.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.121 2022/01/26 23:00:55 rillig Exp $
d25 1
@


1.121
log
@make: generate coverage summary on 'make test-coverage'
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.120 2022/01/09 18:49:28 rillig Exp $
a56 33
# Whether to compile with GCC 10 from pkgsrc, during development.
USE_GCC10?=	no
.if ${USE_GCC10} == "yes"
# CC is set further down in this file
COPTS+=		-Wno-attributes	# for abs and labs
COPTS.arch.c+=	-Wno-error=format-truncation
COPTS.dir.c+=	-Wno-error=format-truncation
COPTS.main.c+=	-Wno-error=format-truncation
COPTS.meta.c+=	-Wno-error=format-truncation
.endif

# Whether to compile with GCC 9 from pkgsrc, during development.
USE_GCC9?=	no
.if ${USE_GCC9} == "yes"
# CC is set further down in this file
COPTS+=		-Wno-attributes	# for abs and labs
COPTS.arch.c+=	-Wno-error=format-truncation
COPTS.dir.c+=	-Wno-error=format-truncation
COPTS.main.c+=	-Wno-error=format-truncation
COPTS.meta.c+=	-Wno-error=format-truncation
.endif

# Whether to compile with GCC 8 from pkgsrc, during development.
USE_GCC8?=	no
.if ${USE_GCC8} == "yes"
# CC is set further down in this file
COPTS+=		-Wno-attributes	# for abs and labs
COPTS.arch.c+=	-Wno-error=format-truncation
COPTS.dir.c+=	-Wno-error=format-truncation
COPTS.main.c+=	-Wno-error=format-truncation
COPTS.meta.c+=	-Wno-error=format-truncation
.endif

a98 18
.if ${USE_GCC10} == "yes"
GCC10BASE?=	/usr/pkg/gcc10
LATE_CC=	${GCC10BASE}/bin/gcc
GCOV=		${GCC10BASE}/bin/gcov
.endif

.if ${USE_GCC9} == "yes"
GCC9BASE?=	/usr/pkg/gcc9
LATE_CC=	${GCC9BASE}/bin/gcc
GCOV=		${GCC9BASE}/bin/gcov
.endif

.if ${USE_GCC8} == "yes"
GCC8BASE?=	/usr/pkg/gcc8
LATE_CC=	${GCC8BASE}/bin/gcc
GCOV=		${GCC8BASE}/bin/gcov
.endif

a155 3
.if defined(LATE_CC)
CC=		${LATE_CC}
.endif
@


1.120
log
@make: in Cmd_Exec, return error message instead of format string

This change leaves only literal format strings in parse.c.  It allows
for more detailed error messages than the current "non-zero status" or
"exited on a signal".

No functional change.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.119 2021/12/12 10:53:37 rillig Exp $
d189 1
@


1.119
log
@make: do not report '?' for fully covered header files
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.118 2021/12/12 10:33:03 rillig Exp $
d125 1
a125 1
COPTS.job.c+=	-Wno-format-nonliteral
d128 1
a128 2
COPTS.parse.c+=	-Wno-format-nonliteral
COPTS.var.c+=	-Wno-format-nonliteral
@


1.118
log
@make: only define target report-coverage if USE_COVERAGE is yes

Without USE_COVERAGE, GCOV was undefined, the '2>&1' passed all error
messages to GCOV_PERL, when then discarded them.  If the error messages
had been left on stderr, the error message 'sh: arch.o.gcda: not found'
would have been a clear indicator of the actual cause of an empty
coverage report.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.117 2021/11/28 18:58:58 rillig Exp $
d37 3
a39 2
GCOV_PERL+=		my $$uncovered = $$file =~ /\.h$$/
GCOV_PERL+=		    ? '?'
@


1.117
log
@make: replace bloated bit-set-to-string code with simple code

It was a nice idea to implement a bit-set using an enum type and have a
generic ToString function for them.  In the end, the implementation
involved really heavy preprocessor magic and was probably difficult to
understand.  Replace all the code with a few bits of straight-forward
preprocessor magic that can be readily understood by just looking 5
lines around, instead of digging through 130 lines of lengthy macro
definitions.

Curiously, this reduces the binary size even though the 3 ToString
functions now have a few lines of duplicate code and there are more
explicit function calls.

The ToString functions are only seldom used, so the additional memory
allocation is acceptable.

No functional change.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.116 2021/07/31 09:30:17 rillig Exp $
d190 1
d193 1
a193 1
	@@${GCOV} ${GCOV_OPTS} *.gcda 2>&1 \
d197 1
@


1.116
log
@make: fix lint warnings

The string functions from str.h are declared as 'static __unused' when
compiled with GCC, but lint explicitly undefines __GCC__ during
preprocessing.  Therefore, make those functions inline, to prevent
warnings that they are unused.

The macro UNCONST is used in a few places, and (again) since lint
undefines __GCC__, that macro expanded to a simple type cast, which lint
warned about.  To prevent this warning, implement UNCONST as a function
that works everywhere and hides the type cast.

In filemon_open, the code for closing F->in was obviously unreachable.

No functional change.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.115 2021/05/30 21:03:08 rillig Exp $
a9 1
SRCS+=  enum.c
@


1.115
log
@make: fix reported code coverage for *.h

In 'make test-coverage', the number of uncovered lines for inline
functions in headers was reported too high.  The cause for this is that
gcov reports the coverage for these functions multiple times, once per
translation unit.  If some of the translation units don't use these
inline functions, summing the lines containing '#####' quickly leads to
numbers that are obviously too high.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.114 2021/04/11 11:41:27 rillig Exp $
d120 1
@


1.114
log
@make: clean up Makefile

The dependencies on the header files are handled by 'make depend'.  They
do not need to be spelled out.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.113 2021/02/22 20:45:46 rillig Exp $
d38 5
a42 2
GCOV_PERL+=		my $$uncovered = `grep -c '\#\#\#\#\#:' < \$$(basename $$file.gcov)`;
GCOV_PERL+=		printf("%7.2f  %4d/%4d  %s%s\n",
@


1.114.2.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.115 2021/05/30 21:03:08 rillig Exp $
d38 2
a39 5
GCOV_PERL+=		my $$uncovered = $$file =~ /\.h$$/
GCOV_PERL+=		    ? '?'
GCOV_PERL+=		    : `grep -c '\#\#\#\#\#:' < \$$(basename $$file.gcov)`;
GCOV_PERL+=		chomp($$uncovered);
GCOV_PERL+=		printf("%7.2f  %4s/%4d  %s%s\n",
@


1.113
log
@make: fix report-coverage

On NetBSD 8.0 it still worked.  Maybe gcov doesn't support .c files as
arguments anymore.  Using the .gcda files works and is more reliable
anyway since it covers the inline functions in the headers as well.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.112 2021/01/30 16:05:45 rillig Exp $
a25 14
HDRS=   buf.h
HDRS+=  config.h
HDRS+=  dir.h
HDRS+=  enum.h
HDRS+=  hash.h
HDRS+=  job.h
HDRS+=  lst.h
HDRS+=  make.h
HDRS+=  make_malloc.h
HDRS+=  meta.h
HDRS+=  metachar.h
HDRS+=  nonints.h
HDRS+=  pathnames.h
HDRS+=  trace.h
d117 1
a117 3

${SRCS:M*.c:.c=.o}: ${HDRS}
CLEANFILES+=	*.o
@


1.112
log
@make(1): run lint with strict bool mode

The make code is not supposed to use constructs such as "if (strcmp(s1,
s2))" or "if (p && *p)", instead all boolean expressions have a form
that would be accepted by a C#, Go or Java compiler as well.  This also
ensures that pre-C99 compilers generate equivalent code as C99
compilers, at least regarding boolean expressions.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.111 2020/12/12 16:54:20 rillig Exp $
d205 1
a205 1
	@@${GCOV} ${GCOV_OPTS} ${SRCS} 2>&1 \
@


1.111
log
@make(1): add number of uncovered lines to coverage report
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.110 2020/12/12 16:06:27 rillig Exp $
d130 2
@


1.110
log
@make(1): add target test-coverage
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.109 2020/12/06 13:29:34 rillig Exp $
d46 1
a46 1
GCOV_PERL=	if (/^File '(\S+)'/) {
d50 6
a55 2
GCOV_PERL+=	} elsif (/^Lines executed:(\d+\.\d+)% of (\d+)/) {
GCOV_PERL+=		printf("%6.2f  %5d   %s%s\n", $$1, $$2, $$file, $$func);
d176 1
a176 2
	@@${GCOV} ${GCOV_OPTS} ${SRCS} | perl -ne ${GCOV_PERL:Q} | sort -nr
	@@sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov
d201 7
@


1.109
log
@make(1): move .include lines as far down as possible
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.108 2020/12/06 12:54:32 rillig Exp $
d193 5
@


1.108
log
@make(1): move COPTS above <bsd.prog.mk>
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.107 2020/12/03 18:43:02 rillig Exp $
a136 3
.include <bsd.prog.mk>
.include <bsd.subdir.mk>

d141 1
a141 1
CC=		${GCC10BASE}/bin/gcc
d147 1
a147 1
CC=		${GCC9BASE}/bin/gcc
d153 1
a153 1
CC=		${GCC8BASE}/bin/gcc
a165 5
# For -DCLEANUP and similar feature toggles.
CPPFLAGS+=	${USER_CPPFLAGS}
# For overriding -std=gnu99 or similar options.
CFLAGS+=	${USER_CFLAGS}

d192 11
@


1.107
log
@make(1): format coverage summary as a table

This is only used interactively, not in the official builds, therefore
the additional dependency on Perl doesn't matter.  The same result could
have been achieved in any other programming language, but probably not
as concisely.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.106 2020/10/25 13:25:19 rillig Exp $
d129 8
a140 3
COPTS.job.c+=	-Wno-format-nonliteral
COPTS.parse.c+=	-Wno-format-nonliteral
COPTS.var.c+=	-Wno-format-nonliteral
a166 5
COPTS.arch.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.dir.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.main.c+=	${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION}
COPTS.meta.c+=	${GCC_NO_FORMAT_TRUNCATION}

@


1.106
log
@make(1): remove unused strlist_t
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.105 2020/10/23 15:44:38 rillig Exp $
d46 7
d180 2
a181 2
	${GCOV} ${GCOV_OPTS} ${SRCS}
	sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov
@


1.105
log
@make(1): add target-specific COPTS when generating cpre or casm
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.104 2020/10/18 19:11:35 rillig Exp $
a20 1
SRCS+=  strlist.c
a38 1
HDRS+=  strlist.h
@


1.104
log
@make(1): fix GCC warning about small buffer for cohort_num

Since unmade_cohorts is a signed number (the code contains an underflow
check), the result of the '%' operator could be negative and result in
"#-999999", which would overflow the buffer, truncating the last digit.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.103 2020/10/05 22:15:45 rillig Exp $
d192 1
a192 1
	${COMPILE.c:S,^-c$,-E,} ${.IMPSRC} -o ${.TARGET}
d194 1
a194 1
	${COMPILE.c:S,^-c$,-S,} ${.IMPSRC} -o ${.TARGET}
@


1.103
log
@make(1): enable format string truncation warnings for parse.c

No node is ever going to have a million or more cohorts.  And even if
there were, this name is only used for printing informational messages.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.102 2020/10/05 19:27:47 rillig Exp $
a67 1
COPTS.parse.c+=	-Wno-error=format-truncation
a89 1
COPTS.parse.c+=	-Wno-error=format-truncation
a160 1
COPTS.parse.c+=	${GCC_NO_FORMAT_TRUNCATION}
@


1.102
log
@make(1): revert previous commit

It had accidentally reverted all the work from the past few days.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.100 2020/10/05 15:11:37 rillig Exp $
a79 1
COPTS.parse.c+=	-Wno-error=format-truncation
@


1.101
log
@make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.99 2020/09/01 17:12:30 rillig Exp $
d192 7
@


1.100
log
@make(1): allow easy creation of preprocessed source and assembler

To be used during development, to see how changes in the source code
affect the generated machine code.
@
text
@a191 7

# Just out of curiosity, during development.
.SUFFIXES: .cpre .casm
.c.cpre:
	${COMPILE.c:S,^-c$,-E,} ${.IMPSRC} -o ${.TARGET}
.c.casm:
	${COMPILE.c:S,^-c$,-S,} ${.IMPSRC} -o ${.TARGET}
@


1.99
log
@make(1): remove filemon object files on clean
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.98 2020/08/31 16:41:19 rillig Exp $
d192 7
@


1.98
log
@make(1): fix compilation with GCC 8
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.97 2020/08/31 06:44:12 rillig Exp $
d125 1
@


1.97
log
@make(1): fix copy-and-paste mistake for compiling with GCC10
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.96 2020/08/28 20:57:54 rillig Exp $
d92 1
@


1.96
log
@make(1): remove redundant MAKEFLAGS from subdir make

The make flags are passed via the environment, not via the command line.
This is not as obvious and visible, but it works.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.95 2020/08/27 19:09:37 rillig Exp $
d134 1
a134 1
GCC9BASE?=	/usr/pkg/gcc10
@


1.95
log
@make(1): pass the command-line variables to the subdir make
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.94 2020/08/26 23:00:47 rillig Exp $
d182 1
a182 1
	cd ${.CURDIR}/unit-tests && ${.MAKE} ${MAKEFLAGS} ${.TARGET}
@


1.94
log
@make(1): remove header sprite.h

Make is independent of the Sprite operating system.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.93 2020/08/25 16:39:19 rillig Exp $
d182 1
a182 1
	cd ${.CURDIR}/unit-tests && ${.MAKE} ${.TARGET}
@


1.93
log
@make(1): allow custom build options
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.92 2020/08/23 17:22:52 rillig Exp $
a39 1
HDRS+=  sprite.h
@


1.92
log
@make(1): allow to run only selected tests via the command line
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.91 2020/08/22 20:50:43 sjg Exp $
d167 5
@


1.91
log
@Use TEST_MAKE to run unit-tests

This lets us take advantage of new features like ${.SHELL}
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.90 2020/08/19 06:30:37 rillig Exp $
d171 1
a171 1
	&& MAKEFLAGS= ${TEST_MAKE} -r -m / TEST_MAKE=${TEST_MAKE} ${.TARGET}
@


1.90
log
@make(1): don't optimize when measuring the code coverage

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96622
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.89 2020/08/15 01:49:07 rillig Exp $
d168 1
d171 1
a171 1
	&& MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
@


1.89
log
@make(1): fix archive test

Even though it is commented out in this Makefile, it is still run by
atf, on purpose.  This test is broken on FreeBSD, but on NetBSD it
should still be run.

Without removing the archive first, it could be left over from a
previous test failure and thus be newer than all its members, leading to
${.OODATE} being empty.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.88 2020/08/12 19:21:05 rillig Exp $
d48 1
a48 1
COPTS+=		--coverage -O2 -ggdb
@


1.88
log
@make(1): enable -Wcast-qual for var.c again

When it became disabled 9 years ago, there were 15 instances of UNCONST
in the code.  These have been removed in the latest cleanup sessions.

Tested with GCC 5 from NetBSD 8 and GCC 10 from pkgsrc.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.87 2020/08/12 18:48:36 rillig Exp $
d176 1
a176 1
accept: .MAKE
@


1.87
log
@make(1): allow optional compilation with GCC 10, use gcov from GCC
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.86 2020/08/10 18:40:24 rillig Exp $
a129 1
COPTS.var.c+=	-Wno-cast-qual
@


1.86
log
@make(1): make gcov command line configurable

Some useful options are -a or -f.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.85 2020/08/10 18:20:28 rillig Exp $
d47 2
a48 1
COPTS+=		--coverage -O0 -ggdb
d60 12
d84 11
d135 6
d142 9
a150 1
CC=		/usr/pkg/gcc9/bin/gcc
d173 1
a173 1
	gcov ${GCOV_OPTS} ${SRCS}
@


1.85
log
@make(1): clean up coverage files even if USE_COVERAGE is not set
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.84 2020/08/09 05:51:04 rillig Exp $
d135 1
a135 1
	gcov ${SRCS}
@


1.84
log
@make(1): allow to build using GCC 9 during development
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.83 2020/08/08 13:50:23 rillig Exp $
a48 1
CLEANFILES+=	${SRCS:.c=.gcda} ${SRCS:.c=.gcno} ${SRCS:=.gcov}
d50 1
@


1.83
log
@make(1): add more detailed debug logging for variable modifiers

Before a modifier is applied to a variable, it is not yet parsed,
therefore it is only possible to log a rough estimate of the modifier.
But after applying it, the parsing position has advanced, and the full
modifier can be logged.

In addition, to fully understand how the modifiers work, it's not enough
to just know the variable names and values, there are also some flags
that influence how the modifiers behave.  The most influential is
VARE_WANTRES.

Thanks to sjg for the extensive review and valuable feedback on the
first drafts.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.82 2020/08/07 05:13:04 rillig Exp $
d59 12
d111 4
@


1.82
log
@make(1): one file per line in the Makefile

Suggested by sjg.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.81 2020/08/06 05:32:26 rillig Exp $
d10 1
d30 1
@


1.81
log
@make(1): revert previous commit; "make retest" was already possible

What I really meant to allow was to run "make sync-mi" directly from the
main directory.  But adding that to TARGETS didn't do anything.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.80 2020/08/06 05:27:31 rillig Exp $
d5 36
a40 3
SRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c lst.c main.c
SRCS+=	make.c make_malloc.c metachar.c parse.c
SRCS+=	str.c strlist.c suff.c targ.c trace.c var.c util.c
d86 1
a86 2
${SRCS:M*.c:.c=.o}: buf.h config.h dir.h hash.h job.h lst.h make.h make_malloc.h
${SRCS:M*.c:.c=.o}: meta.h metachar.h nonints.h pathnames.h sprite.h strlist.h trace.h
@


1.80
log
@make(1): allow "make retest" directly from the main directory
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.79 2020/08/03 20:26:09 rillig Exp $
a55 2
TARGETS+=	retest

@


1.79
log
@make(1): no declaration-after-statement anymore

NetBSD make is intended to be maximally portable, therefore it uses only
C89.  This was not declared in the Makefile before.

There are still a few places in parse.c and metachar.c that use
end-of-line comments.  These will be fixed in a follow-up commit.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.78 2020/08/01 21:48:17 rillig Exp $
d9 1
d17 1
d56 2
@


1.78
log
@make(1): remove line numbers from generated code coverage files

The line numbers make it difficult to spot changes in the code and
coverage if a line is added or removed from the code.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.77 2020/07/31 07:29:21 rillig Exp $
d76 2
@


1.77
log
@make(1): fix undefined behavior in malformed :S modifier

The unit tests failed on Ubuntu, and by looking closely at the code, it
was trivial to see the out-of-bounds memory read.

Other modifiers may have the same problem and will be inspected later.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.76 2020/07/29 20:57:31 rillig Exp $
d82 1
@


1.76
log
@make(1): use specialized return type for ApplyModifier functions

This makes it immediately obvious what happens after a modifier has been
applied, instead of having to translate single-character mnemonics or
booleans to their actual intention.

This also reduces the size of the binary since there are fewer jumps.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.75 2020/07/26 20:04:57 rillig Exp $
d11 2
a12 2
COPTS=		--coverage -O0 -ggdb
LDADD=		--coverage
d16 6
@


1.75
log
@make(1): explicitly add dependencies on headers

This prevents partial builds after changing a header.  The declared
dependencies are more than strictly necessary, but that's still better
than having inconsistent partial builds because too few dependencies are
declared.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.74 2020/07/26 07:15:26 rillig Exp $
d80 7
@


1.74
log
@make(1): condense the list library into a single file

The list library is only used in make(1). Having it spread out over 28
files made it look more complex than it really is. In fact, it's just a
versatile generic data type like in hash.c.

Having all the list functions in a single file reduces the code size,
both by omitting the many RCS Ids and by inlining commonly used code.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.73 2020/07/25 21:00:48 rillig Exp $
a39 1
.PATH:	${.CURDIR}/lst.lib
d45 3
@


1.73
log
@make(1): make it easy to run gcov on the code

There seems to be no gcov support in share/mk yes, but it's still good
to have, especially for a complex program like make(1).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.72 2020/07/25 20:50:00 rillig Exp $
d5 1
a5 1
SRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c
a7 5
SRCS+=	lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c
SRCS+=	lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c
SRCS+=	lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c
SRCS+=	lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c lstMember.c
SRCS+=	lstNext.c lstOpen.c lstPrev.c lstRemove.c lstReplace.c lstSucc.c
@


1.72
log
@make(1): indent Makefile directives like in pkgsrc

This makes it easier to see the corresponding .if/.endif, even without
comments.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.71 2020/07/25 20:44:50 rillig Exp $
d14 7
d74 9
a82 2
accept test: .MAKE
	cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
@


1.71
log
@make(1): format Makefile consistently
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.70 2020/07/25 20:41:58 rillig Exp $
d7 1
a7 1
SRCS+=	str.c strlist.c suff.c targ.c trace.c var.c util.c 
d21 1
a21 1
.if ${USE_FILEMON:tl} != "no"
d28 1
a28 1
.if ${USE_FILEMON} == "dev"
d30 1
a30 1
.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
d33 3
a36 3
.endif				# USE_FILEMON == dev
.endif				# USE_FILEMON
.endif				# USE_META
d53 1
a53 1
.ifdef TOOLDIR
@


1.70
log
@make(1): regroup source files
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.69 2020/02/06 01:13:19 sjg Exp $
d14 1
a14 1
USE_META ?= yes
d17 2
a18 2
SRCS+=	meta.c
CPPFLAGS+= -DUSE_META
d20 1
a20 1
USE_FILEMON ?= ktrace
d24 3
a26 2
SRCS+=	filemon_${USE_FILEMON}.c
CPPFLAGS+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu}
d29 1
a29 1
FILEMON_H ?= /usr/include/dev/filemon/filemon.h
d31 2
a32 1
COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
a34 1

a35 1

d41 1
a41 1
SUBDIR+= unit-tests
d47 5
a51 5
CPPFLAGS+= -DMAKE_NATIVE
COPTS.var.c += -Wno-cast-qual
COPTS.job.c += -Wno-format-nonliteral
COPTS.parse.c += -Wno-format-nonliteral
COPTS.var.c += -Wno-format-nonliteral
d54 4
a57 5
# this is a native netbsd build, 
# use libutil rather than the local emalloc etc.
CPPFLAGS+= -DUSE_EMALLOC
LDADD+=-lutil
DPADD+=${LIBUTIL}
@


1.69
log
@Fix meta_compat mode.

We need to call meta_job_output() from meta_compat_parent()
Also, the need for extra fds for meta mode only applies when
using filemon_ktrace.c.
Since we hope to see more interfaces like that, test for
USE_FILEMON_DEV being not defined.

Reviewed by: riastradh
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.68 2020/01/19 19:50:54 riastradh Exp $
d5 8
a12 10
SRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
	make.c metachar.c parse.c str.c suff.c targ.c trace.c var.c util.c 
SRCS+=  strlist.c
SRCS+=  make_malloc.c
SRCS+=	lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
	lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
	lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
	lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
	lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
SRCS += lstPrev.c
@


1.68
log
@Tweak makefile for USE_FILEMON=dev, from sjg.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.67 2020/01/19 19:49:36 riastradh Exp $
d27 1
a27 1
CPPFLAGS+= -DUSE_FILEMON
d70 1
a70 1
accept test:
@


1.67
log
@Per sjg's suggestion, split filemon API into separate back ends.

By default we use the ktrace back end, but the /dev/filemon back end
is available as a compile-time option, by setting USE_FILEMON=dev in
make.  sjg raised concerns about ktrace performance and would like to
continue using /dev/filemon on FreeBSD (which has seen more
maintenance kernel-side) without forking make.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.66 2020/01/19 19:42:32 riastradh Exp $
d18 1
d21 1
d24 1
d28 5
d34 5
a38 1
.endif
@


1.66
log
@Reimplement make(1) meta mode without filemon(4).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.65 2019/12/19 07:14:07 maxv Exp $
d20 1
a20 1
USE_FILEMON ?= yes
d22 2
a23 1
SRCS+=	filemon.c
@


1.65
log
@Revert the filemon removal in bmake, as pointed out by maya we do care
about not introducing divergence with FreeBSD, and the cost of unused
is acceptable here.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.63 2019/10/13 07:28:15 mrg Exp $
d20 4
a23 3
FILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
@


1.64
log
@Retire filemon, discussed on tech-kern@@.
@
text
@d20 4
@


1.63
log
@introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.62 2019/09/29 23:45:01 mrg Exp $
a19 4
FILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
.endif
@


1.62
log
@convert HAVE_GCC == 7 to HAVE_GCC >= 7.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.61 2019/02/04 03:58:41 mrg Exp $
d49 5
a53 3
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
COPTS.arch.c += -Wno-error=format-truncation
.endif
@


1.61
log
@- use -Wno-error=format-truncation
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.60 2018/06/10 17:55:11 christos Exp $
d49 1
a49 1
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
@


1.60
log
@use SUBDIR.roff suggested by uwe@@
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.59 2016/02/18 20:33:40 sjg Exp $
d49 4
@


1.60.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.61 2019/02/04 03:58:41 mrg Exp $
a48 4
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
COPTS.arch.c += -Wno-error=format-truncation
.endif

@


1.60.2.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
a17 1

d20 1
a20 10

USE_FILEMON ?= ktrace
.if ${USE_FILEMON:tl} != "no"

.PATH:	${.CURDIR}/filemon
SRCS+=	filemon_${USE_FILEMON}.c
CPPFLAGS+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu}

.if ${USE_FILEMON} == "dev"
FILEMON_H ?= /usr/include/dev/filemon/filemon.h
d22 2
a23 1
COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
a24 5
.endif				# USE_FILEMON == dev

.endif				# USE_FILEMON

.endif				# USE_META
d54 1
a54 1
accept test: .MAKE
@


1.60.2.3
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d63 3
a65 5
COPTS.arch.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.dir.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.main.c+=	${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION}
COPTS.meta.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.parse.c+=	${GCC_NO_FORMAT_TRUNCATION}
@


1.59
log
@Adapt to changed Var_Subst()
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.58 2015/06/17 17:43:23 christos Exp $
d27 1
a27 1
SUBDIR=	PSD.doc
@


1.59.14.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.60 2018/06/10 17:55:11 christos Exp $
d27 1
a27 1
SUBDIR.roff+=	PSD.doc
@


1.58
log
@Centralize the "is a meta char" test, instead of using two different arrays.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.57 2014/07/05 19:22:05 dholland Exp $
d16 1
a16 2
# let people experiment for a bit
USE_META ?= no
@


1.57
log
@Rework /usr/share/doc.

Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $
d6 1
a6 1
	make.c parse.c str.c suff.c targ.c trace.c var.c util.c 
@


1.56
log
@Don't pass debug flags etc. to unit-tests
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.55 2011/08/14 13:06:09 christos Exp $
a27 1
.if make(install)
a28 1
.endif
@


1.56.2.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d28 1
d30 1
@


1.56.8.1
log
@Rebase.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.57 2014/07/05 19:22:05 dholland Exp $
d28 1
d30 1
@


1.55
log
@- remove gcc-4.5 warnings
- simplify job printing code
- document non-literal format strings
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.54 2011/06/22 02:49:44 mrg Exp $
d54 1
a54 1
	cd ${.CURDIR}/unit-tests && ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
@


1.55.2.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.55 2011/08/14 13:06:09 christos Exp $
d54 1
a54 1
	cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
@


1.54
log
@apply some -Wno-error and/or -fno-strict-aliasing.


all of this should be looked at closer, but some of them are not
very trivial.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.53 2011/05/18 06:36:48 dsl Exp $
d39 4
a42 1
COPTS.var.c+= -Wno-cast-qual
a54 5

# XXX
.if ${HAVE_GCC} == 45
COPTS.compat.c+=	-Wno-error
.endif
@


1.53
log
@Back out a local change
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.52 2011/05/17 21:56:51 dsl Exp $
d52 5
@


1.52
log
@If a makefile if a multiple of the page size and doesn't end with a
newline, then it all goes horribly wrong when make tries to terminate
the last input line.
This was all ok before the mmap changes (rev 1.169) because the last
32 bytes of the input buffer were never read into.
The non-mmap case has a similar problem.
Bug found because my .depend files don't have a newline at the end of
the .OPTIO|NAL line (don't know if that is a local change).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.51 2010/09/13 15:36:57 sjg Exp $
a40 1
.if 0
a47 1
.endif
@


1.51
log
@Add meta.c which implements "meta" mode for make.
In this mode, a .meta file is created for each target, capturing
the expanded commands used, any command output, and if filemon(9)
is available, a record of system calls which are of interest.
Not enabled unless USE_META=yes is set when building make.
Also, if FILEMON_H exists, meta.c will be compiled to use filemon(9).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.50 2010/04/22 19:15:23 sjg Exp $
d41 1
d49 1
@


1.50
log
@PR: 42850
Reviewed by:

modmisc: since we apply an exists() test to $paths, be conservative
in what we expect.

Run the unit tests with -r -m / so that we do not fail if there
is no sys.mk present.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.49 2009/04/14 22:15:23 lukem Exp $
d16 11
@


1.49
log
@Enable WARNS=4 by default for usr.bin, except for:
	awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.48 2009/03/24 13:54:37 perry Exp $
d40 1
a40 1
	cd ${.CURDIR}/unit-tests && ${.MAKE:S,^./,${.CURDIR}/,} TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
@


1.48
log
@remove unneeded special rule for main.o
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.47 2009/03/20 20:48:00 perry Exp $
a16 1
WARNS=4
@


1.47
log
@The Makefile and main.c arranged to put "netbsd-${DATE}" into the
executable. Remove this so that different compiles can be binary
compared. rcsid's for all files are already embedded in the executable
so versions can be easily distinguished. (I didn't catch this on
previous passes because I did my builds on the same day.)

Note: there's a special rule for main.o in Makefile with a purpose I
can't actually discern -- I think it isn't needed, and I've flagged it
with a comment.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.46 2009/01/24 11:59:39 dsl Exp $
a28 2
# XXX is this special rule for main.o actually needed?
main.o:	${OBJS:Nmain.o} ${MAKEFILE}
@


1.46
log
@Move the bmake_malloc() functions into their own .c and .h files.
Include instead of make.h in a few places.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.45 2008/12/20 22:41:53 dsl Exp $
d28 2
a29 5
# provide a clue as to what we are using
BUILD_DATE!= date +%Y%m%d
MAKE_VERSION:= netbsd-${BUILD_DATE}
CPPFLAGS_main.o:= "-DMAKE_VERSION=\"${MAKE_VERSION}\""
CPPFLAGS+= ${CPPFLAGS_${.TARGET}} -DMAKE_NATIVE
@


1.46.2.1
log
@Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.49 2009/04/14 22:15:23 lukem Exp $
d17 1
d28 6
a33 1
CPPFLAGS+= -DMAKE_NATIVE
@


1.45
log
@Add functions for processing extendable arrays of pointers to strings.
Use for the .for variables and substution items - changing the latter from
make's all conquering lst.lib functions.
Being able to index everything makes the code simpler.
No functional changes intended.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.44 2008/10/06 22:09:21 joerg Exp $
d8 1
@


1.44
log
@Don't use emalloc and friends directly, but call them consistently
bmake_malloc and friends. Implement them via macros for the native case
and provide fallback implementations otherwise. Avoid polluting the
namespace by not defining enomem globally. Don't bother to provide
strdup and strndup, they were only used for the estrdup and estrndup
comapt code.

This addresses the presence of emalloc in system libraries on A/UX and
resulted strange issues as reported by Timothy E. Larson.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.43 2008/02/14 22:11:20 christos Exp $
d7 1
@


1.43
log
@- use pid_t/size_t as appropriate instead of int.
- use %ld to print pids.
- fix a bit of lint.
- WARNS=4
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.42 2007/09/25 21:28:26 uwe Exp $
d37 1
a37 1
CPPFLAGS+= -DHAVE_EMALLOC
@


1.42
log
@Revert 1.34 (CFLAGS+=-g) that have been commited by mistake (hi, xtos).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.41 2006/11/01 23:48:20 sjg Exp $
d15 1
a15 1
WARNS=3
@


1.41
log
@Use of libutil to provide emalloc et al, should be predicated on
a native NetBSD build using TOOLDIR etc.
Otherwise use the local versions.

Reviewed by: christos
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.40 2006/10/25 20:05:59 dsl Exp $
a21 1
CFLAGS+=-g
@


1.41.8.1
log
@sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.42 2007/09/25 21:28:26 uwe Exp $
d22 1
@


1.41.8.2
log
@sync with HEAD
@
text
@d1 1
a1 1
#	Makefile,v 1.41.8.1 2007/11/06 23:35:59 matt Exp
d15 1
a15 1
WARNS=4
@


1.41.4.1
log
@Catch up on netbsd-4 as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.41.2.1 2007/09/27 14:04:35 xtraeme Exp $
d22 1
@


1.41.2.1
log
@Pull up following revision(s) (requested by uwe in ticket #903):
	usr.bin/make/Makefile: revision 1.42

Revert 1.34 (CFLAGS+=-g) that have been commited by mistake (hi, xtos).
@
text
@d1 1
a1 1
#	$NetBSD$
d22 1
@


1.40
log
@Fix previous - need to add a lstPrev()
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.39 2006/10/08 17:52:29 peter Exp $
d35 4
a38 1
.ifndef HOSTPROG
@


1.39
log
@WFORMAT is no more...
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.38 2006/08/29 16:54:03 christos Exp $
d12 2
@


1.38
log
@protect libutil with HOSTPROG
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.37 2006/08/26 18:17:42 christos Exp $
a13 1
WFORMAT= 1
@


1.37
log
@More programs using efun.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.36 2006/06/15 10:55:02 skrll Exp $
d34 1
d37 1
@


1.36
log
@Remove a hack that's no longer needed with gcc 3.3.6.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.35 2006/05/08 11:07:57 he Exp $
d34 3
@


1.35
log
@Our gcc 3.3.3 (nb3) for hppa gets an "unrecognized insn" internal
compiler error when building buf.c with -O2, so reduce optimization
level to -O1 for this single file.
To be documented in docs/HACKS, discussed with skrll.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.34 2006/04/22 19:40:40 christos Exp $
a33 5
# XXX Triggers an "unrecognized insn" internal compiler error
.if ${MACHINE_ARCH} == "hppa"
COPTS.buf.c=	-O1
.endif

@


1.35.2.1
log
@Sync with head.
@
text
@d1 1
a1 1
#	$NetBSD$
d34 5
@


1.34
log
@Coverity CID 529: Call VarFreeEnv to prevent leak.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.33 2004/05/07 00:04:38 ross Exp $
d34 5
@


1.33
log
@Simplify build, no functional changes.

Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().

It's now possible to build make on some hosts with: cc *.c */*.c
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.32 2004/05/06 23:15:46 ross Exp $
d21 1
@


1.32
log
@Instead of including from the wrong directory and then fixing it (-I)
in the Makefile, how about just doing the right include?
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.31 2004/02/15 19:05:45 sjg Exp $
d29 1
a29 1
CPPFLAGS+= ${CPPFLAGS_${.TARGET}}
@


1.31
log
@Use ${.MAKE:S,^./,${.CURDIR}/,} so that when someone does
./make test
it works.  Note use .CURDIR rather than .OBJDIR since the later
_may_ not always be correct (eg. symlink in .CURDIR for make).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.30 2003/08/01 03:55:59 sjg Exp $
a3 1
CPPFLAGS+= -I${.CURDIR}
@


1.31.2.1
log
@Pull up revision 1.32 (requested by sjg in ticket #282):
Instead of including from the wrong directory and then fixing it (-I)
in the Makefile, how about just doing the right include?
@
text
@d1 1
a1 1
#	$NetBSD$
d4 1
@


1.31.2.2
log
@Pull up revision 1.33 (requested by sjg in ticket #282):
Simplify build, no functional changes.
Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().
It's now possible to build make on some hosts with: cc *.c */*.c
@
text
@d29 1
a29 1
CPPFLAGS+= ${CPPFLAGS_${.TARGET}} -DMAKE_NATIVE
@


1.30
log
@Fix for TEST_MAKE from Alan Barrett
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.29 2003/07/28 22:52:10 sjg Exp $
d36 1
a36 1
	cd ${.CURDIR}/unit-tests && ${.MAKE} TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
@


1.29
log
@Fix parsing bug for :ts - patch from Alan Barrett <apb@@cequrux.com>
Also add simple unit-test jig (regress/usr.bin/make will use it too)
but having it local here makes inclusion in bmake simpler.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.28 2003/07/26 16:04:29 mrg Exp $
d36 1
a36 1
	cd ${.CURDIR}/unit-tests && ${.MAKE} TEST_MAKE=${TEST_MAKE:U../${PROG:T}} ${.TARGET}
@


1.28
log
@build var.c with -Wno-cast-qual - gcc3.3 complains about VarWordCompare()
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.27 2003/07/14 18:19:11 christos Exp $
d19 3
d33 4
@


1.27
log
@Pass WARNS=3
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.26 2002/01/27 01:50:54 reinoud Exp $
d29 1
@


1.26
log
@Fix major bug in make(1) ... due to shadowing of the dotLast path used for
the .DOTLAST primitive by a boolean variable with the same name, this whole
mechanism was broken ... it doesn't save much stat calls but it was wrong.

Thanks to Jason Thorpe for the other shadow-variable fixing patches he
made.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.25 2001/10/31 03:59:42 tv Exp $
d14 1
a14 1
WARNS=2
@


1.25
log
@Overhaul the initialization and handling of .OBJDIR:

* Replace chdir_verify_path() with Main_SetObjdir(), which can be called
  externally, and can take a "const char *".  (There's a lot of non-const
  "char *" passing around in var.c of what should be const strings....)

* Rewrite the initial "find my .OBJDIR" code to make use of the new
  function.  This still functions as it had in the past, but the comment
  above this block was changed to reflect reality:  if MAKEOBJDIRPREFIX
  or MAKEOBJDIR are set in the environment, then *only that value* is
  tried; make does not fall back to obj.MACHINE, obj, and /usr/obj/`pwd`
  as it would without these env vars set.

* Add a new special target, .OBJDIR:, which when parsed will cause make to
  change to a new object directory and reset .OBJDIR, and PWD in the
  environment.  This will allow some makefiles (mainly, src/tools)
  to override the default objdir semantics in order to add custom logic.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.24 2001/06/09 05:17:51 sjg Exp $
d14 1
@


1.24
log
@Provide a useful? MAKE_VERSION.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.23 2000/12/30 02:06:42 sommerfeld Exp $
d27 1
a27 1
main.o:	${SRCS} ${MAKEFILE}
@


1.23
log
@Back out debug cruft.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.22 2000/12/30 02:05:20 sommerfeld Exp $
d21 7
@


1.22
log
@Add a token-passing scheme to allow a recursive make to successfully
use -j; all make's in a recursive build cooperate to limit the total
number of jobs, using a token-passing scheme.

The current token passing algorithm is similar to the one implemented
by gmake; there is a single pipe which is inherited through the entire
process hierarchy; tokens are obtained by reading a byte from the
"read end" of the pipe, and are returned by writing them to the "write
end".  This exact algorithm is likely to change in the future.

Implementation details:
 - Use the new trace facility to allow measurement of the
effectiveness of different token-passing schemes
 - Get a token in MakeStartJobs(), return it in Make_Update()
 - Eliminate Job_Full() and the jobFull global since they are
redundant with token system.
 - Add an "internal" -J option (to pass the token pipe fd's down to
submakes) and a -T option for tracing.
 - Change how compatMake is forced so that -j means something when
inherited by submakes.
 - When waiting for a token, poll the token-passing pipe as well as
the output pipes of existing jobs.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2000/10/11 14:46:12 is Exp $
a3 4
DBG=-g
LDSTATIC=-static
WARNS?=	1
WFORMAT?= 2
@


1.21
log
@More format string cleanup by sommerfeld.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 1999/08/04 16:44:07 ross Exp $
d4 4
d11 1
a11 1
	make.c parse.c str.c suff.c targ.c var.c util.c
@


1.20
log
@Back out part of previous, only the parse.c mod was intended.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 1997/10/24 09:00:47 lukem Exp $
d14 1
a14 1

@


1.20.8.1
log
@Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2000/10/11 14:46:12 is Exp $
d14 1
a14 1
WFORMAT= 1
@


1.19
log
@Trivial speed hack.
@
text
@a4 2
CFLAGS+= -pg
LDFLAGS+= -pg
@


1.18
log
@use CPPFLAGS instead of CFLAGS
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17 1997/10/19 04:23:02 lukem Exp $
d5 2
@


1.18.2.1
log
@Pull up revision 1.21 (requested by he):
  Format string cleanup.
@
text
@d1 1
a1 1
#	$NetBSD$
d14 1
a14 1
WFORMAT= 1
@


1.17
log
@don't define WARNS=1 here
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 1997/10/11 09:34:46 mycroft Exp $
d4 1
a4 1
CFLAGS+= -I${.CURDIR}
@


1.17.2.1
log
@sync with trunk (approved by thorpej)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 1997/10/24 09:00:47 lukem Exp $
d4 1
a4 1
CPPFLAGS+= -I${.CURDIR}
@


1.16
log
@Use bsd.subdir.mk as appropriate.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 1997/07/01 21:17:00 christos Exp $
a3 1
WARNS=1
@


1.15
log
@Add WARNS=1
RCSID police
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 1997/05/08 21:11:43 gwr Exp $
d17 1
a17 1
SUBDIR+= PSD.doc
d21 1
@


1.14
log
@Back out the .PATH.c changes.  The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 1997/05/06 20:45:36 gwr Exp $
d4 2
a6 1
CFLAGS+= -g -I${.CURDIR} -Wall -Wno-unused #-Wmissing-prototypes -Wstrict-prototypes
@


1.13
log
@Use .PATH.c: ...
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 1996/11/06 17:58:58 christos Exp $
d13 1
a13 1
.PATH.c: ${.CURDIR}/lst.lib
@


1.12
log
@- Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
  be considered to be out of date, since it does not have a TOC.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 1996/05/28 23:34:35 christos Exp $
d13 1
a13 1
.PATH:	${.CURDIR}/lst.lib
@


1.11
log
@- Move -D flags from Makefile to config.h and explain what they do. Add
  -Wall -Wno-unused to CFLAGS. Add new define SYSVVARSUB to enable SysV
  style variable substitutions and enable them.
- Add SunOS style command substitutions via SUNSHCMD
- Fix core dump with '{variable = value'
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 1996/03/11 13:45:31 christos Exp $
d5 1
a5 1
CFLAGS+= -I${.CURDIR} -Wall -Wno-unused
@


1.10
log
@Jonathan Stone's fixes:
main.c:	Remove double include of <sys/resource.h>; if MACHINE is defined, use
	that instead of uname.
Makefile: Add util.c.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 1996/02/04 22:20:27 christos Exp $
d5 1
a5 1
CFLAGS+= -I${.CURDIR} -DPOSIX -DSYSVINCLUDE
@


1.10.4.1
log
@Update make(1) from trunk, by request from Christos Zoulas.  Fixes many bugs.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 1996/11/06 17:58:58 christos Exp $
d5 1
a5 1
CFLAGS+= -g -I${.CURDIR} -Wall -Wno-unused #-Wmissing-prototypes -Wstrict-prototypes
@


1.9
log
@fix pr/1421 and pr/1997
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 1995/06/14 15:18:37 christos Exp $
d7 1
a7 1
	make.c parse.c str.c suff.c targ.c var.c
@


1.8
log
@- $NetBSD$ rcsids
- Fixed so that .[A-Z]* targets that do not match keywords are ignored as
  Posix mandates
- Added .PHONY target keyword
@
text
@d1 1
a1 1
#	$NetBSD$
d5 1
a5 1
CFLAGS+= -I${.CURDIR} -DPOSIX
@


1.7
log
@None of the functions in util.c are needed by NetBSD, so don't
bother to compile it.
@
text
@d1 2
a2 2
#	from: @@(#)Makefile	5.2 (Berkeley) 12/28/90
#	$Id: Makefile,v 1.6 1994/06/30 05:33:39 cgd Exp $
@


1.6
log
@deal with new share/doc strategy
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.5 1994/06/25 05:57:47 cgd Exp $
d7 1
a7 1
	make.c parse.c str.c suff.c targ.c var.c util.c
@


1.5
log
@update for new doc-make/install strategy
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.4 1994/03/05 00:34:29 cgd Exp $
d15 1
a15 1
.if !make(all) && !make(depend) && !make(lint) && !make(tags)
@


1.4
log
@fixes/improvements from Christos Zoulas <christos@@deshaw.com>.
@
text
@d2 1
a2 1
#	$Id$
d14 4
@


1.3
log
@Compile with -DPOSIX --- enables reasonable behavior for MAKE and
MAKEFLAGS variables.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.2 1993/07/31 15:19:42 mycroft Exp $
d5 3
a7 3
CFLAGS+=-I${.CURDIR} -DPOSIX
SRCS=	arch.c buf.c compat.c cond.c dir.c hash.c job.c main.c \
	make.c parse.c str.c suff.c targ.c var.c
@


1.2
log
@Add RCS indentifiers.
@
text
@d2 1
a2 1
#	$Id: $
d5 1
a5 1
CFLAGS+=-I${.CURDIR}
@


1.1
log
@Initial revision
@
text
@d1 2
a2 1
#	@@(#)Makefile	5.2 (Berkeley) 12/28/90
@


1.1.1.1
log
@initial import of 386bsd-0.1 sources
@
text
@@


1.1.1.2
log
@Import 4.4BSD-Lite2 sources onto CSRG branch (already merged at head)
@
text
@d1 1
a1 2
#	from: @@(#)Makefile	5.2 (Berkeley) 12/28/90
#	$Id: Makefile,v 1.6 1994/06/30 05:33:39 cgd Exp $
d4 2
a5 2
CFLAGS+= -I${.CURDIR} -DPOSIX
SRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
a12 4

.if make(install)
SUBDIR+= PSD.doc
.endif
@
