head	1.383;
access;
symbols
	netbsd-11-0-RC4:1.369
	netbsd-11-0-RC3:1.369
	netbsd-11-0-RC2:1.369
	netbsd-11-0-RC1:1.369
	perseant-exfatfs-base-20250801:1.369
	netbsd-11:1.369.0.2
	netbsd-11-base:1.369
	netbsd-10-1-RELEASE:1.327
	perseant-exfatfs-base-20240630:1.347
	perseant-exfatfs:1.347.0.2
	perseant-exfatfs-base:1.347
	netbsd-8-3-RELEASE:1.52.8.1
	netbsd-9-4-RELEASE:1.53
	netbsd-10-0-RELEASE:1.327
	netbsd-10-0-RC6:1.327
	netbsd-10-0-RC5:1.327
	netbsd-10-0-RC4:1.327
	netbsd-10-0-RC3:1.327
	netbsd-10-0-RC2:1.327
	netbsd-10-0-RC1:1.327
	netbsd-10:1.327.0.2
	netbsd-10-base:1.327
	netbsd-9-3-RELEASE:1.53
	cjep_sun2x-base1:1.278
	cjep_sun2x:1.278.0.2
	cjep_sun2x-base:1.278
	cjep_staticlib_x-base1:1.278
	netbsd-9-2-RELEASE:1.53
	cjep_staticlib_x:1.277.0.2
	cjep_staticlib_x-base:1.277
	netbsd-9-1-RELEASE:1.53
	phil-wifi-20200421:1.54
	phil-wifi-20200411:1.54
	is-mlppp:1.54.0.2
	is-mlppp-base:1.54
	phil-wifi-20200406:1.54
	netbsd-8-2-RELEASE:1.52.8.1
	netbsd-9-0-RELEASE:1.53
	netbsd-9-0-RC2:1.53
	netbsd-9-0-RC1:1.53
	phil-wifi-20191119:1.53
	netbsd-9:1.53.0.4
	netbsd-9-base:1.53
	phil-wifi-20190609:1.53
	netbsd-8-1-RELEASE:1.52.8.1
	netbsd-8-1-RC1:1.52.8.1
	pgoyette-compat-merge-20190127:1.52.14.1
	pgoyette-compat-20190127:1.53
	pgoyette-compat-20190118:1.53
	pgoyette-compat-1226:1.53
	pgoyette-compat-1126:1.53
	pgoyette-compat-1020:1.53
	pgoyette-compat-0930:1.53
	pgoyette-compat-0906:1.53
	netbsd-7-2-RELEASE:1.38
	pgoyette-compat-0728:1.53
	netbsd-8-0-RELEASE:1.52.8.1
	phil-wifi:1.53.0.2
	phil-wifi-base:1.53
	pgoyette-compat-0625:1.53
	netbsd-8-0-RC2:1.52.8.1
	pgoyette-compat-0521:1.52
	pgoyette-compat-0502:1.52
	pgoyette-compat-0422:1.52
	netbsd-8-0-RC1:1.52
	pgoyette-compat-0415:1.52
	pgoyette-compat-0407:1.52
	pgoyette-compat-0330:1.52
	pgoyette-compat-0322:1.52
	pgoyette-compat-0315:1.52
	netbsd-7-1-2-RELEASE:1.38
	pgoyette-compat:1.52.0.14
	pgoyette-compat-base:1.52
	netbsd-7-1-1-RELEASE:1.38
	matt-nb8-mediatek:1.52.0.12
	matt-nb8-mediatek-base:1.52
	perseant-stdc-iso10646:1.52.0.10
	perseant-stdc-iso10646-base:1.52
	netbsd-8:1.52.0.8
	netbsd-8-base:1.52
	prg-localcount2-base3:1.52
	prg-localcount2-base2:1.52
	prg-localcount2-base1:1.52
	prg-localcount2:1.52.0.6
	prg-localcount2-base:1.52
	pgoyette-localcount-20170426:1.52
	bouyer-socketcan-base1:1.52
	pgoyette-localcount-20170320:1.52
	netbsd-7-1:1.38.0.10
	netbsd-7-1-RELEASE:1.38
	netbsd-7-1-RC2:1.38
	netbsd-7-nhusb-base-20170116:1.38
	bouyer-socketcan:1.52.0.4
	bouyer-socketcan-base:1.52
	pgoyette-localcount-20170107:1.52
	netbsd-7-1-RC1:1.38
	pgoyette-localcount-20161104:1.52
	netbsd-7-0-2-RELEASE:1.38
	localcount-20160914:1.52
	netbsd-7-nhusb:1.38.0.8
	netbsd-7-nhusb-base:1.38
	pgoyette-localcount-20160806:1.52
	pgoyette-localcount-20160726:1.52
	pgoyette-localcount:1.52.0.2
	pgoyette-localcount-base:1.52
	netbsd-7-0-1-RELEASE:1.38
	netbsd-7-0:1.38.0.6
	netbsd-7-0-RELEASE:1.38
	netbsd-7-0-RC3:1.38
	netbsd-7-0-RC2:1.38
	netbsd-7-0-RC1:1.38
	netbsd-5-2-3-RELEASE:1.23
	netbsd-5-1-5-RELEASE:1.23
	netbsd-6-0-6-RELEASE:1.33
	netbsd-6-1-5-RELEASE:1.33
	netbsd-7:1.38.0.4
	netbsd-7-base:1.38
	yamt-pagecache-base9:1.38
	yamt-pagecache-tag8:1.33.2.2
	netbsd-6-1-4-RELEASE:1.33
	netbsd-6-0-5-RELEASE:1.33
	tls-earlyentropy:1.38.0.2
	tls-earlyentropy-base:1.38
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.38
	riastradh-drm2-base3:1.38
	netbsd-6-1-3-RELEASE:1.33
	netbsd-6-0-4-RELEASE:1.33
	netbsd-5-2-2-RELEASE:1.23
	netbsd-5-1-4-RELEASE:1.23
	netbsd-6-1-2-RELEASE:1.33
	netbsd-6-0-3-RELEASE:1.33
	netbsd-5-2-1-RELEASE:1.23
	netbsd-5-1-3-RELEASE:1.23
	netbsd-6-1-1-RELEASE:1.33
	riastradh-drm2-base2:1.37
	riastradh-drm2-base1:1.37
	riastradh-drm2:1.37.0.2
	riastradh-drm2-base:1.37
	netbsd-6-1:1.33.0.10
	netbsd-6-0-2-RELEASE:1.33
	netbsd-6-1-RELEASE:1.33
	netbsd-6-1-RC4:1.33
	netbsd-6-1-RC3:1.33
	agc-symver:1.36.0.2
	agc-symver-base:1.36
	netbsd-6-1-RC2:1.33
	dholland-make-base:1.35
	netbsd-6-1-RC1:1.33
	yamt-pagecache-base8:1.35
	netbsd-5-2:1.23.0.14
	netbsd-6-0-1-RELEASE:1.33
	yamt-pagecache-base7:1.35
	netbsd-5-2-RELEASE:1.23
	netbsd-5-2-RC1:1.23
	matt-nb6-plus-nbase:1.33
	yamt-pagecache-base6:1.34
	netbsd-6-0:1.33.0.8
	netbsd-6-0-RELEASE:1.33
	netbsd-6-0-RC2:1.33
	tls-maxphys:1.34.0.2
	tls-maxphys-base:1.38
	matt-nb6-plus:1.33.0.6
	matt-nb6-plus-base:1.33
	netbsd-6-0-RC1:1.33
	yamt-pagecache-base5:1.33
	yamt-pagecache-base4:1.33
	netbsd-6:1.33.0.4
	netbsd-6-base:1.33
	netbsd-5-1-2-RELEASE:1.23
	netbsd-5-1-1-RELEASE:1.23
	yamt-pagecache-base3:1.33
	yamt-pagecache-base2:1.33
	yamt-pagecache:1.33.0.2
	yamt-pagecache-base:1.33
	cherry-xenmp:1.32.0.2
	cherry-xenmp-base:1.32
	bouyer-quota2-nbase:1.30
	bouyer-quota2:1.30.0.2
	bouyer-quota2-base:1.30
	matt-mips64-premerge-20101231:1.30
	matt-nb5-mips64-premerge-20101231:1.23
	matt-nb5-pq3:1.23.0.12
	matt-nb5-pq3-base:1.23
	netbsd-5-1:1.23.0.10
	netbsd-5-1-RELEASE:1.23
	netbsd-5-1-RC4:1.23
	matt-nb5-mips64-k15:1.23
	netbsd-5-1-RC3:1.23
	netbsd-5-1-RC2:1.23
	netbsd-5-1-RC1:1.23
	netbsd-5-0-2-RELEASE:1.23
	matt-nb5-mips64-premerge-20091211:1.23
	matt-premerge-20091211:1.25
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.23
	matt-nb4-mips64-k7-u2a-k9b:1.23
	matt-nb5-mips64-u1-k1-k5:1.23
	matt-nb5-mips64:1.23.0.8
	netbsd-5-0-1-RELEASE:1.23
	jym-xensuspend-nbase:1.23
	netbsd-5-0:1.23.0.6
	netbsd-5-0-RELEASE:1.23
	netbsd-5-0-RC4:1.23
	netbsd-5-0-RC3:1.23
	netbsd-5-0-RC2:1.23
	jym-xensuspend:1.23.0.4
	jym-xensuspend-base:1.23
	netbsd-5-0-RC1:1.23
	netbsd-5:1.23.0.2
	netbsd-5-base:1.23
	matt-mips64-base2:1.22
	matt-mips64:1.20.0.16
	netbsd-4-0-1-RELEASE:1.20
	wrstuden-revivesa-base-3:1.22
	wrstuden-revivesa-base-2:1.22
	wrstuden-fixsa-newbase:1.20
	wrstuden-revivesa-base-1:1.22
	yamt-pf42-base4:1.22
	yamt-pf42-base3:1.22
	hpcarm-cleanup-nbase:1.22
	yamt-pf42-baseX:1.22
	yamt-pf42-base2:1.22
	wrstuden-revivesa:1.22.0.4
	wrstuden-revivesa-base:1.22
	yamt-pf42:1.22.0.2
	yamt-pf42-base:1.22
	keiichi-mipv6-nbase:1.21
	keiichi-mipv6:1.21.0.4
	keiichi-mipv6-base:1.21
	christos-broken:1.21
	matt-armv6-nbase:1.21
	matt-armv6-prevmlocking:1.20.12.1
	wrstuden-fixsa-base-1:1.20
	netbsd-4-0:1.20.0.14
	netbsd-4-0-RELEASE:1.20
	cube-autoconf:1.21.0.2
	cube-autoconf-base:1.21
	netbsd-4-0-RC5:1.20
	netbsd-4-0-RC4:1.20
	netbsd-4-0-RC3:1.20
	netbsd-4-0-RC2:1.20
	netbsd-4-0-RC1:1.20
	matt-armv6:1.20.0.12
	matt-armv6-base:1.21
	matt-mips64-base:1.20
	hpcarm-cleanup:1.20.0.10
	hpcarm-cleanup-base:1.21
	netbsd-3-1-1-RELEASE:1.14.2.3
	netbsd-3-0-3-RELEASE:1.14.2.3
	wrstuden-fixsa:1.20.0.8
	wrstuden-fixsa-base:1.20
	abandoned-netbsd-4-base:1.20
	abandoned-netbsd-4:1.20.0.4
	netbsd-3-1:1.14.2.3.0.4
	netbsd-3-1-RELEASE:1.14.2.3
	netbsd-3-0-2-RELEASE:1.14.2.3
	netbsd-3-1-RC4:1.14.2.3
	netbsd-3-1-RC3:1.14.2.3
	netbsd-3-1-RC2:1.14.2.3
	netbsd-3-1-RC1:1.14.2.3
	netbsd-4:1.20.0.6
	netbsd-4-base:1.20
	chap-midi-nbase:1.20
	netbsd-3-0-1-RELEASE:1.14.2.3
	chap-midi:1.20.0.2
	chap-midi-base:1.20
	netbsd-3-0:1.14.2.3.0.2
	netbsd-3-0-RELEASE:1.14.2.3
	netbsd-3-0-RC6:1.14.2.3
	netbsd-3-0-RC5:1.14.2.3
	netbsd-3-0-RC4:1.14.2.3
	netbsd-3-0-RC3:1.14.2.3
	netbsd-3-0-RC2:1.14.2.3
	netbsd-3-0-RC1:1.14.2.3
	netbsd-2-0-3-RELEASE:1.11.2.2
	netbsd-2-1:1.11.2.2.0.4
	netbsd-2-1-RELEASE:1.11.2.2
	netbsd-2-1-RC6:1.11.2.2
	netbsd-2-1-RC5:1.11.2.2
	netbsd-2-1-RC4:1.11.2.2
	netbsd-2-1-RC3:1.11.2.2
	netbsd-2-1-RC2:1.11.2.2
	netbsd-2-1-RC1:1.11.2.2
	netbsd-2-0-2-RELEASE:1.11.2.2
	netbsd-3:1.14.0.2
	netbsd-3-base:1.14
	netbsd-2-0-1-RELEASE:1.11.2.2
	netbsd-2:1.11.2.2.0.2
	netbsd-2-base:1.11.2.2
	netbsd-2-0-RELEASE:1.11.2.2
	netbsd-2-0-RC5:1.11.2.2
	netbsd-2-0-RC4:1.11.2.2
	netbsd-2-0-RC3:1.11.2.2
	netbsd-2-0-RC2:1.11.2.2
	netbsd-2-0-RC1:1.11.2.2
	netbsd-2-0:1.11.0.2
	netbsd-2-0-base:1.11;
locks; strict;
comment	@# @;


1.383
date	2026.03.10.15.38.26;	author sjg;	state Exp;
branches;
next	1.382;
commitid	B2HWtIHXwBBExrxG;

1.382
date	2026.03.10.05.02.00;	author sjg;	state Exp;
branches;
next	1.381;
commitid	VWl5yhYs81Nj1oxG;

1.381
date	2026.03.09.20.09.10;	author sjg;	state Exp;
branches;
next	1.380;
commitid	Jr14hwVD8UBw4lxG;

1.380
date	2026.03.03.20.03.00;	author rillig;	state Exp;
branches;
next	1.379;
commitid	eb161CwdC912ezwG;

1.379
date	2026.02.11.21.39.21;	author sjg;	state Exp;
branches;
next	1.378;
commitid	8DaEAwDiO4chp0uG;

1.378
date	2026.02.10.22.33.36;	author sjg;	state Exp;
branches;
next	1.377;
commitid	8Gwjwf8XT9DSJStG;

1.377
date	2026.02.10.18.53.34;	author sjg;	state Exp;
branches;
next	1.376;
commitid	pvj2zluBGR7owRtG;

1.376
date	2026.02.05.23.26.08;	author sjg;	state Exp;
branches;
next	1.375;
commitid	bhffCRXjsovRbftG;

1.375
date	2026.01.03.20.48.35;	author rillig;	state Exp;
branches;
next	1.374;
commitid	8ZNiuMRrkiQvnZoG;

1.374
date	2025.11.16.16.43.56;	author sjg;	state Exp;
branches;
next	1.373;
commitid	L2EtKbJVdRBjzNiG;

1.373
date	2025.11.12.22.14.08;	author sjg;	state Exp;
branches;
next	1.372;
commitid	dqGGpvI6gtNywjiG;

1.372
date	2025.08.04.22.44.49;	author sjg;	state Exp;
branches;
next	1.371;
commitid	xVIlrcTs83DnUs5G;

1.371
date	2025.08.04.18.39.10;	author sjg;	state Exp;
branches;
next	1.370;
commitid	sCeBjQweOfN6yr5G;

1.370
date	2025.08.03.21.56.39;	author sjg;	state Exp;
branches;
next	1.369;
commitid	VL6LLfyjEIzQFk5G;

1.369
date	2025.06.29.09.40.13;	author rillig;	state Exp;
branches;
next	1.368;
commitid	pYgMrYqIM5SvIL0G;

1.368
date	2025.06.27.20.20.56;	author rillig;	state Exp;
branches;
next	1.367;
commitid	ptK0fYMPGTvbkz0G;

1.367
date	2025.06.13.20.23.16;	author rillig;	state Exp;
branches;
next	1.366;
commitid	1RKKrwO1tyhhNLYF;

1.366
date	2025.06.13.03.51.18;	author rillig;	state Exp;
branches;
next	1.365;
commitid	Dmn2d9jxc5gaiGYF;

1.365
date	2025.06.13.03.12.34;	author sjg;	state Exp;
branches;
next	1.364;
commitid	w1FtccYn5P6R5GYF;

1.364
date	2025.06.12.18.51.05;	author rillig;	state Exp;
branches;
next	1.363;
commitid	vFHPNQz9JJnCjDYF;

1.363
date	2025.06.05.21.56.54;	author rillig;	state Exp;
branches;
next	1.362;
commitid	5HlgHu0266W5tKXF;

1.362
date	2025.05.09.21.38.34;	author rillig;	state Exp;
branches;
next	1.361;
commitid	RwPBp3oWZZMLjhUF;

1.361
date	2025.05.07.19.49.00;	author rillig;	state Exp;
branches;
next	1.360;
commitid	BkOyy3VNNjF9N0UF;

1.360
date	2025.05.03.07.54.08;	author rillig;	state Exp;
branches;
next	1.359;
commitid	0lEOxubF0ys5YqTF;

1.359
date	2025.04.22.17.50.34;	author rillig;	state Exp;
branches;
next	1.358;
commitid	Xf8oxHbQK2JrC4SF;

1.358
date	2025.04.13.09.29.32;	author rillig;	state Exp;
branches;
next	1.357;
commitid	0g6qsRhbKlSC8SQF;

1.357
date	2025.04.12.05.16.57;	author sjg;	state Exp;
branches;
next	1.356;
commitid	NHG48puRYqC5MIQF;

1.356
date	2025.03.30.09.51.49;	author rillig;	state Exp;
branches;
next	1.355;
commitid	veGmSzVhPiW2G4PF;

1.355
date	2025.01.25.22.46.30;	author sjg;	state Exp;
branches;
next	1.354;
commitid	VycsvAHNE2pB3VGF;

1.354
date	2025.01.10.23.00.38;	author rillig;	state Exp;
branches;
next	1.353;
commitid	vECOnwAU0SdlAZEF;

1.353
date	2024.11.22.05.36.33;	author rillig;	state Exp;
branches;
next	1.352;
commitid	MlaHs276I7dRoByF;

1.352
date	2024.10.31.09.12.13;	author rillig;	state Exp;
branches;
next	1.351;
commitid	aM2UKIai5pq5gNvF;

1.351
date	2024.08.18.13.40.51;	author rillig;	state Exp;
branches;
next	1.350;
commitid	uNFFSjnAke26bjmF;

1.350
date	2024.07.07.09.37.00;	author rillig;	state Exp;
branches;
next	1.349;
commitid	6cBlyU5haQyS9TgF;

1.349
date	2024.07.04.20.18.40;	author rillig;	state Exp;
branches;
next	1.348;
commitid	75IS4XOhTa8VOygF;

1.348
date	2024.07.01.21.02.26;	author sjg;	state Exp;
branches;
next	1.347;
commitid	sLowRucpOT9qabgF;

1.347
date	2024.06.01.15.54.40;	author sjg;	state Exp;
branches
	1.347.2.1;
next	1.346;
commitid	JftBiFvXlvaDqicF;

1.346
date	2024.06.01.10.06.23;	author rillig;	state Exp;
branches;
next	1.345;
commitid	Yx22VslEFjA2vgcF;

1.345
date	2024.05.24.23.02.46;	author rillig;	state Exp;
branches;
next	1.344;
commitid	NXBk1YDJDhku1jbF;

1.344
date	2024.04.30.16.41.32;	author sjg;	state Exp;
branches;
next	1.343;
commitid	tJl47iO6XTGtIb8F;

1.343
date	2024.04.20.10.18.55;	author rillig;	state Exp;
branches;
next	1.342;
commitid	2fCjOO5HMlf2VR6F;

1.342
date	2024.01.07.02.07.44;	author sjg;	state Exp;
branches;
next	1.341;
commitid	k4NcYi0hEw7UxsTE;

1.341
date	2023.09.09.16.41.04;	author sjg;	state Exp;
branches;
next	1.340;
commitid	ppldu6kxLGTEe7EE;

1.340
date	2023.08.17.18.48.32;	author rillig;	state Exp;
branches;
next	1.339;
commitid	wL6ocbtw6DD9GaBE;

1.339
date	2023.06.20.09.25.34;	author rillig;	state Exp;
branches;
next	1.338;
commitid	lMxAjv5IExVfqFtE;

1.338
date	2023.06.16.09.25.13;	author rillig;	state Exp;
branches;
next	1.337;
commitid	UYlIXUqIf1Ooy9tE;

1.337
date	2023.06.16.07.20.45;	author rillig;	state Exp;
branches;
next	1.336;
commitid	KlNJujLPAdCKR8tE;

1.336
date	2023.06.01.07.27.30;	author rillig;	state Exp;
branches;
next	1.335;
commitid	TByDzLlWp7ZSndrE;

1.335
date	2023.05.10.13.03.06;	author rillig;	state Exp;
branches;
next	1.334;
commitid	y8zB66ROKp0PWpoE;

1.334
date	2023.05.09.20.14.27;	author sjg;	state Exp;
branches;
next	1.333;
commitid	6vbjw8CTuIeZmkoE;

1.333
date	2023.02.25.19.30.32;	author sjg;	state Exp;
branches;
next	1.332;
commitid	TtxgeoDQzBUotWeE;

1.332
date	2023.02.23.05.20.45;	author sjg;	state Exp;
branches;
next	1.331;
commitid	s7V1Mt2577uRPBeE;

1.331
date	2023.01.24.00.24.02;	author sjg;	state Exp;
branches;
next	1.330;
commitid	K9mmKTtcY1MQ9JaE;

1.330
date	2023.01.23.23.01.52;	author sjg;	state Exp;
branches;
next	1.329;
commitid	4u2S58OnauFFHIaE;

1.329
date	2023.01.19.23.26.14;	author rillig;	state Exp;
branches;
next	1.328;
commitid	QW5febCjKsOOXcaE;

1.328
date	2023.01.19.19.55.27;	author rillig;	state Exp;
branches;
next	1.327;
commitid	F8V98jb5hhOyNbaE;

1.327
date	2022.09.25.12.32.56;	author rillig;	state Exp;
branches;
next	1.326;
commitid	fzYJCwnWnJjQ4fVD;

1.326
date	2022.09.10.16.20.04;	author rillig;	state Exp;
branches;
next	1.325;
commitid	0r7iTlp01ggIOkTD;

1.325
date	2022.09.09.18.36.15;	author sjg;	state Exp;
branches;
next	1.324;
commitid	jrNpkHCLLHdABdTD;

1.324
date	2022.09.03.15.03.32;	author sjg;	state Exp;
branches;
next	1.323;
commitid	MukCnHGJ4dSyCqSD;

1.323
date	2022.09.02.18.54.25;	author sjg;	state Exp;
branches;
next	1.322;
commitid	nKb37nO5tMmLVjSD;

1.322
date	2022.09.02.16.24.31;	author sjg;	state Exp;
branches;
next	1.321;
commitid	jGjIPgPolZIk6jSD;

1.321
date	2022.08.25.06.23.38;	author rillig;	state Exp;
branches;
next	1.320;
commitid	Jb89hts24PHS1eRD;

1.320
date	2022.08.24.22.09.41;	author rillig;	state Exp;
branches;
next	1.319;
commitid	NKCkzSrs818TdbRD;

1.319
date	2022.07.26.19.32.25;	author sjg;	state Exp;
branches;
next	1.318;
commitid	e7xjLgLsJjTwmrND;

1.318
date	2022.06.10.21.28.50;	author rillig;	state Exp;
branches;
next	1.317;
commitid	ZGslk3rxJTM2uxHD;

1.317
date	2022.06.02.07.34.39;	author skrll;	state Exp;
branches;
next	1.316;
commitid	4fx62H91gc7E7rGD;

1.316
date	2022.05.23.22.33.56;	author rillig;	state Exp;
branches;
next	1.315;
commitid	tfWSwqSGxIDroeFD;

1.315
date	2022.05.08.10.20.49;	author rillig;	state Exp;
branches;
next	1.314;
commitid	fgZBpc1bPwNsQeDD;

1.314
date	2022.05.08.06.51.27;	author rillig;	state Exp;
branches;
next	1.313;
commitid	X9v7QTHwhWLcGdDD;

1.313
date	2022.05.07.17.49.47;	author rillig;	state Exp;
branches;
next	1.312;
commitid	5JRHZX8bMiHCk9DD;

1.312
date	2022.04.18.15.06.28;	author rillig;	state Exp;
branches;
next	1.311;
commitid	CcTXj2N3mEmi1HAD;

1.311
date	2022.03.26.12.44.57;	author rillig;	state Exp;
branches;
next	1.310;
commitid	6f9m8KEAaHz10JxD;

1.310
date	2022.03.25.22.38.39;	author rillig;	state Exp;
branches;
next	1.309;
commitid	DzNW33xP4LWolExD;

1.309
date	2022.02.12.13.17.57;	author rillig;	state Exp;
branches;
next	1.308;
commitid	W1SBO53pCaXRxksD;

1.308
date	2022.02.12.01.15.18;	author rillig;	state Exp;
branches;
next	1.307;
commitid	MTkOThKApZvyygsD;

1.307
date	2022.02.09.21.24.29;	author rillig;	state Exp;
branches;
next	1.306;
commitid	ze5DSAFa8WH8kZrD;

1.306
date	2022.02.09.21.09.24;	author rillig;	state Exp;
branches;
next	1.305;
commitid	naAnMwDcpsjngZrD;

1.305
date	2022.02.09.20.52.06;	author rillig;	state Exp;
branches;
next	1.304;
commitid	BmIHhizeCdqlaZrD;

1.304
date	2022.02.09.18.54.19;	author rillig;	state Exp;
branches;
next	1.303;
commitid	5wk1tx3C7ka3wYrD;

1.303
date	2022.02.07.22.43.50;	author rillig;	state Exp;
branches;
next	1.302;
commitid	81vkGgowua6hQJrD;

1.302
date	2022.01.27.21.50.50;	author sjg;	state Exp;
branches;
next	1.301;
commitid	wCfPteAosPNJUjqD;

1.301
date	2022.01.27.02.24.46;	author sjg;	state Exp;
branches;
next	1.300;
commitid	iZPaptRs08MHsdqD;

1.300
date	2022.01.23.18.00.53;	author rillig;	state Exp;
branches;
next	1.299;
commitid	tdc13c5w2yNBLMpD;

1.299
date	2022.01.23.16.25.54;	author rillig;	state Exp;
branches;
next	1.298;
commitid	dbnZ1mvRWB9WeMpD;

1.298
date	2022.01.23.16.09.38;	author rillig;	state Exp;
branches;
next	1.297;
commitid	55UrqaZMiBo29MpD;

1.297
date	2022.01.22.16.23.56;	author rillig;	state Exp;
branches;
next	1.296;
commitid	P3nHWTMw6l7sgEpD;

1.296
date	2022.01.19.22.10.41;	author rillig;	state Exp;
branches;
next	1.295;
commitid	huyj3UyHtxdwgipD;

1.295
date	2022.01.11.19.47.34;	author rillig;	state Exp;
branches;
next	1.294;
commitid	ILkHcbXzlZJtIfoD;

1.294
date	2022.01.09.20.53.53;	author rillig;	state Exp;
branches;
next	1.293;
commitid	kdBas9gFME20a0oD;

1.293
date	2021.12.28.01.04.03;	author rillig;	state Exp;
branches;
next	1.292;
commitid	PDpMejyB3uGEYlmD;

1.292
date	2021.12.28.00.56.17;	author rillig;	state Exp;
branches;
next	1.291;
commitid	LlBA1cDu6B1KVlmD;

1.291
date	2021.12.23.11.05.59;	author rillig;	state Exp;
branches;
next	1.290;
commitid	IJZwDH5d4p37tLlD;

1.290
date	2021.12.14.00.02.57;	author rillig;	state Exp;
branches;
next	1.289;
commitid	wmDfHJfgbWld5ykD;

1.289
date	2021.12.13.23.38.54;	author rillig;	state Exp;
branches;
next	1.288;
commitid	7rhw24srrR1oXxkD;

1.288
date	2021.12.12.22.16.48;	author rillig;	state Exp;
branches;
next	1.287;
commitid	hPuTu8ZbWn79xpkD;

1.287
date	2021.12.09.20.47.33;	author rillig;	state Exp;
branches;
next	1.286;
commitid	ciATFz0WdAmS71kD;

1.286
date	2021.12.05.15.20.13;	author rillig;	state Exp;
branches;
next	1.285;
commitid	2c35vbqBOypiptjD;

1.285
date	2021.12.05.14.57.36;	author rillig;	state Exp;
branches;
next	1.284;
commitid	5IZVnLaMQrx0jtjD;

1.284
date	2021.10.19.15.59.26;	author sjg;	state Exp;
branches;
next	1.283;
commitid	mPHj1uI6RBBtbrdD;

1.283
date	2021.08.30.17.08.13;	author rillig;	state Exp;
branches;
next	1.282;
commitid	aRKEYAVHUYBRU07D;

1.282
date	2021.07.31.20.55.46;	author rillig;	state Exp;
branches;
next	1.281;
commitid	dDP41kUtguNXnb3D;

1.281
date	2021.07.30.19.55.22;	author sjg;	state Exp;
branches;
next	1.280;
commitid	QWVT7ooJ4p6Q533D;

1.280
date	2021.06.29.00.35.23;	author sjg;	state Exp;
branches;
next	1.279;
commitid	dgHTrlBOZKSFFXYC;

1.279
date	2021.06.16.09.39.48;	author rillig;	state Exp;
branches;
next	1.278;
commitid	Dh3ZGXftgula6lXC;

1.278
date	2021.05.18.17.05.45;	author sjg;	state Exp;
branches;
next	1.277;
commitid	9kY8fvPMjTn8vETC;

1.277
date	2021.04.27.16.20.06;	author rillig;	state Exp;
branches
	1.277.2.1;
next	1.276;
commitid	qjhS4VtfBnPkRWQC;

1.276
date	2021.04.15.19.02.29;	author rillig;	state Exp;
branches;
next	1.275;
commitid	r0D1HUJq2R2QcqPC;

1.275
date	2021.04.04.13.20.52;	author rillig;	state Exp;
branches;
next	1.274;
commitid	2ef4FYAEKYi6FYNC;

1.274
date	2021.04.03.11.08.40;	author rillig;	state Exp;
branches;
next	1.273;
commitid	rZEDmhMLYd10YPNC;

1.273
date	2021.03.14.11.49.37;	author rillig;	state Exp;
branches;
next	1.272;
commitid	TtIPd1h4GTO1QgLC;

1.272
date	2021.03.14.10.45.51;	author rillig;	state Exp;
branches;
next	1.271;
commitid	ywMsmp6ijlbxsgLC;

1.271
date	2021.02.14.20.16.17;	author rillig;	state Exp;
branches;
next	1.270;
commitid	MNnCZZ1xNdlCxIHC;

1.270
date	2021.02.14.13.24.45;	author rillig;	state Exp;
branches;
next	1.269;
commitid	kauxvcw9vLEKfGHC;

1.269
date	2021.02.06.18.26.03;	author sjg;	state Exp;
branches;
next	1.268;
commitid	EkwF6FGpLjPXbGGC;

1.268
date	2021.02.04.00.16.03;	author rillig;	state Exp;
branches;
next	1.267;
commitid	s9jzrEQi2Z6AdkGC;

1.267
date	2021.02.03.08.34.15;	author rillig;	state Exp;
branches;
next	1.266;
commitid	lfFV9wY2hE8x0fGC;

1.266
date	2021.02.02.17.27.35;	author rillig;	state Exp;
branches;
next	1.265;
commitid	acIhW2avRPBEZ9GC;

1.265
date	2021.02.01.20.31.41;	author rillig;	state Exp;
branches;
next	1.264;
commitid	F3MQC8scmBrK23GC;

1.264
date	2021.01.30.12.46.38;	author rillig;	state Exp;
branches;
next	1.263;
commitid	dJ3tpECITxH9xKFC;

1.263
date	2021.01.29.22.38.17;	author rillig;	state Exp;
branches;
next	1.262;
commitid	GL8a8fvIAZ2oQFFC;

1.262
date	2021.01.23.07.34.00;	author rillig;	state Exp;
branches;
next	1.261;
commitid	VESAIPsMVqK12PEC;

1.261
date	2021.01.19.05.49.33;	author rillig;	state Exp;
branches;
next	1.260;
commitid	2zaO7RnldDl5AiEC;

1.260
date	2020.12.31.03.05.12;	author rillig;	state Exp;
branches;
next	1.259;
commitid	dIpEfPNmZz0HhQBC;

1.259
date	2020.12.30.14.50.08;	author rillig;	state Exp;
branches;
next	1.258;
commitid	7xqBbdd4Xr2ydMBC;

1.258
date	2020.12.29.01.45.06;	author rillig;	state Exp;
branches;
next	1.257;
commitid	MDp7Bo7VueEnRzBC;

1.257
date	2020.12.27.05.11.40;	author rillig;	state Exp;
branches;
next	1.256;
commitid	KP1EqmIL4wQG6lBC;

1.256
date	2020.12.21.20.47.29;	author rillig;	state Exp;
branches;
next	1.255;
commitid	3UVy6lprARqStEAC;

1.255
date	2020.12.21.20.35.17;	author rillig;	state Exp;
branches;
next	1.254;
commitid	9Y17CMwK8wCXpEAC;

1.254
date	2020.12.21.18.22.31;	author sjg;	state Exp;
branches;
next	1.253;
commitid	thmC9tngGALpGDAC;

1.253
date	2020.12.20.19.37.23;	author rillig;	state Exp;
branches;
next	1.252;
commitid	gRzbC1O2e2YP7wAC;

1.252
date	2020.12.19.16.00.17;	author rillig;	state Exp;
branches;
next	1.251;
commitid	DxaHgAJ9grivXmAC;

1.251
date	2020.12.19.12.14.59;	author rillig;	state Exp;
branches;
next	1.250;
commitid	E4p1tsTLdPO4IlAC;

1.250
date	2020.12.14.20.23.50;	author rillig;	state Exp;
branches;
next	1.249;
commitid	VigxP3qbt7JHzKzC;

1.249
date	2020.12.13.17.44.31;	author rillig;	state Exp;
branches;
next	1.248;
commitid	Iv2LgfRJ6bncJBzC;

1.248
date	2020.12.13.05.13.38;	author sjg;	state Exp;
branches;
next	1.247;
commitid	EQSN0IfF3HfUyxzC;

1.247
date	2020.12.13.02.09.33;	author sjg;	state Exp;
branches;
next	1.246;
commitid	mQaZenM10YFzywzC;

1.246
date	2020.12.13.00.46.25;	author rillig;	state Exp;
branches;
next	1.245;
commitid	0emUrsunMxDF5wzC;

1.245
date	2020.12.12.15.06.11;	author rillig;	state Exp;
branches;
next	1.244;
commitid	9UrI59E2GmhPSszC;

1.244
date	2020.12.10.17.06.13;	author rillig;	state Exp;
branches;
next	1.243;
commitid	3ZcmeXdJUZtmBdzC;

1.243
date	2020.12.09.08.18.35;	author rillig;	state Exp;
branches;
next	1.242;
commitid	N3NF3F8PrBQ0J2zC;

1.242
date	2020.12.09.07.57.52;	author rillig;	state Exp;
branches;
next	1.241;
commitid	23I8VgbATjhOB2zC;

1.241
date	2020.12.09.00.25.00;	author rillig;	state Exp;
branches;
next	1.240;
commitid	G1RAXoG6jCjz60zC;

1.240
date	2020.12.07.22.27.56;	author rillig;	state Exp;
branches;
next	1.239;
commitid	vMwfp2giYQ0ouRyC;

1.239
date	2020.12.07.21.35.43;	author rillig;	state Exp;
branches;
next	1.238;
commitid	nnQl7RpjENvecRyC;

1.238
date	2020.12.07.01.32.04;	author rillig;	state Exp;
branches;
next	1.237;
commitid	WZbYQCl8XXrxxKyC;

1.237
date	2020.12.06.21.22.04;	author rillig;	state Exp;
branches;
next	1.236;
commitid	iVrgAso25hpM9JyC;

1.236
date	2020.12.05.03.42.15;	author sjg;	state Exp;
branches;
next	1.235;
commitid	RrOoCiA62qPjkvyC;

1.235
date	2020.12.04.14.28.50;	author rillig;	state Exp;
branches;
next	1.234;
commitid	hWGssFm1GcCvUqyC;

1.234
date	2020.12.01.22.16.36;	author rillig;	state Exp;
branches;
next	1.233;
commitid	2as1oNUZfp1RB5yC;

1.233
date	2020.12.01.20.37.30;	author rillig;	state Exp;
branches;
next	1.232;
commitid	cm7MFdMSBWFu45yC;

1.232
date	2020.12.01.17.50.04;	author rillig;	state Exp;
branches;
next	1.231;
commitid	I7mTHEinMnQK84yC;

1.231
date	2020.11.30.21.10.15;	author rillig;	state Exp;
branches;
next	1.230;
commitid	aMSOVwkswCUBhXxC;

1.230
date	2020.11.30.18.32.49;	author sjg;	state Exp;
branches;
next	1.229;
commitid	1QJniUWQwtTNpWxC;

1.229
date	2020.11.29.18.49.36;	author rillig;	state Exp;
branches;
next	1.228;
commitid	w4EuFxxAwXbrxOxC;

1.228
date	2020.11.29.14.29.19;	author rillig;	state Exp;
branches;
next	1.227;
commitid	rEGcqsELPbLd6NxC;

1.227
date	2020.11.29.10.57.16;	author rillig;	state Exp;
branches;
next	1.226;
commitid	nr7qxWGeUq94VLxC;

1.226
date	2020.11.25.00.50.44;	author sjg;	state Exp;
branches;
next	1.225;
commitid	yLOxzqAb6hspHcxC;

1.225
date	2020.11.25.00.32.18;	author sjg;	state Exp;
branches;
next	1.224;
commitid	B0XyGW2TII15BcxC;

1.224
date	2020.11.24.19.02.59;	author rillig;	state Exp;
branches;
next	1.223;
commitid	1Dam87KJ6VHULaxC;

1.223
date	2020.11.24.17.59.42;	author rillig;	state Exp;
branches;
next	1.222;
commitid	zM9jpkNC4RmgqaxC;

1.222
date	2020.11.24.15.36.51;	author rillig;	state Exp;
branches;
next	1.221;
commitid	Rp32rT5WqekfD9xC;

1.221
date	2020.11.23.16.01.59;	author rillig;	state Exp;
branches;
next	1.220;
commitid	U5WKq1RCFmi4N1xC;

1.220
date	2020.11.23.15.00.32;	author rillig;	state Exp;
branches;
next	1.219;
commitid	jYzVUemkH5NMs1xC;

1.219
date	2020.11.22.23.45.20;	author rillig;	state Exp;
branches;
next	1.218;
commitid	2usjFh5sgbTToWwC;

1.218
date	2020.11.22.20.36.17;	author rillig;	state Exp;
branches;
next	1.217;
commitid	Ru2GViyMtJNVlVwC;

1.217
date	2020.11.22.19.37.27;	author rillig;	state Exp;
branches;
next	1.216;
commitid	WM6fcHFi0C7E1VwC;

1.216
date	2020.11.22.18.44.10;	author rillig;	state Exp;
branches;
next	1.215;
commitid	q9FvZQWUEO3ZIUwC;

1.215
date	2020.11.22.18.25.43;	author rillig;	state Exp;
branches;
next	1.214;
commitid	ePMBUDM1P9SvCUwC;

1.214
date	2020.11.21.21.41.27;	author rillig;	state Exp;
branches;
next	1.213;
commitid	UEP6kavKo33jKNwC;

1.213
date	2020.11.21.17.44.40;	author rillig;	state Exp;
branches;
next	1.212;
commitid	4J9FXeZu7ooopMwC;

1.212
date	2020.11.21.10.32.42;	author rillig;	state Exp;
branches;
next	1.211;
commitid	yVeFrB2g7apM2KwC;

1.211
date	2020.11.19.23.50.26;	author rillig;	state Exp;
branches;
next	1.210;
commitid	1yTtlZr8JrvqwywC;

1.210
date	2020.11.19.21.46.10;	author rillig;	state Exp;
branches;
next	1.209;
commitid	awu1zU46ak2qPxwC;

1.209
date	2020.11.19.21.39.50;	author rillig;	state Exp;
branches;
next	1.208;
commitid	jbywISngKgEENxwC;

1.208
date	2020.11.19.21.35.46;	author rillig;	state Exp;
branches;
next	1.207;
commitid	wR4s9JxKub6YLxwC;

1.207
date	2020.11.18.04.10.34;	author sjg;	state Exp;
branches;
next	1.206;
commitid	K8IQb9B9p3KU1kwC;

1.206
date	2020.11.18.01.12.00;	author sjg;	state Exp;
branches;
next	1.205;
commitid	YJl4JfPyHduE2jwC;

1.205
date	2020.11.17.20.27.35;	author rillig;	state Exp;
branches;
next	1.204;
commitid	vTsbt6uPfyg0thwC;

1.204
date	2020.11.17.20.19.24;	author rillig;	state Exp;
branches;
next	1.203;
commitid	mOQeP3sYI1tWphwC;

1.203
date	2020.11.16.15.12.16;	author rillig;	state Exp;
branches;
next	1.202;
commitid	OBw4xYebByoIK7wC;

1.202
date	2020.11.15.20.50.46;	author rillig;	state Exp;
branches;
next	1.201;
commitid	pyf3AiKEed8XE1wC;

1.201
date	2020.11.15.20.20.58;	author rillig;	state Exp;
branches;
next	1.200;
commitid	XVSvahyacE1wu1wC;

1.200
date	2020.11.14.18.07.26;	author rillig;	state Exp;
branches;
next	1.199;
commitid	C9NlcK2NQwxjMSvC;

1.199
date	2020.11.14.15.35.20;	author rillig;	state Exp;
branches;
next	1.198;
commitid	iehcvvP8OP4DWRvC;

1.198
date	2020.11.12.23.35.21;	author sjg;	state Exp;
branches;
next	1.197;
commitid	W2WOUx1mqyysFEvC;

1.197
date	2020.11.10.22.23.37;	author rillig;	state Exp;
branches;
next	1.196;
commitid	rEzDHOWu9CqSiovC;

1.196
date	2020.11.10.00.19.19;	author rillig;	state Exp;
branches;
next	1.195;
commitid	yWhzessDonlq0hvC;

1.195
date	2020.11.09.20.50.56;	author rillig;	state Exp;
branches;
next	1.194;
commitid	3Iwhpy9FwOiWQfvC;

1.194
date	2020.11.09.20.39.46;	author rillig;	state Exp;
branches;
next	1.193;
commitid	PvwwytDh7FK2NfvC;

1.193
date	2020.11.09.19.12.52;	author sjg;	state Exp;
branches;
next	1.192;
commitid	0xEdZ1j8o6oojfvC;

1.192
date	2020.11.08.23.54.28;	author rillig;	state Exp;
branches;
next	1.191;
commitid	cj1oiO72zdZGT8vC;

1.191
date	2020.11.08.16.44.47;	author rillig;	state Exp;
branches;
next	1.190;
commitid	ZAirZ17eXgKow6vC;

1.190
date	2020.11.07.23.25.06;	author rillig;	state Exp;
branches;
next	1.189;
commitid	PzFwzNLAzEaPL0vC;

1.189
date	2020.11.07.20.01.17;	author rillig;	state Exp;
branches;
next	1.188;
commitid	epmDBVFu2pBQDZuC;

1.188
date	2020.11.04.04.24.57;	author rillig;	state Exp;
branches;
next	1.187;
commitid	C9kDqf0x0OjSxwuC;

1.187
date	2020.11.03.17.17.31;	author rillig;	state Exp;
branches;
next	1.186;
commitid	x9asRQJBHhqCRsuC;

1.186
date	2020.11.02.21.53.28;	author rillig;	state Exp;
branches;
next	1.185;
commitid	ywKgCO0wpSTDpmuC;

1.185
date	2020.11.02.20.43.27;	author rillig;	state Exp;
branches;
next	1.184;
commitid	fVYQg3LIBSJa2muC;

1.184
date	2020.11.02.20.40.10;	author rillig;	state Exp;
branches;
next	1.183;
commitid	nYDb8OarKtId1muC;

1.183
date	2020.11.02.20.20.42;	author rillig;	state Exp;
branches;
next	1.182;
commitid	MNoXd5h1o3vwUluC;

1.182
date	2020.11.02.20.19.33;	author rillig;	state Exp;
branches;
next	1.181;
commitid	e0T9sJTXige2UluC;

1.181
date	2020.11.01.19.02.22;	author rillig;	state Exp;
branches;
next	1.180;
commitid	tncWAfBxbUODvduC;

1.180
date	2020.10.31.20.30.06;	author rillig;	state Exp;
branches;
next	1.179;
commitid	1AgLoLe2zyUI16uC;

1.179
date	2020.10.31.11.30.57;	author rillig;	state Exp;
branches;
next	1.178;
commitid	kmh81vim1jnH23uC;

1.178
date	2020.10.31.11.06.24;	author rillig;	state Exp;
branches;
next	1.177;
commitid	tV5jbn0i7qthU2uC;

1.177
date	2020.10.30.15.03.58;	author rillig;	state Exp;
branches;
next	1.176;
commitid	2e8Bu5sRX4zMfWtC;

1.176
date	2020.10.29.18.19.41;	author rillig;	state Exp;
branches;
next	1.175;
commitid	k58i08nG1GYQmPtC;

1.175
date	2020.10.24.02.25.02;	author rillig;	state Exp;
branches;
next	1.174;
commitid	LsI7pCrnbN00f6tC;

1.174
date	2020.10.23.19.54.35;	author rillig;	state Exp;
branches;
next	1.173;
commitid	FYauLXdAXbhu54tC;

1.173
date	2020.10.23.19.23.01;	author rillig;	state Exp;
branches;
next	1.172;
commitid	tkjICWXXmOM8U3tC;

1.172
date	2020.10.23.19.11.30;	author rillig;	state Exp;
branches;
next	1.171;
commitid	mYw8dUnfBYPvQ3tC;

1.171
date	2020.10.23.14.38.39;	author rillig;	state Exp;
branches;
next	1.170;
commitid	GYGOcfFzV4TUk2tC;

1.170
date	2020.10.23.06.18.23;	author rillig;	state Exp;
branches;
next	1.169;
commitid	mwHmzQnpHvVnzZsC;

1.169
date	2020.10.20.20.36.53;	author rillig;	state Exp;
branches;
next	1.168;
commitid	eVmkPw3rV3FSoGsC;

1.168
date	2020.10.18.22.55.52;	author sjg;	state Exp;
branches;
next	1.167;
commitid	idX8howzXuIJfrsC;

1.167
date	2020.10.18.16.33.18;	author rillig;	state Exp;
branches;
next	1.166;
commitid	8l0UJLbs4I7k8psC;

1.166
date	2020.10.17.16.53.26;	author rillig;	state Exp;
branches;
next	1.165;
commitid	2ZwRRCgydzGahhsC;

1.165
date	2020.10.10.19.25.19;	author sjg;	state Exp;
branches;
next	1.164;
commitid	fsA7pVmGps1slorC;

1.164
date	2020.10.08.19.11.35;	author rillig;	state Exp;
branches;
next	1.163;
commitid	p7b2hQX7GPiFk8rC;

1.163
date	2020.10.08.17.54.20;	author rillig;	state Exp;
branches;
next	1.162;
commitid	rXXTWEqC4SF8U7rC;

1.162
date	2020.10.05.19.27.48;	author rillig;	state Exp;
branches;
next	1.161;
commitid	9lHelH7u8FJYvKqC;

1.161
date	2020.10.05.19.24.29;	author rillig;	state Exp;
branches;
next	1.160;
commitid	M1zOj70zpBbWqKqC;

1.160
date	2020.10.04.06.53.15;	author rillig;	state Exp;
branches;
next	1.159;
commitid	ZZbVxlZJpDcImyqC;

1.159
date	2020.10.03.17.30.54;	author rillig;	state Exp;
branches;
next	1.158;
commitid	511VFlfoDxDDRtqC;

1.158
date	2020.10.03.14.39.36;	author rillig;	state Exp;
branches;
next	1.157;
commitid	J3sFw4YKlRjgZsqC;

1.157
date	2020.10.03.08.16.53;	author rillig;	state Exp;
branches;
next	1.156;
commitid	BeA0v9xcTPG0SqqC;

1.156
date	2020.10.02.20.34.59;	author rillig;	state Exp;
branches;
next	1.155;
commitid	T0bzSy3bGskOYmqC;

1.155
date	2020.09.29.18.16.24;	author rillig;	state Exp;
branches;
next	1.154;
commitid	an2keyktSr1tjYpC;

1.154
date	2020.09.27.20.11.34;	author rillig;	state Exp;
branches;
next	1.153;
commitid	xtrTT9lK6xfY0JpC;

1.153
date	2020.09.27.13.18.30;	author rillig;	state Exp;
branches;
next	1.152;
commitid	HZL8ctKVLKkEIGpC;

1.152
date	2020.09.25.23.24.49;	author rillig;	state Exp;
branches;
next	1.151;
commitid	xQXfZbVV9DdJ8upC;

1.151
date	2020.09.25.20.11.06;	author rillig;	state Exp;
branches;
next	1.150;
commitid	sDbcw46WzSRZ4tpC;

1.150
date	2020.09.25.18.18.25;	author rillig;	state Exp;
branches;
next	1.149;
commitid	9ubRdq8Q28q6sspC;

1.149
date	2020.09.25.05.56.59;	author rillig;	state Exp;
branches;
next	1.148;
commitid	PGLCvuaRIAX1kopC;

1.148
date	2020.09.23.07.54.08;	author rillig;	state Exp;
branches;
next	1.147;
commitid	qoVKN5sCDnyU39pC;

1.147
date	2020.09.23.03.33.55;	author rillig;	state Exp;
branches;
next	1.146;
commitid	Ztct8hUpRcRqC7pC;

1.146
date	2020.09.23.03.06.38;	author rillig;	state Exp;
branches;
next	1.145;
commitid	gvJG2AqePvYTr7pC;

1.145
date	2020.09.21.04.20.35;	author rillig;	state Exp;
branches;
next	1.144;
commitid	Qz7NVXaPu4WqWRoC;

1.144
date	2020.09.21.03.45.29;	author rillig;	state Exp;
branches;
next	1.143;
commitid	efJ0jJAWv2JfKRoC;

1.143
date	2020.09.15.16.22.04;	author rillig;	state Exp;
branches;
next	1.142;
commitid	sbPr6wvHONsj8aoC;

1.142
date	2020.09.14.06.44.50;	author rillig;	state Exp;
branches;
next	1.141;
commitid	F3H7r2Bkw9SbYYnC;

1.141
date	2020.09.14.06.22.59;	author rillig;	state Exp;
branches;
next	1.140;
commitid	qX9DDiiyfJmNQYnC;

1.140
date	2020.09.13.09.20.23;	author rillig;	state Exp;
branches;
next	1.139;
commitid	529xd5IHykbGRRnC;

1.139
date	2020.09.13.09.17.47;	author rillig;	state Exp;
branches;
next	1.138;
commitid	9TspeRFt2NcLQRnC;

1.138
date	2020.09.07.18.49.15;	author rillig;	state Exp;
branches;
next	1.137;
commitid	HJ0KYvCr00HMc9nC;

1.137
date	2020.09.07.18.43.59;	author rillig;	state Exp;
branches;
next	1.136;
commitid	9KCyKQPMyEZRa9nC;

1.136
date	2020.09.05.12.59.07;	author rillig;	state Exp;
branches;
next	1.135;
commitid	0foV6pxSh9nFjRmC;

1.135
date	2020.09.05.06.36.40;	author rillig;	state Exp;
branches;
next	1.134;
commitid	b4QH7qwyzIDodPmC;

1.134
date	2020.09.05.06.20.51;	author rillig;	state Exp;
branches;
next	1.133;
commitid	HozN7dA72dMV7PmC;

1.133
date	2020.09.04.19.03.38;	author rillig;	state Exp;
branches;
next	1.132;
commitid	cXHxSXApUAMenLmC;

1.132
date	2020.09.04.17.05.39;	author rillig;	state Exp;
branches;
next	1.131;
commitid	GEsuCN6dshgJIKmC;

1.131
date	2020.09.04.05.23.25;	author rillig;	state Exp;
branches;
next	1.130;
commitid	SIb5lYPfceHuMGmC;

1.130
date	2020.09.02.05.33.57;	author rillig;	state Exp;
branches;
next	1.129;
commitid	yGu52ihK8c8HPqmC;

1.129
date	2020.08.29.19.35.38;	author rillig;	state Exp;
branches;
next	1.128;
commitid	1ATv65zJrGKjKZlC;

1.128
date	2020.08.29.19.07.32;	author rillig;	state Exp;
branches;
next	1.127;
commitid	PWuyR02cgJsSAZlC;

1.127
date	2020.08.29.18.50.25;	author rillig;	state Exp;
branches;
next	1.126;
commitid	ih51T7oGUgP2vZlC;

1.126
date	2020.08.29.14.47.26;	author rillig;	state Exp;
branches;
next	1.125;
commitid	Z2CIf3JwjB1R8YlC;

1.125
date	2020.08.29.10.52.47;	author rillig;	state Exp;
branches;
next	1.124;
commitid	wyC6kkbt1ApaRWlC;

1.124
date	2020.08.28.15.40.53;	author rillig;	state Exp;
branches;
next	1.123;
commitid	lFH4HiKwNGY6uQlC;

1.123
date	2020.08.28.04.05.35;	author rillig;	state Exp;
branches;
next	1.122;
commitid	RGAIAVTfujaaDMlC;

1.122
date	2020.08.28.03.51.06;	author rillig;	state Exp;
branches;
next	1.121;
commitid	pleUj5ga7pgAyMlC;

1.121
date	2020.08.28.02.45.51;	author rillig;	state Exp;
branches;
next	1.120;
commitid	bp1JU15co7tccMlC;

1.120
date	2020.08.27.19.00.17;	author rillig;	state Exp;
branches;
next	1.119;
commitid	585YmewYgdxtCJlC;

1.119
date	2020.08.23.14.46.33;	author rillig;	state Exp;
branches;
next	1.118;
commitid	6xEdiePBWkyolclC;

1.118
date	2020.08.23.14.28.04;	author rillig;	state Exp;
branches;
next	1.117;
commitid	FN5Q4DEgEQE4fclC;

1.117
date	2020.08.23.13.50.17;	author rillig;	state Exp;
branches;
next	1.116;
commitid	nuVKx1km65122clC;

1.116
date	2020.08.23.09.28.52;	author rillig;	state Exp;
branches;
next	1.115;
commitid	hgYHQ1WsDpoiAalC;

1.115
date	2020.08.23.09.18.25;	author rillig;	state Exp;
branches;
next	1.114;
commitid	6omiCOc5OWKPwalC;

1.114
date	2020.08.22.21.55.54;	author rillig;	state Exp;
branches;
next	1.113;
commitid	dZjzsFhPQiPKK6lC;

1.113
date	2020.08.22.21.30.52;	author sjg;	state Exp;
branches;
next	1.112;
commitid	6atsXKEsf7FaC6lC;

1.112
date	2020.08.22.21.22.24;	author rillig;	state Exp;
branches;
next	1.111;
commitid	GGwNJD6zo8RKy6lC;

1.111
date	2020.08.22.20.50.43;	author sjg;	state Exp;
branches;
next	1.110;
commitid	2sG9gyrSZFYoo6lC;

1.110
date	2020.08.22.20.23.14;	author rillig;	state Exp;
branches;
next	1.109;
commitid	2HzW66sNsgaKe6lC;

1.109
date	2020.08.22.16.51.26;	author rillig;	state Exp;
branches;
next	1.108;
commitid	ZqAkNrDqNrg645lC;

1.108
date	2020.08.22.15.25.50;	author sjg;	state Exp;
branches;
next	1.107;
commitid	ZefF4Cx9lTCWA4lC;

1.107
date	2020.08.22.12.51.11;	author rillig;	state Exp;
branches;
next	1.106;
commitid	RmZGpcmxEMmNJ3lC;

1.106
date	2020.08.22.11.27.02;	author rillig;	state Exp;
branches;
next	1.105;
commitid	87iX9t6xIokVg3lC;

1.105
date	2020.08.22.08.29.13;	author rillig;	state Exp;
branches;
next	1.104;
commitid	S2nwsYnGXwGLh2lC;

1.104
date	2020.08.20.18.05.57;	author rillig;	state Exp;
branches;
next	1.103;
commitid	rGzVyn9yCWROxPkC;

1.103
date	2020.08.20.17.45.47;	author rillig;	state Exp;
branches;
next	1.102;
commitid	lI6ajHLKaFDRqPkC;

1.102
date	2020.08.19.05.25.26;	author rillig;	state Exp;
branches;
next	1.101;
commitid	xeElf05hoL0TmDkC;

1.101
date	2020.08.19.05.13.18;	author rillig;	state Exp;
branches;
next	1.100;
commitid	bWxNvMMEnXVIiDkC;

1.100
date	2020.08.16.20.43.01;	author rillig;	state Exp;
branches;
next	1.99;
commitid	3Dm6xh4uIH1cwkkC;

1.99
date	2020.08.16.20.03.53;	author rillig;	state Exp;
branches;
next	1.98;
commitid	GIdRpOKN6gOhkkkC;

1.98
date	2020.08.16.18.40.13;	author rillig;	state Exp;
branches;
next	1.97;
commitid	gq2MU6iOi3c1QjkC;

1.97
date	2020.08.16.18.17.17;	author rillig;	state Exp;
branches;
next	1.96;
commitid	SUBxt9hejwY7IjkC;

1.96
date	2020.08.16.18.04.33;	author rillig;	state Exp;
branches;
next	1.95;
commitid	anW2qREek6PFDjkC;

1.95
date	2020.08.16.17.58.48;	author rillig;	state Exp;
branches;
next	1.94;
commitid	6mVX67FcMhtTCjkC;

1.94
date	2020.08.16.12.30.45;	author rillig;	state Exp;
branches;
next	1.93;
commitid	UOehUssBtowJOhkC;

1.93
date	2020.08.16.12.07.51;	author rillig;	state Exp;
branches;
next	1.92;
commitid	coEgPk3hgfeYGhkC;

1.92
date	2020.08.15.01.49.07;	author rillig;	state Exp;
branches;
next	1.91;
commitid	NxG7HqEj1KD1i6kC;

1.91
date	2020.08.09.16.32.28;	author rillig;	state Exp;
branches;
next	1.90;
commitid	t513bPZJi1xfnpjC;

1.90
date	2020.08.09.12.59.16;	author rillig;	state Exp;
branches;
next	1.89;
commitid	RiEQNrWuApgrcojC;

1.89
date	2020.08.07.19.24.27;	author rillig;	state Exp;
branches;
next	1.88;
commitid	3rNv4o8OnDC8oajC;

1.88
date	2020.08.07.14.40.59;	author rillig;	state Exp;
branches;
next	1.87;
commitid	DhxJIjEr6aKiP8jC;

1.87
date	2020.08.07.14.26.18;	author rillig;	state Exp;
branches;
next	1.86;
commitid	9cv0P0jfkPbyI8jC;

1.86
date	2020.08.07.13.43.50;	author rillig;	state Exp;
branches;
next	1.85;
commitid	ESypUxmzpFkUs8jC;

1.85
date	2020.08.06.16.23.52;	author sjg;	state Exp;
branches;
next	1.84;
commitid	ntPtuxqD2h6Kq1jC;

1.84
date	2020.08.06.05.36.33;	author rillig;	state Exp;
branches;
next	1.83;
commitid	bMhHLl3TWLOrQXiC;

1.83
date	2020.08.03.15.43.32;	author rillig;	state Exp;
branches;
next	1.82;
commitid	L33hp9RShIngiDiC;

1.82
date	2020.08.02.22.43.14;	author rillig;	state Exp;
branches;
next	1.81;
commitid	911XLExREAJ4ExiC;

1.81
date	2020.08.02.14.53.02;	author rillig;	state Exp;
branches;
next	1.80;
commitid	UGCpRZxfmNYL2viC;

1.80
date	2020.08.01.18.14.08;	author rillig;	state Exp;
branches;
next	1.79;
commitid	M9rOwCDMJKr8coiC;

1.79
date	2020.08.01.15.28.28;	author rillig;	state Exp;
branches;
next	1.78;
commitid	MlULqSlpxDHphniC;

1.78
date	2020.07.31.22.07.28;	author rillig;	state Exp;
branches;
next	1.77;
commitid	tT1ybOKtiShtwhiC;

1.77
date	2020.07.31.16.42.51;	author rillig;	state Exp;
branches;
next	1.76;
commitid	xXpR64WSGbi8IfiC;

1.76
date	2020.07.29.19.48.33;	author rillig;	state Exp;
branches;
next	1.75;
commitid	QI6eapUzdlwoN0iC;

1.75
date	2020.07.28.22.44.44;	author rillig;	state Exp;
branches;
next	1.74;
commitid	uTEH76Z6nB2fPThC;

1.74
date	2020.07.28.18.39.56;	author sjg;	state Exp;
branches;
next	1.73;
commitid	Qc80ESMvHfv2tShC;

1.73
date	2020.07.28.16.26.37;	author sjg;	state Exp;
branches;
next	1.72;
commitid	oRMbcMHYuG9uJRhC;

1.72
date	2020.07.28.16.11.55;	author rillig;	state Exp;
branches;
next	1.71;
commitid	U3qwOTNt4Dw7CRhC;

1.71
date	2020.07.28.00.48.00;	author sjg;	state Exp;
branches;
next	1.70;
commitid	ZIOtyDFdSX5txMhC;

1.70
date	2020.07.27.20.46.17;	author rillig;	state Exp;
branches;
next	1.69;
commitid	HqfBFTZt8AyucLhC;

1.69
date	2020.07.27.19.45.56;	author rillig;	state Exp;
branches;
next	1.68;
commitid	df6aeJlB2ELxRKhC;

1.68
date	2020.07.27.19.23.12;	author rillig;	state Exp;
branches;
next	1.67;
commitid	7A2ehs5mvAN6KKhC;

1.67
date	2020.07.27.18.51.56;	author rillig;	state Exp;
branches;
next	1.66;
commitid	uF4zzcePAxgrzKhC;

1.66
date	2020.07.26.22.15.36;	author rillig;	state Exp;
branches;
next	1.65;
commitid	cw5sBXu01VYjJDhC;

1.65
date	2020.07.26.11.10.29;	author rillig;	state Exp;
branches;
next	1.64;
commitid	gxhaiMHZ1p453AhC;

1.64
date	2020.07.25.21.19.29;	author rillig;	state Exp;
branches;
next	1.63;
commitid	Bpmu2b8zNRHVrvhC;

1.63
date	2020.07.09.22.40.14;	author sjg;	state Exp;
branches;
next	1.62;
commitid	WzIQtNsfQ0PEpsfC;

1.62
date	2020.07.04.22.17.09;	author rillig;	state Exp;
branches;
next	1.61;
commitid	JIonR0SpSRc2rOeC;

1.61
date	2020.07.04.22.01.10;	author rillig;	state Exp;
branches;
next	1.60;
commitid	LPK1EeSjgMjRiOeC;

1.60
date	2020.07.04.21.04.25;	author rillig;	state Exp;
branches;
next	1.59;
commitid	KkpGttfNBQRC2OeC;

1.59
date	2020.06.28.09.42.40;	author rillig;	state Exp;
branches;
next	1.58;
commitid	bTB9HK6OvsWhsYdC;

1.58
date	2020.05.17.12.36.26;	author rillig;	state Exp;
branches;
next	1.57;
commitid	0mIQXGU0bMcZLA8C;

1.57
date	2020.05.10.12.42.11;	author rillig;	state Exp;
branches;
next	1.56;
commitid	tKlfJvwkXho12H7C;

1.56
date	2020.05.10.12.34.01;	author rillig;	state Exp;
branches;
next	1.55;
commitid	tYjBcFDiGRlTYG7C;

1.55
date	2020.04.29.23.15.21;	author rillig;	state Exp;
branches;
next	1.54;
commitid	9sg20YF6Yi7cTk6C;

1.54
date	2019.11.30.00.38.51;	author rillig;	state Exp;
branches;
next	1.53;
commitid	igCqQPLhlEeqeOMB;

1.53
date	2018.05.24.00.25.44;	author christos;	state Exp;
branches
	1.53.2.1;
next	1.52;
commitid	Ki20sfyk8Mef0uDA;

1.52
date	2015.05.05.21.51.09;	author sjg;	state Exp;
branches
	1.52.8.1
	1.52.14.1;
next	1.51;
commitid	JzfAISODrB3oXiky;

1.51
date	2014.10.20.23.21.11;	author sjg;	state Exp;
branches;
next	1.50;
commitid	i2Rs6w2GWupSMZUx;

1.50
date	2014.08.29.20.03.27;	author sjg;	state Exp;
branches;
next	1.49;
commitid	BSu5AAo6D5iwmiOx;

1.49
date	2014.08.29.15.55.44;	author sjg;	state Exp;
branches;
next	1.48;
commitid	wEq94rqivVM9ZgOx;

1.48
date	2014.08.24.17.17.24;	author apb;	state Exp;
branches;
next	1.47;
commitid	wrTkEfrtLU6sBDNx;

1.47
date	2014.08.24.11.52.45;	author apb;	state Exp;
branches;
next	1.46;
commitid	cH0fvMhfwe8FNBNx;

1.46
date	2014.08.23.15.21.35;	author christos;	state Exp;
branches;
next	1.45;
commitid	KMTzl9YU9eFSZuNx;

1.45
date	2014.08.23.15.02.04;	author christos;	state Exp;
branches;
next	1.44;
commitid	h71emzEJwNV8TuNx;

1.44
date	2014.08.21.22.00.30;	author apb;	state Exp;
branches;
next	1.43;
commitid	NES3AHFu8ZXdghNx;

1.43
date	2014.08.21.15.37.13;	author apb;	state Exp;
branches;
next	1.42;
commitid	nMkA64hnT6eP7fNx;

1.42
date	2014.08.21.13.44.51;	author apb;	state Exp;
branches;
next	1.41;
commitid	PNRbDMs9XSDHweNx;

1.41
date	2014.08.21.13.31.52;	author apb;	state Exp;
branches;
next	1.40;
commitid	yOxUXdJ0RZ2TreNx;

1.40
date	2014.08.21.12.42.03;	author apb;	state Exp;
branches;
next	1.39;
commitid	sCvOsKCxPHmFaeNx;

1.39
date	2014.08.20.08.39.14;	author apb;	state Exp;
branches;
next	1.38;
commitid	hYBRLBRPeheHR4Nx;

1.38
date	2013.08.28.21.56.50;	author sjg;	state Exp;
branches;
next	1.37;
commitid	pFnqpToCG7HXKg3x;

1.37
date	2013.07.16.19.59.28;	author sjg;	state Exp;
branches;
next	1.36;
commitid	iBOPnVrrVuKouJXw;

1.36
date	2013.03.22.16.36.46;	author sjg;	state Exp;
branches;
next	1.35;

1.35
date	2012.11.09.19.08.28;	author sjg;	state Exp;
branches;
next	1.34;

1.34
date	2012.06.19.23.25.53;	author sjg;	state Exp;
branches
	1.34.2.1;
next	1.33;

1.33
date	2011.09.29.23.38.04;	author sjg;	state Exp;
branches
	1.33.2.1;
next	1.32;

1.32
date	2011.04.07.01.40.02;	author joerg;	state Exp;
branches;
next	1.31;

1.31
date	2011.03.06.00.02.14;	author sjg;	state Exp;
branches;
next	1.30;

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

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

1.28
date	2010.04.22.21.41.11;	author sjg;	state Exp;
branches;
next	1.27;

1.27
date	2010.04.22.19.15.24;	author sjg;	state Exp;
branches;
next	1.26;

1.26
date	2010.04.08.17.41.29;	author sjg;	state Exp;
branches;
next	1.25;

1.25
date	2009.11.19.00.30.25;	author sjg;	state Exp;
branches;
next	1.24;

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

1.23
date	2008.10.25.22.27.39;	author apb;	state Exp;
branches;
next	1.22;

1.22
date	2008.03.31.00.12.21;	author sjg;	state Exp;
branches;
next	1.21;

1.21
date	2007.10.05.15.27.46;	author sjg;	state Exp;
branches;
next	1.20;

1.20
date	2006.05.11.15.37.07;	author sjg;	state Exp;
branches
	1.20.12.1;
next	1.19;

1.19
date	2006.02.26.22.45.46;	author apb;	state Exp;
branches;
next	1.18;

1.18
date	2006.02.26.21.43.01;	author sjg;	state Exp;
branches;
next	1.17;

1.17
date	2006.02.13.18.17.36;	author apb;	state Exp;
branches;
next	1.16;

1.16
date	2005.06.15.22.32.22;	author rpaulo;	state Exp;
branches;
next	1.15;

1.15
date	2005.06.01.17.17.34;	author sjg;	state Exp;
branches;
next	1.14;

1.14
date	2004.06.30.03.26.26;	author jmc;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2004.05.07.08.12.16;	author sjg;	state Exp;
branches;
next	1.12;

1.12
date	2004.04.08.00.59.01;	author sjg;	state Exp;
branches;
next	1.11;

1.11
date	2004.02.20.09.03.26;	author sjg;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2004.01.19.00.32.26;	author sjg;	state Exp;
branches;
next	1.9;

1.9
date	2004.01.09.00.56.44;	author sjg;	state Exp;
branches;
next	1.8;

1.8
date	2003.09.27.21.29.37;	author sjg;	state Exp;
branches;
next	1.7;

1.7
date	2003.08.08.06.42.38;	author sjg;	state Exp;
branches;
next	1.6;

1.6
date	2003.08.01.04.57.20;	author sjg;	state Exp;
branches;
next	1.5;

1.5
date	2003.07.31.00.46.15;	author sjg;	state Exp;
branches;
next	1.4;

1.4
date	2003.07.29.08.44.42;	author sjg;	state Exp;
branches;
next	1.3;

1.3
date	2003.07.29.08.16.01;	author sjg;	state Exp;
branches;
next	1.2;

1.2
date	2003.07.29.06.35.09;	author sjg;	state Exp;
branches;
next	1.1;

1.1
date	2003.07.28.22.52.12;	author sjg;	state Exp;
branches;
next	;

1.347.2.1
date	2025.08.02.05.58.30;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

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

1.53.2.1
date	2020.04.08.14.09.17;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.52.8.1
date	2018.06.09.15.35.38;	author martin;	state Exp;
branches;
next	;
commitid	LCIzeghK1s7AwCFA;

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

1.34.2.1
date	2012.11.20.03.02.58;	author tls;	state Exp;
branches;
next	1.34.2.2;

1.34.2.2
date	2013.06.23.06.29.01;	author tls;	state Exp;
branches;
next	1.34.2.3;
commitid	OnlO1cBgtQRcIHUw;

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

1.33.2.1
date	2012.10.30.19.00.23;	author yamt;	state Exp;
branches;
next	1.33.2.2;

1.33.2.2
date	2013.01.16.05.34.06;	author yamt;	state Exp;
branches;
next	1.33.2.3;

1.33.2.3
date	2014.05.22.11.42.46;	author yamt;	state Exp;
branches;
next	;
commitid	cG7DCbrDdiE9MwBx;

1.20.12.1
date	2007.11.06.23.36.04;	author matt;	state Exp;
branches;
next	;

1.14.2.1
date	2005.06.16.09.33.49;	author tron;	state Exp;
branches;
next	1.14.2.2;

1.14.2.2
date	2005.06.16.09.53.24;	author tron;	state Exp;
branches;
next	1.14.2.3;

1.14.2.3
date	2005.07.02.16.22.22;	author tron;	state Exp;
branches;
next	;

1.11.2.1
date	2004.05.10.15.23.47;	author tron;	state Exp;
branches;
next	1.11.2.2;

1.11.2.2
date	2004.05.10.15.53.00;	author tron;	state Exp;
branches;
next	;


desc
@@


1.383
log
@Simplify the method of ensuring TEST_MAKE is absolute path

PR: 60016
@
text
@# $NetBSD: Makefile,v 1.382 2026/03/10 05:02:00 sjg Exp $
#
# Unit tests for make(1)
#
# The main targets are:
#
# all:
#	run all the tests
# test:
#	run 'all', and compare to expected results
# accept:
#	move generated output to expected results
#
# Settable variables
#
# TEST_MAKE
#	The make program to be tested.
#
#
# Adding a test case
#
# Each feature should get its own set of tests in its own suitably
# named makefile (*.mk), with its own set of expected results (*.exp),
# and it should be added to the TESTS list.
#
# Any added files must also be added to src/distrib/sets/lists/tests/mi.
# To do that, run "make sync-mi" in this directory.
#

.MAIN: all

# we use these below but we might be an older make
.MAKE.OS?= ${uname -s:L:sh}
.MAKE.UID?= ${id -u:L:sh}

# for many tests we need a TMPDIR that will not collide
# with other users.
.if ${.OBJDIR} != ${.CURDIR}
# easy
TMPDIR:=	${.OBJDIR}/tmp
.elif defined(TMPDIR)
TMPDIR:=	${TMPDIR}/uid${.MAKE.UID}
.else
TMPDIR:=	/tmp/uid${.MAKE.UID}
.endif
# make sure it exists
.if !exist(${TMPDIR})
_!= mkdir -p ${TMPDIR}
.endif
# and clean it up - outside the context of
# any target that might be using it.
.END: rm-tmpdir
rm-tmpdir:	.NOMETA
	@@rm -rf ${TMPDIR}

# Each test is in a sub-makefile.
# Keep the list sorted.
# Any test that is commented out must be ignored in
# src/tests/usr.bin/make/t_make.sh as well.
TESTS+=		archive
TESTS+=		archive-suffix
TESTS+=		char-005c-reverse-solidus
TESTS+=		cmd-errors
TESTS+=		cmd-errors-jobs
TESTS+=		cmd-errors-lint
TESTS+=		cmd-interrupt
TESTS+=		cmdline
TESTS+=		cmdline-redirect-stdin
TESTS+=		cmdline-undefined
TESTS+=		comment
TESTS+=		compat-error
TESTS+=		cond-cmp-numeric
TESTS+=		cond-cmp-numeric-eq
TESTS+=		cond-cmp-numeric-ge
TESTS+=		cond-cmp-numeric-gt
TESTS+=		cond-cmp-numeric-le
TESTS+=		cond-cmp-numeric-lt
TESTS+=		cond-cmp-numeric-ne
TESTS+=		cond-cmp-string
TESTS+=		cond-cmp-unary
TESTS+=		cond-eof
TESTS+=		cond-func
TESTS+=		cond-func-commands
TESTS+=		cond-func-defined
TESTS+=		cond-func-empty
TESTS+=		cond-func-exists
TESTS+=		cond-func-make
TESTS+=		cond-func-make-main
TESTS+=		cond-func-target
TESTS+=		cond-late
TESTS+=		cond-op
TESTS+=		cond-op-and
TESTS+=		cond-op-and-lint
TESTS+=		cond-op-not
TESTS+=		cond-op-or
TESTS+=		cond-op-or-lint
TESTS+=		cond-op-parentheses
TESTS+=		cond-short
TESTS+=		cond-token-number
TESTS+=		cond-token-plain
TESTS+=		cond-token-string
TESTS+=		cond-token-var
TESTS+=		cond-undef-lint
TESTS+=		counter
TESTS+=		counter-append
TESTS+=		dep
TESTS+=		dep-colon
TESTS+=		dep-colon-bug-cross-file
TESTS+=		dep-double-colon
TESTS+=		dep-double-colon-indep
TESTS+=		dep-duplicate
TESTS+=		dep-exclam
TESTS+=		dep-none
TESTS+=		dep-op-missing
TESTS+=		dep-percent
TESTS+=		dep-var
TESTS+=		dep-wildcards
TESTS+=		depsrc
TESTS+=		depsrc-end
TESTS+=		depsrc-exec
TESTS+=		depsrc-ignore
TESTS+=		depsrc-made
TESTS+=		depsrc-make
TESTS+=		depsrc-meta
TESTS+=		depsrc-nometa
TESTS+=		depsrc-nometa_cmp
TESTS+=		depsrc-nopath
TESTS+=		depsrc-notmain
TESTS+=		depsrc-optional
TESTS+=		depsrc-phony
TESTS+=		depsrc-precious
TESTS+=		depsrc-recursive
TESTS+=		depsrc-silent
TESTS+=		depsrc-use
TESTS+=		depsrc-usebefore
TESTS+=		depsrc-usebefore-double-colon
TESTS+=		depsrc-wait
TESTS+=		deptgt
TESTS+=		deptgt-begin
TESTS+=		deptgt-begin-fail
TESTS+=		deptgt-begin-fail-indirect
TESTS+=		deptgt-default
TESTS+=		deptgt-delete_on_error
TESTS+=		deptgt-end
TESTS+=		deptgt-end-fail
TESTS+=		deptgt-end-fail-all
TESTS+=		deptgt-end-fail-indirect
TESTS+=		deptgt-end-jobs
TESTS+=		deptgt-error
TESTS+=		deptgt-ignore
TESTS+=		deptgt-interrupt
TESTS+=		deptgt-main
TESTS+=		deptgt-makeflags
TESTS+=		deptgt-no_parallel
TESTS+=		deptgt-nopath
TESTS+=		deptgt-notparallel
TESTS+=		deptgt-objdir
TESTS+=		deptgt-order
TESTS+=		deptgt-path
TESTS+=		deptgt-path-suffix
TESTS+=		deptgt-phony
TESTS+=		deptgt-posix
TESTS+=		deptgt-precious
TESTS+=		deptgt-shell
TESTS+=		deptgt-silent
TESTS+=		deptgt-silent-jobs
TESTS+=		deptgt-stale
TESTS+=		deptgt-suffixes
TESTS+=		dir
TESTS+=		dir-expand-path
TESTS+=		directive
TESTS+=		directive-dinclude
TESTS+=		directive-elif
TESTS+=		directive-elifdef
TESTS+=		directive-elifmake
TESTS+=		directive-elifndef
TESTS+=		directive-elifnmake
TESTS+=		directive-else
TESTS+=		directive-endfor
TESTS+=		directive-endif
TESTS+=		directive-error
TESTS+=		directive-export
TESTS+=		directive-export-env
TESTS+=		directive-export-impl
TESTS+=		directive-export-gmake
TESTS+=		directive-export-literal
TESTS+=		directive-for
TESTS+=		directive-for-break
TESTS+=		directive-for-empty
TESTS+=		directive-for-errors
TESTS+=		directive-for-escape
TESTS+=		directive-for-generating-endif
TESTS+=		directive-for-if
TESTS+=		directive-for-lines
TESTS+=		directive-for-null
TESTS+=		directive-hyphen-include
TESTS+=		directive-if
TESTS+=		directive-if-nested
TESTS+=		directive-ifdef
TESTS+=		directive-ifmake
TESTS+=		directive-ifndef
TESTS+=		directive-ifnmake
TESTS+=		directive-include
TESTS+=		directive-include-fatal
TESTS+=		directive-include-guard
TESTS+=		directive-info
TESTS+=		directive-misspellings
TESTS+=		directive-sinclude
TESTS+=		directive-undef
TESTS+=		directive-unexport
TESTS+=		directive-unexport-env
TESTS+=		directive-warning
TESTS+=		dollar
TESTS+=		doterror
TESTS+=		dotwait
TESTS+=		error
TESTS+=		# escape	# broken by reverting POSIX changes
TESTS+=		export
TESTS+=		export-all
TESTS+=		export-env
TESTS+=		export-variants
TESTS+=		gnode-submake
TESTS+=		hanoi-include
TESTS+=		impsrc
TESTS+=		include-main
TESTS+=		job-flags
TESTS+=		job-output
TESTS+=		job-output-long-lines
TESTS+=		job-output-null
TESTS+=		jobs-empty-commands
TESTS+=		jobs-empty-commands-error
TESTS+=		jobs-error-indirect
TESTS+=		jobs-error-nested
TESTS+=		jobs-error-nested-make
TESTS+=		lint
TESTS+=		make-exported
TESTS+=		meta-cmd-cmp
TESTS+=		meta-output
TESTS+=		moderrs
TESTS+=		modmisc
.if ${.MAKE.UID} > 0
TESTS+=		objdir-writable
.endif
TESTS+=		opt
TESTS+=		opt-backwards
TESTS+=		opt-chdir
TESTS+=		opt-debug
TESTS+=		opt-debug-all
TESTS+=		opt-debug-archive
TESTS+=		opt-debug-curdir
TESTS+=		opt-debug-cond
TESTS+=		opt-debug-dir
TESTS+=		opt-debug-errors
TESTS+=		opt-debug-errors-jobs
TESTS+=		opt-debug-file
TESTS+=		opt-debug-for
TESTS+=		opt-debug-graph1
TESTS+=		opt-debug-graph2
TESTS+=		opt-debug-graph3
TESTS+=		opt-debug-hash
TESTS+=		opt-debug-jobs
TESTS+=		opt-debug-lint
TESTS+=		opt-debug-loud
TESTS+=		opt-debug-meta
TESTS+=		opt-debug-making
TESTS+=		opt-debug-no-rm
TESTS+=		opt-debug-parse
TESTS+=		opt-debug-suff
TESTS+=		opt-debug-targets
TESTS+=		opt-debug-varraw
TESTS+=		opt-debug-var
TESTS+=		opt-debug-x-trace
TESTS+=		opt-define
TESTS+=		opt-env
TESTS+=		opt-file
TESTS+=		opt-ignore
TESTS+=		opt-include-dir
TESTS+=		opt-jobs
TESTS+=		opt-jobs-internal
TESTS+=		opt-jobs-no-action
TESTS+=		opt-keep-going
TESTS+=		opt-keep-going-indirect
TESTS+=		opt-keep-going-multiple
TESTS+=		opt-m-include-dir
TESTS+=		opt-no-action
TESTS+=		opt-no-action-at-all
TESTS+=		opt-no-action-runflags
TESTS+=		opt-no-action-touch
TESTS+=		opt-query
TESTS+=		opt-raw
TESTS+=		opt-silent
TESTS+=		opt-touch
TESTS+=		opt-touch-jobs
TESTS+=		opt-tracefile
TESTS+=		opt-var-expanded
TESTS+=		opt-var-literal
TESTS+=		opt-version
TESTS+=		opt-warnings-as-errors
TESTS+=		opt-where-am-i
TESTS+=		opt-x-reduce-exported
TESTS+=		order
TESTS+=		parse
TESTS+=		parse-var
TESTS+=		phony-end
TESTS+=		posix
TESTS+=		posix-execution
TESTS+=		posix-expansion
TESTS+=		posix-varassign
TESTS+=		# posix1	# broken by reverting POSIX changes
TESTS+=		recursive
TESTS+=		sh
TESTS+=		sh-dots
TESTS+=		sh-errctl
TESTS+=		sh-flags
TESTS+=		sh-jobs
TESTS+=		sh-jobs-error
TESTS+=		sh-leading-at
TESTS+=		sh-leading-hyphen
TESTS+=		sh-leading-plus
TESTS+=		sh-meta-chars
TESTS+=		sh-multi-line
TESTS+=		sh-single-line
TESTS+=		shell-csh
TESTS+=		shell-custom
TESTS+=		shell-ksh
TESTS+=		shell-sh
TESTS+=		suff
TESTS+=		suff-add-later
TESTS+=		suff-clear-regular
TESTS+=		suff-clear-single
TESTS+=		suff-incomplete
TESTS+=		suff-lookup
TESTS+=		suff-main
TESTS+=		suff-main-several
TESTS+=		suff-phony
TESTS+=		suff-rebuild
TESTS+=		suff-self
TESTS+=		suff-transform-debug
TESTS+=		suff-transform-endless
TESTS+=		suff-transform-expand
TESTS+=		suff-transform-select
TESTS+=		suff-use
TESTS+=		sunshcmd
TESTS+=		ternary
TESTS+=		unexport
TESTS+=		unexport-env
TESTS+=		use-inference
TESTS+=		var-readonly
TESTS+=		var-scope
TESTS+=		var-scope-cmdline
TESTS+=		var-scope-env
TESTS+=		var-scope-global
TESTS+=		var-scope-local
TESTS+=		var-scope-local-legacy
TESTS+=		var-eval-short
TESTS+=		var-op
TESTS+=		var-op-append
TESTS+=		var-op-assign
TESTS+=		var-op-default
TESTS+=		var-op-expand
TESTS+=		var-op-shell
TESTS+=		var-op-sunsh
TESTS+=		var-recursive
TESTS+=		varcmd
TESTS+=		vardebug
TESTS+=		varfind
TESTS+=		varmisc
TESTS+=		varmod
TESTS+=		varmod-assign
TESTS+=		varmod-assign-shell
TESTS+=		varmod-defined
TESTS+=		varmod-edge
TESTS+=		varmod-exclam-shell
TESTS+=		varmod-extension
TESTS+=		varmod-gmtime
TESTS+=		varmod-hash
TESTS+=		varmod-head
TESTS+=		varmod-ifelse
TESTS+=		varmod-indirect
TESTS+=		varmod-l-name-to-value
TESTS+=		varmod-localtime
TESTS+=		varmod-loop
TESTS+=		varmod-loop-delete
TESTS+=		varmod-loop-varname
TESTS+=		varmod-match
TESTS+=		varmod-match-escape
TESTS+=		varmod-mtime
TESTS+=		varmod-no-match
TESTS+=		varmod-order
TESTS+=		varmod-order-numeric
TESTS+=		varmod-order-reverse
TESTS+=		varmod-order-shuffle
TESTS+=		varmod-order-string
TESTS+=		varmod-path
TESTS+=		varmod-quote
TESTS+=		varmod-quote-dollar
TESTS+=		varmod-range
TESTS+=		varmod-remember
TESTS+=		varmod-root
TESTS+=		varmod-select-words
TESTS+=		varmod-shell
TESTS+=		varmod-subst
TESTS+=		varmod-subst-regex
TESTS+=		varmod-sun-shell
TESTS+=		varmod-sun-shell1
TESTS+=		varmod-sysv
TESTS+=		varmod-tail
TESTS+=		varmod-to-abs
TESTS+=		varmod-to-lower
TESTS+=		varmod-to-many-words
TESTS+=		varmod-to-one-word
TESTS+=		varmod-to-separator
TESTS+=		varmod-to-title
TESTS+=		varmod-to-upper
TESTS+=		varmod-undefined
TESTS+=		varmod-unique
TESTS+=		varname
TESTS+=		varname-circumflex
TESTS+=		varname-dollar
TESTS+=		varname-dot-alltargets
TESTS+=		varname-dot-curdir
TESTS+=		varname-dot-includes
TESTS+=		varname-dot-includedfromdir
TESTS+=		varname-dot-includedfromfile
TESTS+=		varname-dot-libs
TESTS+=		varname-dot-make-dependfile
TESTS+=		varname-dot-make-expand_variables
TESTS+=		varname-dot-make-exported
TESTS+=		varname-dot-make-jobs
TESTS+=		varname-dot-make-jobs-prefix
TESTS+=		varname-dot-make-level
TESTS+=		varname-dot-make-makefile_preference
TESTS+=		varname-dot-make-makefiles
TESTS+=		varname-dot-make-meta-bailiwick
TESTS+=		varname-dot-make-meta-created
TESTS+=		varname-dot-make-meta-files
.if ${.MAKE.PATH_FILEMON:Uno:Nktrace:N/dev*} == "" && ${TMPDIR:N/tmp*:N/var/tmp*} != ""
# these tests will not work if TMPDIR is or is a subdir of
# /tmp or /var/tmp
TESTS+=		varname-dot-make-meta-ignore_filter
TESTS+=		varname-dot-make-meta-ignore_paths
TESTS+=		varname-dot-make-meta-ignore_patterns
TESTS+=		varname-dot-make-path_filemon
.endif
TESTS+=		varname-dot-make-meta-prefix
TESTS+=		varname-dot-make-mode
TESTS+=		varname-dot-make-pid
TESTS+=		varname-dot-make-ppid
TESTS+=		varname-dot-make-save_dollars
TESTS+=		varname-dot-makeflags
TESTS+=		varname-dot-makeoverrides
TESTS+=		varname-dot-newline
TESTS+=		varname-dot-objdir
TESTS+=		varname-dot-parsedir
TESTS+=		varname-dot-parsefile
TESTS+=		varname-dot-path
TESTS+=		varname-dot-shell
TESTS+=		varname-dot-suffixes
TESTS+=		varname-dot-targets
TESTS+=		varname-empty
TESTS+=		varname-make
TESTS+=		varname-make_stack_trace
TESTS+=		varname-make_print_var_on_error
TESTS+=		varname-make_print_var_on_error-jobs
TESTS+=		varname-makefile
TESTS+=		varname-makeflags
TESTS+=		varname-pwd
TESTS+=		varname-vpath
TESTS+=		varparse-dynamic
TESTS+=		varparse-errors
TESTS+=		varparse-mod
TESTS+=		varparse-undef-partial

# Some tests just do not work on some platforms or environments
# so allow for some filtering.
.if !empty(BROKEN_TESTS)
TESTS:= ${TESTS:${BROKEN_TESTS:S,^,N,:ts:}}
.endif

# Ideas for more tests:
#	char-0020-space.mk
#	escape-cond-str.mk
#	escape-cond-func-arg.mk
#	escape-varmod.mk
#	escape-varmod-define.mk
#	escape-varmod-match.mk
#	escape-varname.mk
#	escape-varassign-varname.mk
#	escape-varassign-varname-cmdline.mk
#	escape-varassign-value.mk
#	escape-varassign-value-cmdline.mk
#	escape-dependency-source.mk
#	escape-dependency-target.mk
#	escape-for-varname.mk
#	escape-for-item.mk
#	posix-*.mk (see posix.mk and posix1.mk)

# Additional environment variables for some of the tests.
# The base environment is -i PATH="$PATH".
ENV.depsrc-optional+=   TZ=UTC
ENV.directive-undef=	ENV_VAR=env-value
ENV.opt-env=		FROM_ENV=value-from-env
ENV.opt-m-include-dir=	${MAKEOBJDIR:DMAKEOBJDIR=${MAKEOBJDIR}}
ENV.varmisc=		FROM_ENV=env
ENV.varmisc+=		FROM_ENV_BEFORE=env
ENV.varmisc+=		FROM_ENV_AFTER=env
ENV.varmod-localtime+=	TZ=Europe/Berlin
ENV.varname-vpath+=	VPATH=varname-vpath.dir:varname-vpath.dir2

# Override make flags for some of the tests; default is -k.
# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of
# settings FLAGS.test=-dv here, since that is closer to the test code.
FLAGS.cond-func-make=		via-cmdline
FLAGS.doterror=			# none, especially not -k
FLAGS.jobs-error-indirect=	# none, especially not -k
FLAGS.jobs-error-nested=	# none, especially not -k
FLAGS.jobs-error-nested-make=	# none, especially not -k
FLAGS.varname-empty=		-dv '$${:U}=cmdline-u' '=cmdline-plain'

# Some tests need extra postprocessing.
SED_CMDS.deptgt-phony=	${STD_SED_CMDS.dd}
SED_CMDS.dir=		${STD_SED_CMDS.dd}
SED_CMDS.directive-include-guard= \
	-e '/\.MAKEFLAGS/d' \
	-e '/^Parsing .*:[1-9][0-9]*:/d' \
	-e '/^SetFilenameVars:/d' \
	-e '/^ParseDependency/d' \
	-e '/^ParseEOF:/d'
SED_CMDS.export=	-e '/^[^=_A-Za-z0-9]*=/d'
SED_CMDS.export-all=	${SED_CMDS.export}
SED_CMDS.export-env=	${SED_CMDS.export}
SED_CMDS.job-output-long-lines= \
	${:D Job separators on their own line are ok. } \
	-e '/^--- job-[ab] ---$$/d' \
	${:D Plain output lines are ok as well. } \
	${:D They may come in multiples of 1024 or as 10000. } \
	-e '/^aa*$$/d' \
	-e '/^bb*$$/d' \
	${:D The following lines should rather not occur since the job } \
	${:D marker should always be at the beginning of the line. } \
	-e '/^aa*--- job-b ---$$/d' \
	-e '/^bb*--- job-a ---$$/d'

SED_CMDS.gnode-submake=		${STD_SED_CMDS.dj}
SED_CMDS.gnode-submake=		${STD_SED_CMDS.dg2}

# meta line numbers can vary based on filemon implementation
SED_CMDS.meta-ignore= -e 's,\(\.meta:\)[1-9][0-9]*:,\1<line>:,'

SED_CMDS.opt-chdir=		-e 's,\(nonexistent\).[1-9][0-9]*,\1,'
SED_CMDS.opt-debug-graph1=	${STD_SED_CMDS.dg1}
SED_CMDS.opt-debug-graph2=	${STD_SED_CMDS.dg2}
SED_CMDS.opt-debug-graph3=	${STD_SED_CMDS.dg3}
SED_CMDS.opt-debug-hash=	-e 's,\(entries\)=[1-9][0-9],\1=<entries>,'
SED_CMDS.opt-debug-jobs=	${STD_SED_CMDS.dj}
SED_CMDS.opt-debug-lint+=	${STD_SED_CMDS.regex}
SED_CMDS.opt-jobs-no-action=	${STD_SED_CMDS.hide-from-output}
SED_CMDS.opt-no-action-runflags= ${STD_SED_CMDS.hide-from-output}
SED_CMDS.opt-where-am-i=	-e '/usr.obj/d'
SED_CMDS.opt-where-am-i+=	-e '/\/\//d'
# For Compat_RunCommand, useShell == false.
SED_CMDS.sh-dots=		-e 's,^.*\.\.\.:.*,<not found: ...>,'
# For Compat_RunCommand, useShell == true.
SED_CMDS.sh-dots+=		-e 's,^make: exec(\(.*\)): .*$$,<not found: \1>,'
SED_CMDS.sh-dots+=		-e 's,^\(\*\*\* Error code \)[1-9][0-9]*,\1<nonzero>,'
# Race condition between the child's stdout and make's status.
SED_CMDS.sh-errctl=		${STD_SED_CMDS.dj}
SED_CMDS.sh-errctl+=		-e '/^Process with pid/d'
SED_CMDS.sh-errctl+=		-e '/^JobFinish:/d'
SED_CMDS.sh-flags=		${STD_SED_CMDS.hide-from-output}
SED_CMDS.sh-leading-hyphen=	${STD_SED_CMDS.shell}
SED_CMDS.suff-main+=		${STD_SED_CMDS.dg1}
SED_CMDS.suff-main-several+=	${STD_SED_CMDS.dg1}
SED_CMDS.suff-transform-debug+=	${STD_SED_CMDS.dg1}
SED_CMDS.var-op-shell+=		${STD_SED_CMDS.shell}
SED_CMDS.var-op-shell+=		-e '/command/s,No such.*,not found,'
SED_CMDS.vardebug+=		-e 's,${.SHELL},</path/to/shell>,'
SED_CMDS.varmod-mtime+=		-e "s,\(mtime for .*\): .*,\1: <ENOENT>,"
SED_CMDS.varmod-subst+=		${STD_SED_CMDS.regex}
SED_CMDS.varmod-subst-regex+=	${STD_SED_CMDS.regex}
SED_CMDS.varparse-errors+=	${STD_SED_CMDS.timestamp}
SED_CMDS.varname-dot-make-meta-ignore_filter+= ${SED_CMDS.meta-ignore}
SED_CMDS.varname-dot-make-meta-ignore_paths+= ${SED_CMDS.meta-ignore}
SED_CMDS.varname-dot-make-meta-ignore_patterns+= ${SED_CMDS.meta-ignore}
SED_CMDS.varname-dot-parsedir=	-e '/in some cases/ s,^make: [^:]*:,make: <normalized>:,'
SED_CMDS.varname-dot-parsefile=	-e '/in some cases/ s,^make: [^:]*:,make: <normalized>:,'
SED_CMDS.varname-dot-shell=	-e 's, = /[^ ]*, = (details omitted),g'
SED_CMDS.varname-dot-shell+=	-e 's,"/[^" ]*","(details omitted)",g'
SED_CMDS.varname-dot-shell+=	-e 's,\[/[^] ]*\],[(details omitted)],g'
SED_CMDS.varname-empty=		${.OBJDIR .PARSEDIR .PATH .SHELL .SYSPATH:L:@@v@@-e '/\\$v/d'@@}

# Some tests need an additional round of postprocessing.
POSTPROC.depsrc-wait=		sed -e '/^---/d' -e 's,^\(: Making 3[abc]\)[123]$$,\1,'
POSTPROC.deptgt-suffixes=	awk '/^\#\*\*\* Suffixes/,/^never-stop/'
POSTPROC.gnode-submake=		\
	awk '/Begin input graph/, /^\# \.END/ { \
		if (/made,/) print $$0 \
	}'
POSTPROC.varname-dot-make-mode=	sed 's,^\(: Making [abc]\)[123]$$,\1,'

# Some tests reuse other tests, which makes them unnecessarily fragile.
export-all.rawout: export.mk
unexport.rawout: export.mk
unexport-env.rawout: export.mk

# End of the configuration section.

# Some standard sed commands, to be used in the SED_CMDS above.

# In tests that use the debugging option -dd, ignore debugging output that is
# only logged in -DCLEANUP mode.
STD_SED_CMDS.dd=	-e '/^OpenDirs_Done:/d'
STD_SED_CMDS.dd+=	-e '/^CachedDir /d'
STD_SED_CMDS.dd+=	-e 's,  ${DEFSYSPATH:U/usr/share/mk} ,  <defsyspath> ,'

# Omit details such as process IDs from the output of the -dg1 option.
STD_SED_CMDS.dg1=	-e 's,${.CURDIR}$$,<curdir>,'
STD_SED_CMDS.dg1+=	-e 's,  ${DEFSYSPATH:U/usr/share/mk}$$,  <defsyspath>,'
STD_SED_CMDS.dg1+=	-e '/^\.MAKE\.PATH_FILEMON/d'
STD_SED_CMDS.dg1+=	-e 's,^\(\.MAKE *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+=	-e 's,^\(\.MAKE\.[A-Z_]* *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+=	-e 's,^\(\.MAKE\.JOBS\.C *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+=	-e 's,^\(MACHINE[_ARCH]* *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+=	-e 's,^\(MAKE *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+=	-e 's,^\(\.SHELL *=\) .*,\1 <details omitted>,'
STD_SED_CMDS.dg1+=	-e '/\.SYSPATH/d'

STD_SED_CMDS.dg2=	${STD_SED_CMDS.dg1}
STD_SED_CMDS.dg2+=	-e 's,\(last modified\) ..:..:.. ... ..\, ....,\1 <timestamp>,'

STD_SED_CMDS.dg3=	${STD_SED_CMDS.dg2}

# Omit details such as process IDs from the output of the -dj option.
STD_SED_CMDS.dj=	-e 's, pid [0-9][0-9]*, pid <pid>,'
STD_SED_CMDS.dj+=	-e 's,^\(.Command\): ${.SHELL:T},\1: <shell>,'
# The "-q" may be there or not, see jobs.c, variable shells.
STD_SED_CMDS.dj+=	-e 's,^\(.Command: <shell>\) -q,\1,'

# Reduce the noise for tests running with the -n option, since there is no
# other way to suppress the echoing of the commands.
STD_SED_CMDS.hide-from-output= \
	-e '/^echo hide-from-output/d' \
	-e 's,hide-from-output ,,' \
	-e 's,hide-from-output,,'

# Normalize the output for error messages from the shell.
#
# $shell -c '...'
#	NetBSD sh	...: not found
#	NetBSD ksh	ksh: ...: not found
#	bash 5.0.18	bash: ...: command not found
#	bash 5.1.0	bash: line 1: ...: command not found
#	dash		dash: 1: ...: not found
#
# $shell -c '< /nonexistent'
#	NetBSD sh	sh: cannot open /nonexistent: no such file
#	NetBSD ksh	ksh: cannot open /nonexistent: No such file or directory
#	bash 5.0.18	bash: /nonexistent: No such file or directory
#	bash 5.1.0	bash: line 1: /nonexistent: No such file or directory
#	dash		dash: 1: cannot open /nonexistent: No such file
#
# echo '< /nonexistent' | $shell
#	NetBSD sh	sh: cannot open /nonexistent: no such file
#	NetBSD ksh	ksh: <stdin>[1]: cannot open /nonexistent: No such file or directory
#	bash 5.0.18	bash: line 1: /nonexistent: No such file or directory
#	bash 5.1.0	bash: line 1: /nonexistent: No such file or directory
#	dash		dash: 1: cannot open /nonexistent: No such file
#
STD_SED_CMDS.shell+=		-e 's,^${.SHELL},${.SHELL:T},'
STD_SED_CMDS.shell+=		-e 's,^${.SHELL:T}: line [0-9][0-9]*: ,,'
STD_SED_CMDS.shell+=		-e 's,^${.SHELL:T}: [0-9][0-9]*: ,,'
STD_SED_CMDS.shell+=		-e 's,^${.SHELL:T}: ,,'
STD_SED_CMDS.shell+=		-e 's,: command not found,: not found,'

# The actual error messages for a failed regcomp or regexec differ between the
# implementations.
STD_SED_CMDS.regex= \
	-e 's,\(Regex compilation error:\).*,\1 (details omitted),'

# Normalize timestamps from ':gmtime' or ':localtime' to '<timestamp>'.
# See STD_SED_CMDS.dg2 for timestamps from the debug log.
STD_SED_CMDS.timestamp= \
	-e 's,[A-Z][a-z][a-z] [A-Z][a-z][a-z] [ 0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [12][0-9][0-9][0-9],<timestamp>,'

# End of the configuration helpers section.

UNIT_TESTS:=	${.PARSEDIR}
.PATH: ${UNIT_TESTS}

.if ${USE_ABSOLUTE_TESTNAMES:Uno} == yes
OUTFILES=	${TESTS:@@test@@${.CURDIR:tA}/${test}.out@@}
.else
OUTFILES=	${TESTS:=.out}
.endif

all: ${OUTFILES}

CLEANFILES=		*.rawout *.out *.status *.tmp *.core *.tmp
CLEANFILES+=		obj*.[och] lib*.a	# posix1.mk
CLEANFILES+=		issue* .[ab]*		# suffixes.mk
CLEANDIRS=		dir dummy *.tmp		# posix1.mk

clean:
	rm -rf ${CLEANDIRS}
	rm -f ${CLEANFILES}

TEST_MAKE?=	${.MAKE}
.if ${TEST_MAKE:M/*} == ""
# we want an absolute path for TEST_MAKE
tm!= for d in ${PATH:S,:, ,g:M/*}; do \
	test -x $$d/${TEST_MAKE} || continue; \
	echo $$d/${TEST_MAKE}; break; done
.if ${tm:M/*}
TEST_MAKE:= ${tm}
.endif
.endif

TOOL_SED?=	sed

# ensure consistent results from sort(1)
LC_ALL=		C
LANG=		C
.export LANG LC_ALL

# Some Linux systems such as Fedora have deprecated egrep in favor of grep -E.
.if ${.MAKE.OS:NLinux} == ""
EGREP= grep -E
.endif
# Keep the classical definition for all other systems.  Just as the bmake code
# is kept compatible with C90, the tests are kept compatible with systems that
# are several decades old and don't follow modern POSIX standards.
EGREP?= egrep

MAKE_TEST_ENV=  EGREP="${EGREP}"
MAKE_TEST_ENV+=	MALLOC_OPTIONS="JA"	# for jemalloc 100
MAKE_TEST_ENV+=	MALLOC_CONF="junk:true"	# for jemalloc 510
MAKE_TEST_ENV+= TMPDIR=${TMPDIR}

.if ${.MAKE.OS} == "NetBSD"
LIMIT_RESOURCES?=	ulimit -v 300000
.endif
LIMIT_RESOURCES?=	:

# Each test is run in a sub-make, to keep the tests from interfering with
# each other, and because they use different environment variables and
# command line options.
.SUFFIXES: .mk .rawout .out
.mk.rawout:	.META
	@@${_MKMSG_TEST:Uecho '#      test '} ${.PREFIX}
	@@set -eu; \
	${LIMIT_RESOURCES}; \
	cd ${.OBJDIR}; \
	env -i PATH="$$PATH" ${MAKE_TEST_ENV} ${ENV.${.PREFIX:T}} \
	  ${TEST_MAKE} \
	    -r -C ${.CURDIR} -f ${.IMPSRC} \
	    ${FLAGS.${.PREFIX:T}:U-k} \
	    > ${.TARGET}.tmp 2>&1 \
	&& status=$$? || status=$$?; \
	echo $$status > ${.TARGET:R}.status
	@@mv ${.TARGET}.tmp ${.TARGET}

# Postprocess the test output to make the output platform-independent.
#
# Replace anything after 'stopped in' with unit-tests
_SED_CMDS+=	-e '/stopped/s, in /.*, in unit-tests,'
# Allow the test files to be placed anywhere.
_SED_CMDS+=	-e 's,\(\.PARSEDIR}\) = `'"/[^']*'"',\1 = <some-dir>,'
_SED_CMDS+=	-e 's,\(\.INCLUDEDFROMDIR}\) = `'"/[^']*'"',\1 = <some-dir>,'
_SED_CMDS+=	-e 's,${TMPDIR},<tmpdir>,g' -e 's,${TMPDIR:tA},<tmpdir>,g'
# canonicalize ${.OBJDIR} and ${.CURDIR}
_SED_CMDS+=	-e 's,${.CURDIR},<curdir>,g'
.if ${.OBJDIR} != ${.CURDIR}
# yes this is inaccurate but none of the tests expect <objdir> anywhere
# which we get depending on how MAKEOBJDIR is set.
_SED_CMDS+=	-e 's,${.OBJDIR},<curdir>,g' -e 's,${.OBJDIR:tA},<curdir>,g'
.endif

# At the end, make sure we cleanup any dregs...
.for d in ${MAKEOBJDIRPREFIX:S,/$,,} /usr/obj
_SED_CMDS_LAST+=	-e 's,$d,,'
.endfor

# always pretend .MAKE was called 'make'
_SED_CMDS+=	-e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,'
_SED_CMDS+=	-e 's,${TEST_MAKE:S,.,\\.,g},make,'
_SED_CMDS+=	-e 's,^usage: ${TEST_MAKE:T:S,.,\\.,g} ,usage: make ,'
_SED_CMDS+=	-e 's,${TEST_MAKE:T:S,.,\\.,g}\(\[[1-9][0-9]*\][: ]\),make\1,'
_SED_CMDS+=	-e 's,<curdir>/,,g'
_SED_CMDS+=	-e 's,${UNIT_TESTS:S,.,\\.,g}/,,g'
_SED_CMDS+=	-e 's,\(\.make\)[1-9][0-9]*,\1,g'
_SED_CMDS+=	-e '/MAKE.VERSION/d'
_SED_CMDS+=	-e '/EGREP=/d'

.rawout.out:	.META
	@@${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} ${_SED_CMDS_LAST} \
	  < ${.IMPSRC} > ${.TARGET}.tmp
	@@${POSTPROC.${.PREFIX:T}:D \
	    ${POSTPROC.${.PREFIX:T}} < ${.TARGET}.tmp > ${.TARGET}.post \
	    && mv ${.TARGET}.post ${.TARGET}.tmp}
	@@echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp
	@@mv ${.TARGET}.tmp ${.TARGET}

# Compare all output files
test:	${OUTFILES} .PHONY
	@@failed= ; \
	for test in ${TESTS}; do \
	  diff -u ${UNIT_TESTS}/$${test}.exp $${test}.out \
	  || failed="$${failed}$${failed:+ }$${test}" ; \
	done ; \
	if [ -n "$${failed}" ]; then \
	  echo "Failed tests: $${failed}" ; false ; \
	else \
	  echo "All tests passed" ; \
	  lua=${LUA:Ulua} ; \
	  have_lua=$$("$$lua" -e 'print "yes"' 2>&1) ; \
	  if [ "$$have_lua" = "yes" ]; then \
	    (cd ${.CURDIR} && "$$lua" ./check-expect.lua *.mk); \
	  fi; \
	fi

accept:
	@@for test in ${TESTS}; do \
	  cmp -s ${UNIT_TESTS}/$${test}.exp $${test}.out \
	  || { echo "Replacing $${test}.exp" ; \
	       cp $${test}.out ${UNIT_TESTS}/$${test}.exp ; } \
	done

# Note: only works for adding tests.
# To remove a test, the $$mi file must be edited manually.
sync-mi:
	@@set -eu;							\
	cd "${MAKEFILE:tA:H}/../../..";					\
	mi="distrib/sets/lists/tests/mi";				\
	cvs update "$$mi";						\
	testsdir="usr.bin/make/unit-tests";				\
	fmt="./usr/tests/$$testsdir/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \
	cat "$$mi" > "$$mi.tmp";					\
	(cd "$$testsdir" && egrep '\.(exp|mk)/' CVS/Entries | cut -d/ -f2) | \
	xargs printf "$$fmt" >> "$$mi.tmp"; \
	distrib/sets/fmt-list "$$mi.tmp";				\
	mv "$$mi.tmp" "$$mi";						\
	cvs diff "$$mi" || true

.if exists(${TEST_MAKE})
${TESTS:=.rawout}: ${TEST_MAKE}
# in meta mode, we *know* if a target script is impacted
# by a makefile change.
.if ${.MAKE.MODE:Unormal:Mmeta} == ""
${TESTS:=.rawout}: ${.PARSEDIR}/Makefile
.endif
.endif

.-include <bsd.obj.mk>
@


1.382
log
@Ensure TEST_MAKE is an absolute path

Rather than have multiple tests work out where 'make' is,
do it once.

PR: 60016
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.381 2026/03/09 20:09:10 sjg Exp $
d710 6
a715 12
# macros from bmake/mk/sys.vars.mk

# type should be a builtin in any sh since about 1980,
# but sadly there are exceptions!
.if ${.MAKE.OS:Unknown:NBSD/OS} == ""
_type_sh = which
.endif
# AUTOCONF := ${autoconf:L:${M_whence}}
M_type = @@x@@(${_type_sh:Utype} $$x) 2> /dev/null; echo;@@:${M_sh1:Ush}:[0]:N* found*:[@@]:C,[()],,g
M_whence = ${M_type}:M/*:[1]

TEST_MAKE:= ${TEST_MAKE:${M_whence}}
@


1.381
log
@make: ensure tests can be run in parallel

with a common link .make one test can hose another.

PR: 60016
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.380 2026/03/03 20:03:00 rillig Exp $
d708 16
@


1.380
log
@tests/make: remove filemon path from expected debug output

That variable is not essential for the test, and it differs between the
standard configuration and the c90-stdbool configuration from
test-variants.mk.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.379 2026/02/11 21:39:21 sjg Exp $
d780 1
@


1.379
log
@Mark .[raw]out targets .META

If we are in META_MODE we want .meta files for the tests,
but the new MaybeSubMake sets OP_SUBMAKE so we
need an explicit .META flag.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.378 2026/02/10 22:33:36 sjg Exp $
d619 1
d630 1
@


1.378
log
@Make sure opt-where-am-i does not trip over unreadable /usr/obj
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.377 2026/02/10 18:53:34 sjg Exp $
d736 1
a736 1
.mk.rawout:
d781 1
a781 1
.rawout.out:
@


1.377
log
@make: move MaybeSubMake to job.c

Simplify MaybeSubMake to work on the expanded command from
JobWriteCommand, we check for progname sans any "[level]".

This improves reliability and reduces overhead as we only
scan commands that will actually be run - in jobs mode.

In meta_oodate we need to know of OP_SUBMAKE when deciding if
a .meta file is needed or not - and therefor needs checking.
This obviously happens before JobWriteCommand is called, so we may
have to check MaybeSubMake from meta_needed. If so, we set a flag
doneSubmake so JobWriteCommand will not recheck.

Tweak the few unit-tests that are impacted.
In particular; we have to use a symlink .make -> ${MAKE} to be able
to defeat MaybeSubMake and trigger warnings about bogus -J args.

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.376 2026/02/05 23:26:08 sjg Exp $
d560 1
@


1.376
log
@Add .MAKE.VERSION as read-only variable

If MAKE_VERSION is defined, create ${.MAKE.VERSION} read-only
and retain ${MAKE_VERSION} for backwards compatibility.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.375 2026/01/03 20:48:35 rillig Exp $
d544 3
d594 4
a597 1
POSTPROC.gnode-submake=		awk '/Begin input graph/, /^$$/'
@


1.375
log
@make: test the ":S" modifier with "^" as delimiter
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.374 2025/11/16 16:43:56 sjg Exp $
d771 1
a771 1
_SED_CMDS+=	-e '/MAKE_VERSION/d'
@


1.374
log
@make: unit-tests use .OBJDIR when appropriate

Always use .OBJDIR to refer to the directory make is running in.
Also, add some final filtering to cleanup references to /usr/obj

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.373 2025/11/12 22:14:08 sjg Exp $
d575 1
@


1.373
log
@make: add :sh1 to run command on first reference only

There are several ways to assign the output of a command to
a variable, two common ones:

CMD= command
VAR!= ${CMD}

is evaluated when the above line is read, so VAR is set
even if it is never used.

VAR = ${CMD:sh}

is only evaluated when referenced, but command will be run for
each reference.

We now add :sh1 which will only run command on first reference.
The output will be cached in .MAKE.SH1.VAR which will be used for
subsequent references.

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.372 2025/08/04 22:44:49 sjg Exp $
d757 6
d774 1
a774 1
	@@${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} \
@


1.372
log
@Use printf rather than echo -n
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.371 2025/08/04 18:39:10 sjg Exp $
d405 1
@


1.371
log
@sync-mi should do .inc files too?
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.370 2025/08/03 21:56:39 sjg Exp $
d810 1
a810 2
	(cd "$$testsdir" && egrep '\.(exp|inc|mk)/' CVS/Entries | \
	grep -v Makefile | cut -d/ -f2) | \
@


1.370
log
@make: ensure output captured in meta file is accurate

In CollectOutput() a newline before the end of job->outBuf
results in a short write to stdout, but meta_job_output()
was recording the entire string in the meta file, so on
next call the left overs would be duplicated in the meta file.

Pass a length to meta_job_output() if it should only report part of
the data in meta file.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $
d810 2
a811 1
	(cd "$$testsdir" && egrep '\.(exp|mk)/' CVS/Entries | cut -d/ -f2) | \
@


1.369
log
@tests/make: test backslash at the end of a line and in the :M modifier

As described in PR bin/46139 by David A. Holland.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.368 2025/06/27 20:20:56 rillig Exp $
d238 1
@


1.368
log
@tests/make: test missing support for $^

Test provided by Diogo Santos via PR bin/59018; extended by me for .WAIT
and implicit rules.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.367 2025/06/13 20:23:16 rillig Exp $
d62 1
a479 1
#	char-005C-backslash.mk
@


1.367
log
@tests/make: fix race condition in debug output in parallel mode

Discovered in ATF run on evbearmv7hf.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.366 2025/06/13 03:51:18 rillig Exp $
d415 1
@


1.366
log
@make: add on-demand inter-process stack traces

When debugging a build that heavily uses nested calls to sub-makes, the
chain of calls is useful to quickly assess the situation.  If explicitly
requested, include the actions from any parent processes in the stack
traces.

Reviewed by: sjg
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.365 2025/06/13 03:12:34 sjg Exp $
d559 1
d561 2
@


1.365
log
@Fix replacing ${TEST_MAKE} with make
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.364 2025/06/12 18:51:05 rillig Exp $
d458 1
@


1.364
log
@make: use a common style for unexpected error messages

In enomem, report the actual error instead of a fixed ENOMEM.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.363 2025/06/05 21:56:54 rillig Exp $
d754 1
a754 1
_SED_CMDS+=	-e 's,${TEST_MAKE:T:S,.,\\.,g}\(\[[1-9][0-9]*\]:\),make\1,'
@


1.363
log
@make: remove empty line from diagnostic, add tests for output handling

The warning for the invalid internal option "-J" does not need a
trailing newline, as that is provided by Parse_Error already.

Having this newline in the output demonstrated a previously unknown bug
in handling the output of child commands in parallel mode. There, empty
lines are randomly discarded, depending on the chunks in which the
output from the child process is copied to make's stdout. See
job-output.mk for a demonstration.

The test for the Korn shell did not run the Korn shell in error handling
mode, as the error handling mode only affects the parallel mode but the
test didn't switch to that mode.

After fixing the shell-ksh.mk test, the single '"' in the output looked
suspicious, and indeed, the shell-csh.mk test had the same problem of
filtering more characters from the output than intended.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.362 2025/05/09 21:38:34 rillig Exp $
d556 1
a556 1
SED_CMDS.sh-dots+=		-e 's,^make: exec(\(.*\)) failed (.*)$$,<not found: \1>,'
d567 1
a567 1
SED_CMDS.varmod-mtime+=		-e "s,\(.*\)': .*,\1': <ENOENT>,"
@


1.362
log
@make: unify debug messages for parallel mode

Always print the process status in hex, with a leading "0x", to avoid
confusion for status 127f, which looks suspiciously decimal.

Prefix all process IDs with "pid", to be able to filter them easily.

Omit trailing whitespace when printing a command.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.361 2025/05/07 19:49:00 rillig Exp $
d226 1
@


1.361
log
@make: add end marker for -dg1, -dg2 and -dg3 debug log

The marker helps distinguish the output from sub-makes from the output
of the primary make.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.360 2025/05/03 07:54:08 rillig Exp $
d547 1
a547 7
SED_CMDS.opt-debug-jobs=	-e 's,([0-9][0-9]*),(<pid>),'
SED_CMDS.opt-debug-jobs+=	-e 's,pid [0-9][0-9]*,pid <pid>,'
SED_CMDS.opt-debug-jobs+=	-e 's,Process [0-9][0-9]*,Process <pid>,'
SED_CMDS.opt-debug-jobs+=	-e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,'
SED_CMDS.opt-debug-jobs+=	-e 's,Command: ${.SHELL:T},Command: <shell>,'
# The "-q" may be there or not, see jobs.c, variable shells.
SED_CMDS.opt-debug-jobs+=	-e 's,^\(.Command: <shell>\) -q,\1,'
d616 4
a619 4
STD_SED_CMDS.dj= \
	-e '/Process/d;/JobFinish:/d' \
	-e 's, \(pid\) [0-9][0-9]*, \1 <pid>,' \
	-e 's,^\(	Command:\) .*,\1 <shell>,'
@


1.360
log
@make: use uniform debug log messages for the token pool
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.359 2025/04/22 17:50:34 rillig Exp $
d588 1
a588 1
POSTPROC.gnode-submake=		awk '/Input graph/, /^$$/'
@


1.359
log
@make: group the code for handling the job token pool
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.358 2025/04/13 09:29:32 rillig Exp $
a623 2
	-e 's,^\(TokenPool_Take\)([0-9]*),\1(<pid>),' \
	-e 's,^([0-9][0-9]*) \(withdrew token\),(<pid>) \1,' \
@


1.358
log
@tests/make: add tests for POSIX mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.357 2025/04/12 05:16:57 sjg Exp $
d624 1
a624 1
	-e 's,^\(Job_TokenWithdraw\)([0-9]*),\1(<pid>),' \
@


1.357
log
@make/unit-tests: Fix expected results for meta-ignore tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.356 2025/03/30 09:51:49 rillig Exp $
d303 3
@


1.356
log
@make: use '"filename" line 123' for locations instead of 'filename:123'

The format 'filename:123' is commonly used for identifying a location in
a file. Text editors recognize it and allow quick navigation through it.
The previous format was specific to make and would have required custom
support in editors.

The new format was already used in stack traces, except for the first
line. Now all lines use the same format.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.355 2025/01/25 22:46:30 sjg Exp $
d537 1
a537 1
SED_CMDS.meta-ignore= -e 's,\(\.meta:\) [1-9][0-9]*:,\1 <line>:,'
@


1.355
log
@make/unit-tests: avoid failure on NFS

The 'rm -rf ${TMPDIR}' at the end of the 'test' target, fails
when building on NFS because the temp file used for the target script
keeps the directory from being empty.

Move it to a separate target attached to '.END'

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.354 2025/01/10 23:00:38 rillig Exp $
d575 2
a576 2
SED_CMDS.varname-dot-parsedir=	-e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,'
SED_CMDS.varname-dot-parsefile=	-e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,'
@


1.354
log
@tests/make: test expressions based on undefined variables

When an undefined variable is used in a conditional, make complains about
"Malformed conditional", which is wrong since the conditional is
well-formed but errors out during evaluation.

In order to fix this wrong error message and preserve the remaining
behavior, cover the places in which an expression is evaluated with
undefined expressions being an error (VARE_EVAL_DEFINED), but with
neither producing an error message nor handling errors.  This combination
results in the same behavior as evaluating the expressions in the mode
that allows undefined variables to be used in expressions.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.353 2024/11/22 05:36:33 rillig Exp $
d50 5
a788 1
	  rm -rf ${TMPDIR}; \
@


1.353
log
@tests/make: speed up running the tests

Only 4 of the 389 tests need to postprocess their output, so spare the
extra 'cat' call in the majority of cases.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.352 2024/10/31 09:12:13 rillig Exp $
d27 1
a27 1
# To do that, just run "make sync-mi" in this directory.
d316 1
@


1.352
log
@make: in the debug log, always qualify line number with filename

Previously, to find out the filename corresponding to a line number from
a 'Parsing' line, it was necessary to find the preceding
'SetFilenameVars' line, which was unnecessarily time-consuming and
distracting.

The 'filename:line' format matches the one used in PrintStackTrace, and
it differs from the one used in PrintLocation, as the former format is
more common in other tools.

Most of the affected unit tests only use the 'Parsing' lines to give
additional context to their debug log, so no structural changes there.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.351 2024/08/18 13:40:51 rillig Exp $
d760 6
a765 5
	  < ${.IMPSRC} > ${.TARGET}.tmp1
	@@${POSTPROC.${.PREFIX:T}:Ucat} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2
	@@rm ${.TARGET}.tmp1
	@@echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp2
	@@mv ${.TARGET}.tmp2 ${.TARGET}
@


1.351
log
@tests/make: clean up private temporary directory after running tests

Fixes PR bin/58569.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.350 2024/07/07 09:37:00 rillig Exp $
d511 1
a511 1
	-e '/^Parsing line/d' \
@


1.350
log
@make: don't track hash table chain lengths during lookup

The chain lengths are only used for debugging purposes, so avoid the
extra cost at each lookup.  Instead, calculate the maximum chain length
only when it is actually requested in -dh mode.

The reported number changes slightly: Before, it was the length of the
chain that was actually traversed to find an entry, up to that entry,
now it is the length of the largest chain in the table, no matter if it
was actually accessed or not.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.349 2024/07/04 20:18:40 rillig Exp $
d782 1
@


1.349
log
@make: on error, print the targets to be made

This helps to understand situations with several nested sub-makes in
varying directories.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.348 2024/07/01 21:02:26 sjg Exp $
d537 1
a537 1
SED_CMDS.opt-debug-hash=	-e 's,\(numEntries\)=[1-9][0-9],\1=<entries>,'
@


1.348
log
@make: add :tc to capitalize first letter of each word

This is very hard to do without :tc

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.347 2024/06/01 15:54:40 sjg Exp $
d736 1
a736 1
_SED_CMDS+=	-e '/stopped/s, /.*, unit-tests,'
@


1.347
log
@Run check-expect.lua in .CURDIR
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.346 2024/06/01 10:06:23 rillig Exp $
d400 1
@


1.347.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $
d27 1
a27 1
# To do that, run "make sync-mi" in this directory.
a49 5
# and clean it up - outside the context of
# any target that might be using it.
.END: rm-tmpdir
rm-tmpdir:	.NOMETA
	@@rm -rf ${TMPDIR}
a56 1
TESTS+=		char-005c-reverse-solidus
a220 1
TESTS+=		job-output
a297 3
TESTS+=		posix-execution
TESTS+=		posix-expansion
TESTS+=		posix-varassign
a315 1
TESTS+=		suff
a399 1
TESTS+=		varmod-to-title
a403 1
TESTS+=		varname-circumflex
a446 1
TESTS+=		varname-make_stack_trace
d466 1
d510 1
a510 1
	-e '/^Parsing .*:[1-9][0-9]*:/d' \
d530 1
a530 1
SED_CMDS.meta-ignore= -e 's,\(\.meta:\)[1-9][0-9]*:,\1<line>:,'
d536 8
a543 2
SED_CMDS.opt-debug-hash=	-e 's,\(entries\)=[1-9][0-9],\1=<entries>,'
SED_CMDS.opt-debug-jobs=	${STD_SED_CMDS.dj}
d551 1
a551 1
SED_CMDS.sh-dots+=		-e 's,^make: exec(\(.*\)): .*$$,<not found: \1>,'
a552 1
# Race condition between the child's stdout and make's status.
a553 2
SED_CMDS.sh-errctl+=		-e '/^Process with pid/d'
SED_CMDS.sh-errctl+=		-e '/^JobFinish:/d'
d562 1
a562 1
SED_CMDS.varmod-mtime+=		-e "s,\(mtime for .*\): .*,\1: <ENOENT>,"
d568 2
a569 2
SED_CMDS.varname-dot-parsedir=	-e '/in some cases/ s,^make: [^:]*:,make: <normalized>:,'
SED_CMDS.varname-dot-parsefile=	-e '/in some cases/ s,^make: [^:]*:,make: <normalized>:,'
d578 1
a578 1
POSTPROC.gnode-submake=		awk '/Begin input graph/, /^$$/'
d612 6
a617 4
STD_SED_CMDS.dj=	-e 's, pid [0-9][0-9]*, pid <pid>,'
STD_SED_CMDS.dj+=	-e 's,^\(.Command\): ${.SHELL:T},\1: <shell>,'
# The "-q" may be there or not, see jobs.c, variable shells.
STD_SED_CMDS.dj+=	-e 's,^\(.Command: <shell>\) -q,\1,'
d735 1
a735 1
_SED_CMDS+=	-e '/stopped/s, in /.*, in unit-tests,'
d751 1
a751 1
_SED_CMDS+=	-e 's,${TEST_MAKE:T:S,.,\\.,g}\(\[[1-9][0-9]*\][: ]\),make\1,'
d759 5
a763 6
	  < ${.IMPSRC} > ${.TARGET}.tmp
	@@${POSTPROC.${.PREFIX:T}:D \
	    ${POSTPROC.${.PREFIX:T}} < ${.TARGET}.tmp > ${.TARGET}.post \
	    && mv ${.TARGET}.post ${.TARGET}.tmp}
	@@echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp
	@@mv ${.TARGET}.tmp ${.TARGET}
@


1.346
log
@tests/make: require all expected messages to be listed in the .mk files
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.345 2024/05/24 23:02:46 rillig Exp $
d779 1
a779 1
	    "$$lua" ./check-expect.lua *.mk; \
@


1.345
log
@make: in -DCLEANUP mode, free variables and their values

The variables in the 3 scopes must be freed before the scopes themselves
are freed by Targ_End.

The test opt-m-include-dir creates a directory of the form '*.tmp', thus
it must be removed before attempting to only remove regular files of
this name.

POSIX requires setenv to copy the passed name and value, so there is no
need to keep that memory allocated any longer.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.344 2024/04/30 16:41:32 sjg Exp $
d776 5
@


1.344
log
@Subst DEFSYSPATH in deptgt-phony
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.343 2024/04/20 10:18:55 rillig Exp $
d681 1
a681 1
CLEANDIRS=		dir dummy		# posix1.mk
d684 1
a685 1
	rm -rf ${CLEANDIRS}
@


1.343
log
@make: provide more context information for parse/evaluate errors
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.342 2024/01/07 02:07:44 sjg Exp $
d592 3
a594 2
STD_SED_CMDS.dd=		-e '/^OpenDirs_Done:/d'
STD_SED_CMDS.dd+=		-e '/^CachedDir /d'
@


1.342
log
@make: unit-tests handle TEST_MAKE:T != make

We need to allow for ${TEST_MAKE:T}[1-9]: etc when
TEST_MAKE is not 'make'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.341 2023/09/09 16:41:04 sjg Exp $
d562 1
a562 1
SED_CMDS.varmod-mtime+=		-e "s,': .*,': <ENOENT>,"
@


1.341
log
@Add .MAKE.JOBS.C to indicate wether -jC is supported
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.340 2023/08/17 18:48:32 rillig Exp $
d750 1
@


1.340
log
@tests/make: extend tests for the ':mtime' modifier
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.339 2023/06/20 09:25:34 rillig Exp $
d600 1
@


1.339
log
@make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.338 2023/06/16 09:25:13 rillig Exp $
d562 1
@


1.338
log
@tests/make: add test for multiple-inclusion guards
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.337 2023/06/16 07:20:45 rillig Exp $
d512 1
@


1.337
log
@tests/make: clean up tests for the ':M' and ':S' modifiers
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.336 2023/06/01 07:27:30 rillig Exp $
d199 1
d508 5
@


1.336
log
@tests/make: clean up comments, extend a few tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.335 2023/05/10 13:03:06 rillig Exp $
a230 1
TESTS+=		modmatch
@


1.335
log
@tests/make: clean up tests for .for loops

Most of the tests from forloop.mk were already in directive-for.mk.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.334 2023/05/09 20:14:27 sjg Exp $
a214 1
TESTS+=		forsubst
@


1.334
log
@make: add :mtime to provide mtime of file

The value of the variable is passed to stat(2)
and st_mtime is new value.
An optional arg can be used if stat(2) fails, otherwise
the current time is used.

See varmod-mtime.mk for usage examples.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.333 2023/02/25 19:30:32 sjg Exp $
a214 1
TESTS+=		forloop
@


1.333
log
@make: meta-ignore tests will not work if TMPDIR is /tmp

Since /tmp and /var/tmp are always part of .MAKE.META.IGNORE_PATHS
the varname-dot-make-meta-ignore_* tests will not work
if TMPDIR is either (or subdir) of those.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.332 2023/02/23 05:20:45 sjg Exp $
d377 1
@


1.332
log
@Add unit-tests for .MAKE.META.IGNORE_*

These unit-tests should only be run if TEST_MAKE
has a valid .MAKE.PATH_FILEMON to indicate that filemon is
supported.

All three tests use the same meta-ignore.inc
which runs three sub-makes

one to initialize the target .meta file
two to ignore a file using .MAKE.META.IGNORE_{PATHS,PATTERNS,FILTER}
three to verify that without .MAKE.META.IGNORE_* the target is out of date.

Fix the order of _SED_CMDS to avoid errors when ${MAKE:T} appears in
.OBJDIR
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.331 2023/01/24 00:24:02 sjg Exp $
d36 15
d423 3
a425 1
.if ${.MAKE.PATH_FILEMON:Uno:Nktrace:N/dev*} == ""
a686 16

# for many tests we need a TMPDIR that will not collide
# with other users.
.if ${.OBJDIR} != ${.CURDIR}
# easy
TMPDIR:=	${.OBJDIR}/tmp
.elif defined(TMPDIR)
TMPDIR:=	${TMPDIR}/uid${.MAKE.UID}
.else
TMPDIR:=	/tmp/uid${.MAKE.UID}
.endif
# make sure it exists
.if !exist(${TMPDIR})
_!= mkdir -p ${TMPDIR}
.endif

@


1.331
log
@make: .SYSPATH: to add dirs to sysIncPath

.SYSPATH: with no sources will clear sysIncPath
otherwise sources are added

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.330 2023/01/23 23:01:52 sjg Exp $
d408 1
d412 2
a415 1
TESTS+=		varname-dot-make-path_filemon
d506 4
d542 3
d725 1
a725 5
# always pretend .MAKE was called 'make'
_SED_CMDS+=	-e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,'
_SED_CMDS+=	-e 's,${TEST_MAKE:S,.,\\.,g},make,'
_SED_CMDS+=	-e 's,^usage: ${TEST_MAKE:T:S,.,\\.,g} ,usage: make ,'
# replace anything after 'stopped in' with unit-tests
d730 1
a730 1
_SED_CMDS+=	-e 's,${TMPDIR},<tmpdir>,g'
d732 1
d736 1
a736 1
_SED_CMDS+=	-e 's,${.OBJDIR},<curdir>,g'
d738 4
a741 1
_SED_CMDS+=	-e 's,${.CURDIR},<curdir>,g'
@


1.330
log
@make: .[NO]READONLY for control of read-only variables

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.329 2023/01/19 23:26:14 rillig Exp $
d541 1
a541 1
SED_CMDS.varname-empty=		${.OBJDIR .PARSEDIR .PATH .SHELL:L:@@v@@-e '/\\$v/d'@@}
d571 1
@


1.329
log
@tests/make: rename files that are not test cases
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.328 2023/01/19 19:55:27 rillig Exp $
d323 1
@


1.328
log
@tests/make: add tests for whitespace in leading '@@+-'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.327 2022/09/25 12:32:56 rillig Exp $
a28 4
# A few *.mk files are helper files for other tests (such as include-sub.mk)
# and are thus not added to TESTS.  Such files must be ignored in
# src/tests/usr.bin/make/t_make.sh.
#
@


1.327
log
@tests/make: fix test for option '-e' (broken since 2022-01-23)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.326 2022/09/10 16:20:04 rillig Exp $
d530 1
d617 1
d621 1
@


1.326
log
@tests/make: be more specific about the egrep compatibility
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.325 2022/09/09 18:36:15 sjg Exp $
d472 1
a472 1
ENV.envfirst=		FROM_ENV=value-from-env
@


1.325
log
@Handle deprecation of egrep
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.324 2022/09/03 15:03:32 sjg Exp $
d676 1
a676 2
# Some systems have deprecated egrep for grep -E
# but not everyone supports that
d680 3
@


1.324
log
@Only update distrib/sets/lists/tests/mi with valid files

sync-mi: use CVS/Entries to ensure we only update
distrib/sets/lists/tests/mi with files known to CVS.

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.323 2022/09/02 18:54:25 sjg Exp $
d676 9
a684 1
MAKE_TEST_ENV=	MALLOC_OPTIONS="JA"	# for jemalloc 100
d733 1
@


1.323
log
@Enable make/unit-tests/directive-for-break

Also ensure MAKE_VERSION is ignored.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.322 2022/09/02 16:24:31 sjg Exp $
d764 2
a765 1
	(cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi.tmp"; \
@


1.322
log
@make: add .break to terminate .for loop early

When .break is encountered within a .for loop
it causes immediate termination.

Outside of a .for loop .break causes a parse error.

Reviewed by: christos
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.321 2022/08/25 06:23:38 rillig Exp $
d171 1
a171 1
#TESTS+=		directive-for-break
d724 1
@


1.321
log
@tests/make: fix canonicalization for single-digit day of month
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.320 2022/08/24 22:09:41 rillig Exp $
d171 1
@


1.320
log
@make: prevent future out-of-bounds errors when parsing expressions

A modifier in an expression ends not only at the next ':' or at the
closing '}' or ')', but also at the end of the string.

Previously, testing for the end of the string had been done separately,
which was error-prone since 2006-05-11, when indirect modifiers were
introduced.  Since then, it was possible that the string terminator '\0'
was accidentally skipped in cases where the loop condition only tested
for the ending character.  When parsing indirect modifiers, the ending
character is indeed '\0', but when parsing direct modifiers, it is '}'
or ')'.

A welcome side effect is that in the case of unclosed expressions such
as '${VAR:Modifier', the amount of error messages is reduced from 2 or 3
to only 1.  The removed error messages were wrong and thus confusing
anyway.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.319 2022/07/26 19:32:25 sjg Exp $
d624 2
d627 1
a627 1
	-e 's,[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9][0-9]* [0-9][0-9]*:[0-9][0-9]:[0-9][0-9] 20[0-9][0-9],<timestamp>,'
@


1.319
log
@Pass MAKEOBJDIR to opt-m-include-dir

Prevent makeing opt-m-include-dir.tmp in src tree.

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.318 2022/06/10 21:28:50 rillig Exp $
d536 1
d624 3
@


1.318
log
@tests/make: reword comment in Makefile to be more specific
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.317 2022/06/02 07:34:39 skrll Exp $
d472 1
@


1.317
log
@Increase the resource limit so these tests pass on hppa.

LGTM from Roland
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.316 2022/05/23 22:33:56 rillig Exp $
d695 1
a695 1
# Postprocess the test output so that the results can be compared.
@


1.316
log
@tests/make: document and demonstrate .for i containing .if empty(i)

PR bin/43821 describes the inconsistency that in a '.for i' loop, the
condition '.if ${i:M*.c}' works since 2009 while the seemingly
equivalent condition '.if !empty(i:M*.c)' does not access the variable
'i' from the .for loop but instead the global 'i'.

Resolving this situation in a backwards-compatible and non-surprising
way is hard, as make has grown several features during the last 20 years
that interact in various edge cases.  For now, document the most obvious
pitfalls.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.315 2022/05/08 10:20:49 rillig Exp $
d673 1
a673 1
LIMIT_RESOURCES?=	ulimit -v 200000
@


1.315
log
@tests/make: remove test varquote

The test varmod-quote-dollar covers the same topic.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.314 2022/05/08 06:51:27 rillig Exp $
d171 1
@


1.314
log
@tests/make: migrate cond1 test to other, more specific tests

The tests in cond1 were a mixture of "everything related to conditions",
and the test cases were heavily dependent on each other, which made them
hard to understand.  Move each test case to its corresponding
special-purpose test.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.313 2022/05/07 17:49:47 rillig Exp $
a439 1
TESTS+=		varquote
@


1.313
log
@make: allow to randomize build order of targets

In complex dependency structures, when a build fails, a probable cause
is a missing dependency declaration between some files.  In compat mode,
the build order is deterministic, in jobs mode, it is somewhat
deterministic.  To explore more edge cases, add the line ".MAKE.MODE +=
randomize-targets" somewhere in the makefile.

Fixes PR bin/45226 by riastradh.  Reviewed by christos.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.312 2022/04/18 15:06:28 rillig Exp $
a86 1
TESTS+=		cond1
@


1.312
log
@make: only switch to POSIX mode if '.POSIX:' is the first line

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
says that in order to make a makefile POSIX-conforming, its first
non-comment line must be the special dependency line '.POSIX:' without
any source dependencies.

Previously, make switched to POSIX mode even if such a line occurred
anywhere else, which was allowed by POSIX but was deep in the
"unspecified behavior" area.  For NetBSD make, there is no big
difference since it doesn't ship any <posix.mk> file, this change mainly
affects the bmake distribution.

Previously, makefiles that contain '.POSIX:' somewhere in the middle
could fail due to <posix.mk> resetting .SUFFIXES, among other things.

Suggested by Simon J. Gerraty, who also reviewed an earlier version of
this change.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.311 2022/03/26 12:44:57 rillig Exp $
d544 1
d547 1
@


1.311
log
@make: fix crash on .undef of an environment variable (since 2020-10-06)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.310 2022/03/25 22:38:39 rillig Exp $
d146 1
@


1.310
log
@tests/make: suppress -DCLEANUP output in test deptgt-phony
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.309 2022/02/12 13:17:57 rillig Exp $
d470 1
@


1.309
log
@tests/make: document the history of bugs in '-k' mode

Reported in PR#49720 in 2015, fixed independently in compat.c 1.199 from
2020-12-07.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.308 2022/02/12 01:15:18 rillig Exp $
d488 2
a489 3
SED_CMDS.dir=		${:D remove output from -DCLEANUP mode }
SED_CMDS.dir+=		-e '/^OpenDirs_Done:/d'
SED_CMDS.dir+=		-e '/^CachedDir /d'
d554 5
@


1.308
log
@tests/make: demonstrate bug for .SILENT in jobs mode (since 2003)

Reported 2011 in PR#45356.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.307 2022/02/09 21:24:29 rillig Exp $
d263 1
@


1.307
log
@tests/make: remove redundant 'echo' from variable assignments

Before main.c 1.231 from 2014-09-09, a variable assignment using the
operator '!=' generated a warning "Couldn't read shell's output" if the
output of the command was empty.  The simplest way to suppress this
wrong warning was to add an empty 'echo' to the command.  This hack is
no longer needed.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.306 2022/02/09 21:09:24 rillig Exp $
d149 1
@


1.306
log
@make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.305 2022/02/09 20:52:06 rillig Exp $
d656 1
a656 1
x!= echo; mkdir -p ${TMPDIR}
@


1.305
log
@make: prefix the warning about read-only .OBJDIR with a colon

For consistency with the other warnings.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.304 2022/02/09 18:54:19 rillig Exp $
d668 1
a668 1
# Each test is run in a sub-make, to keep the tests for interfering with
@


1.304
log
@tests/make: use more distinctive placeholder for TMPDIR
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.303 2022/02/07 22:43:50 rillig Exp $
a690 1
_SED_CMDS+=	-e 's,${TEST_MAKE:T:S,.,\\.,g}[][0-9]* warning,make warning,'
@


1.303
log
@tests/make: demonstrate combination of .USE with transformation rule

Reported in 2003 in PR toolchain/20993.  Linking a transformation rule
with .USE or .USEBEFORE node makes the transformation rule fail.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.302 2022/01/27 21:50:50 sjg Exp $
d698 1
a698 1
_SED_CMDS+=	-e 's,${TMPDIR},TMPDIR,g'
@


1.302
log
@numEntries can vary
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.301 2022/01/27 02:24:46 sjg Exp $
d317 1
@


1.301
log
@Do not allow /usr/obj to cause failure.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.300 2022/01/23 18:00:53 rillig Exp $
d506 1
@


1.300
log
@tests/make: migrate modts to varmod-to-separator and explain
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.299 2022/01/23 16:25:54 rillig Exp $
d516 1
@


1.299
log
@tests/make: rename var-class to var-scope

There is no such concept as a "variable class" in make, these tests
focus on the variable scope instead.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.298 2022/01/23 16:09:38 rillig Exp $
a220 1
TESTS+=		modts
@


1.298
log
@tests/make: extend test suite, move old tests to 2020 scheme

The tests from envfirst.mk are now in opt-env.mk.
The tests from modword.mk are now in varmod-select-words.mk.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.297 2022/01/22 16:23:56 rillig Exp $
d323 6
a328 6
TESTS+=		var-class
TESTS+=		var-class-cmdline
TESTS+=		var-class-env
TESTS+=		var-class-global
TESTS+=		var-class-local
TESTS+=		var-class-local-legacy
@


1.297
log
@tests/make: explore edge cases involving .ifmake
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.296 2022/01/19 22:10:41 rillig Exp $
a194 1
TESTS+=		envfirst
a221 1
TESTS+=		modword
@


1.296
log
@tests/make: demonstrate wrong location in diagnostic (since 2018-12-22)

When a target has multiple places where commands are defined, the
diagnostics mixed up the filename in some cases.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.295 2022/01/11 19:47:34 rillig Exp $
a480 1
FLAGS.directive-ifmake=		first second
@


1.295
log
@tests/make: clean up after test for option '-dF'

When the file for the debug log cannot be opened, make exits
immediately.  This doesn't give the test a chance to clean up the
temporary log file.

Instead of trying to treat a regular file as a directory and create a
file in it, assume that the directory /nonexistent-$uuid is actually
nonexistent.  This leads to the same kind of error message, independent
of strerror(3).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.294 2022/01/09 20:53:53 rillig Exp $
d95 1
@


1.294
log
@tests/make: add placeholders for .PARSEDIR and .INCLUDEDFROMDIR

When run via 'cd usr.bin/make/unit-tests && make test', the tests are in
the current directory.  When run via ATF, the tests are in
/usr/tests/usr.bin/make/unit-tests, while the current directory is a
temporary directory.  Allow both variants, plus others that may occur in
the bmake distribution.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.293 2021/12/28 01:04:03 rillig Exp $
a628 1
CLEANFILES+=		opt-debug-file.debuglog	# test exits before cleaning
@


1.293
log
@tests/make: clean up after test 'opt-debug-file'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.292 2021/12/28 00:56:17 rillig Exp $
d696 3
@


1.292
log
@tests/make: document inconsistencies between '!=' and '::!='

Found while trying to make the error messages from Cmd_Exec more
detailed.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.291 2021/12/23 11:05:59 rillig Exp $
d629 1
@


1.291
log
@tests/make: explain the current behavior of the option '--version'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.290 2021/12/14 00:02:57 rillig Exp $
d345 1
@


1.290
log
@make: remove unreachable code for parsing the dependency operator

At the point where ParseDependencyOp is called, cp is guaranteed to
point to either ':' or '!'.

No functional change.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.289 2021/12/13 23:38:54 rillig Exp $
d278 1
@


1.289
log
@tests/make: extend tests for parsing makefiles
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.288 2021/12/12 22:16:48 rillig Exp $
d97 1
@


1.288
log
@tests/make: test and document the newly added "variable" .SUFFIXES
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.287 2021/12/09 20:47:33 rillig Exp $
d281 1
@


1.287
log
@make: add back support for jemalloc 100

The ports sun2 and vax default to jemalloc 100, as opposed to the rest
of the ports, which use jemalloc 510.  Some developers choose to use
jemalloc 100, so let them run the tests with memory debugging as well.

Suggested by mrg on source-changes-d.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.286 2021/12/05 15:20:13 rillig Exp $
d421 1
a447 1
#	escape-cond-func-arg.mk
@


1.286
log
@make: fix use-after-free in modifier ':@@'

Without memory allocator debugging, the newly added test doesn't show
any obvious failure.

With memory allocator debugging enabled, all make versions since
2016.02.27.16.20.06 crash with a segmentation fault.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.285 2021/12/05 14:57:36 rillig Exp $
d655 2
a656 1
MAKE_TEST_ENV?=	MALLOC_CONF="junk:true"	# for jemalloc
@


1.285
log
@tests/make: migrate to jemalloc > 100

When I started working on usr.bin/make in 2020, I used NetBSD 8, which
used jemalloc 100.

After updating to NetBSD 8 to 9.99.x, the debugging options for jemalloc
stopped working since MALLOC_OPTIONS had been replaced with MALLOC_CONF
in 2019.

Enable malloc debugging again, to reliably reproduce the use-after-free
for the variable modifier ':@@'.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.284 2021/10/19 15:59:26 sjg Exp $
d354 1
@


1.284
log
@Replace ${.OBJDIR} with <curdir> for consistent results.

If we replace ${.OBJDIR} with <objdir> some tests produce
different results depending on the value of .OBJDIR

For similar reasons eliminate .OBJDIR and .PATH from output of
varname-empty

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.283 2021/08/30 17:08:13 rillig Exp $
d654 1
a654 1
MAKE_TEST_ENV?=	MALLOC_OPTIONS="JA"	# for jemalloc
@


1.283
log
@tests/make: explain where "${var}" in .for loops comes from
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.282 2021/07/31 20:55:46 rillig Exp $
d533 1
a533 3
SED_CMDS.varname-empty=		-e 's,${.CURDIR},<curdir>,g'
SED_CMDS.varname-empty+=	-e '/\.PARSEDIR/d'
SED_CMDS.varname-empty+=	-e '/\.SHELL/d'
d690 8
a697 2
# strip ${.CURDIR}/ from the output
_SED_CMDS+=	-e 's,${.CURDIR:S,.,\\.,g}/,,g'
@


1.282
log
@tests/make: split tests for the variable modifier ':O'

The tests for parse errors are now in varmod-order, which lets the other
tests focus on the desired behavior of the modifiers.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.281 2021/07/30 19:55:22 sjg Exp $
d171 1
@


1.281
log
@Add :On for numeric sort

Reviewed by: christos rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.280 2021/06/29 00:35:23 sjg Exp $
d361 1
@


1.280
log
@Allow BROKEN_TESTS to cause TESTS to be skipped.

Some tests simply do not work in some environments.
Eg. shell-ksh on macos/arm64
Allow local site to set BROKEN_TESTS to skip those they know
will not work.

Reviewed by: rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.279 2021/06/16 09:39:48 rillig Exp $
d358 1
@


1.279
log
@tests/make: demonstrate wrong error handling in jobs mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.278 2021/05/18 17:05:45 sjg Exp $
d432 6
@


1.278
log
@Do not trust that /nonexistent does not exist

Use /nonexistent.${.MAKE.PID} to avoid failure when
/nonexistent actually exists.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.277 2021/04/27 16:20:06 rillig Exp $
d209 1
@


1.277
log
@tests/make: test the combination of -de with -j1

The test cases are the same as in opt-debug-errors.mk.  The output
differs in several details though.

Even though the option '-k' is given (which is the default for any tests
that don't override it in unit-tests/Makefile), there is no message
"(continuing)" anywhere.

The failed target is printed twice.  Once before the failed commands,
once after.  This redundancy is not necessary and may be removed in a
follow-up commit.

The printed commands are in their unexpanded form, which may or may not
be more helpful than the expanded and space-normalized form of compat
mode.  Either way, this is an unnecessary inconsistency between compat
mode and jobs mode.

In jobs mode, the message "make: stopped in $dir" is printed for each
failure, which is helpful since each of the jobs may have started in a
separate directory.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.276 2021/04/15 19:02:29 rillig Exp $
d490 1
@


1.277.2.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.278 2021/05/18 17:05:45 sjg Exp $
a489 1
SED_CMDS.opt-chdir=		-e 's,\(nonexistent\).[1-9][0-9]*,\1,'
@


1.276
log
@tests/make: demonstrate handling of null bytes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.275 2021/04/04 13:20:52 rillig Exp $
d233 1
@


1.275
log
@tests/make: split test for modifier ':@@' into separate files

The file varmod-loop.mk has grown too large to be single-purpose, plus
it combined parse-time and run-time tests.  This has the downside that
as soon as a parse-time test results in an error, the run-time tests are
not run anymore.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.274 2021/04/03 11:08:40 rillig Exp $
d207 1
@


1.274
log
@make: use C99 bool type instead of defining its own

No functional change.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.273 2021/03/14 11:49:37 rillig Exp $
d350 1
@


1.273
log
@tests/make: add test for short-circuit evaluation of modifiers
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.272 2021/03/14 10:45:51 rillig Exp $
d500 1
a500 1
# For Compat_RunCommand, useShell == FALSE.
d502 1
a502 1
# For Compat_RunCommand, useShell == TRUE.
@


1.272
log
@make: demonstrate wrong expression evaluation in -dL mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.271 2021/02/14 20:16:17 rillig Exp $
d323 1
@


1.271
log
@make: add test for the variable modifier ':sh'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.270 2021/02/14 13:24:45 rillig Exp $
d496 1
d512 1
a512 2
SED_CMDS.varmod-subst-regex+= \
			-e 's,\(Regex compilation error:\).*,\1 (details omitted),'
d590 5
@


1.270
log
@make: fix TMPDIR in unit-tests

Combining the assignment operator ':=' with the variable modifier ':U'
on the same variable does not work as intended.  At the point where the
':U' is evaluated, the variable is guaranteed to be defined because the
code in VarAssign_EvalSubst says so.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.269 2021/02/06 18:26:03 sjg Exp $
d365 1
@


1.269
log
@Avoid test failures when more than one user run them.

Use a private  TMPDIR
a subdir of .OBJDIR if using it
otherwise /tmp/uid${.MAKE.UID}
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.268 2021/02/04 00:16:03 rillig Exp $
d625 2
d628 1
a628 1
TMPDIR:=	${TMPDIR:U/tmp}/uid${.MAKE.UID}
@


1.268
log
@make: remove .PARSEDIR from test output of varname-empty

The .PARSEDIR has nothing to do with .CURDIR.  This wrong assumption
made the NetBSD test suite fail since the actual .PARSEDIR was not
replaced with "<curdir>".
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.267 2021/02/03 08:34:15 rillig Exp $
d34 2
a445 5
.if ${.OBJDIR} != ${.CURDIR}
RO_OBJDIR:=	${.OBJDIR}/roobj
.else
RO_OBJDIR:=	${TMPDIR:U/tmp}/roobj
.endif
a449 1
ENV.objdir-writable+=	RO_OBJDIR=${RO_OBJDIR}
a484 1
SED_CMDS.objdir-writable=	-e 's,${RO_OBJDIR},OBJDIR/roobj,g'
a590 2
.MAIN: all

d619 14
d634 1
d668 1
@


1.267
log
@make: in the test varname-empty, keep more debug output

Filtering out the interesting lines based on the very specific pattern
"Var_Set" was surprising.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.266 2021/02/02 17:27:35 rillig Exp $
d523 1
@


1.266
log
@make: demonstrate that neither -dg2 nor -dg3 produces debug output
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.265 2021/02/01 20:31:41 rillig Exp $
d522 2
a527 1
POSTPROC.varname-empty=		${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p'
@


1.265
log
@make: add test for reading from make's stdin

Just out of curiosity whether that really works.  It does.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.264 2021/01/30 12:46:38 rillig Exp $
d491 2
d544 5
@


1.264
log
@make(1): add test for combining the options -j, -n, -t

This is a preparation for refactoring the complicated condition in
JobStart.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.263 2021/01/29 22:38:17 rillig Exp $
d49 1
@


1.263
log
@make(1): demonstrate unnecessary creation of empty files in jobs mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.262 2021/01/23 07:34:00 rillig Exp $
d261 1
@


1.262
log
@make(1): fix unit tests for dash and bash 5.1
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.261 2021/01/19 05:49:33 rillig Exp $
d204 1
@


1.261
log
@make(1): normalize shell error messages in tests

Newly supported is bash, which outputs "bash: line 123".
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.260 2020/12/31 03:05:12 rillig Exp $
d560 2
a561 1
#	bash 5		bash: line 1: ...: command not found
d567 2
a568 1
#	bash 5		bash: line 1: /nonexistent: No such file or directory
d571 6
d578 2
a579 2
STD_SED_CMDS.shell+=		-e 's,^${.SHELL:T}: line [0-9][0-9]*:,,'
STD_SED_CMDS.shell+=		-e 's,^${.SHELL:T}: [0-9][0-9]*:,,'
@


1.260
log
@make(1): add test for error handling and expansion in .for loops
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.259 2020/12/30 14:50:08 rillig Exp $
d507 3
a509 4
SED_CMDS.var-op-shell+=	\
	-e 's,^${.SHELL:T}: [ 0-9:]*,,' \
	-e '/command/s,No such.*,not found,'
SED_CMDS.vardebug+=	-e 's,${.SHELL},</path/to/shell>,'
d555 19
@


1.259
log
@make(1): add test for .endfor without corresponding .for
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.258 2020/12/29 01:45:06 rillig Exp $
d165 2
@


1.258
log
@make(1): add test that explains how variables are exported

Exporting the variables at the right time and with the correct values is
a subtle issue.  The current implementation carefully marks variables as
ready to be exported, then exports them and at the same time tries to
export as few variables as possible, to avoid memory leaks.  This test
describes and explains how all this works in detail.

This test also justifies that the call to Var_ReexportVars happens in
the make process itself, not in the child processes, no matter whether
these are created with vfork or (only theoretically) with plain fork.
This has changed in compat.c 1.217, job.c 1.390 and main.c 1.504 from
2020-12-27.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.257 2020/12/27 05:11:40 rillig Exp $
d156 1
@


1.257
log
@make(1): add test for expansion errors in jobs mode

Since compat mode and jobs mode are implemented separately and vary in
lots of small details, each of them needs to be tested on its own.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.256 2020/12/21 20:47:29 rillig Exp $
d160 1
@


1.256
log
@make(1): align tests for :localtime with those for :gmtime

These tests had been almost the same before, now they are as similar as
possible again.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.255 2020/12/21 20:35:17 rillig Exp $
d45 1
@


1.255
log
@make(1): move tests for :gmtime to parse time

It's easier to have both the expressions and the expected values in a
single file.  This also allows for flexible handling of multiple
acceptable outputs, in this case for 32-bit time_t.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.254 2020/12/21 18:22:31 sjg Exp $
a505 3
SED_CMDS.varmod-localtime+=	-e 's,Tue Jan 19 04:14:08 2038,<normalized>,'
SED_CMDS.varmod-localtime+=	${:D FreeBSD i386 still has 32-bit time_t. }
SED_CMDS.varmod-localtime+=	-e 's,Fri Dec 13 21:45:52 1901,<normalized>,'
@


1.254
log
@Set default for .MAKE.OS once
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.253 2020/12/20 19:37:23 rillig Exp $
a505 3
SED_CMDS.varmod-gmtime+=	-e 's,Tue Jan 19 03:14:08 2038,<normalized>,'
SED_CMDS.varmod-gmtime+=	${:D FreeBSD i386 still has 32-bit time_t. }
SED_CMDS.varmod-gmtime+=	-e 's,Fri Dec 13 20:45:52 1901,<normalized>,'
@


1.253
log
@make(1): include line numbers in output of test varmod-edge.mk

Suppressing the line numbers does not provide much benefit, given that
the test file doesn't change often.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.252 2020/12/19 16:00:17 rillig Exp $
d34 2
a35 1
# we use this below but we might be an older make
d591 1
a591 1
.if ${.MAKE.OS:U${uname -s:L:sh}} == "NetBSD"
@


1.252
log
@make(1): add test for null byte in .for loop body
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.251 2020/12/19 12:14:59 rillig Exp $
a504 1
SED_CMDS.varmod-edge+=	-e 's, line [0-9]*:, line omitted:,'
@


1.251
log
@make(1): demonstrate wrong line numbers in .for loops, since 2007-01-01
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.250 2020/12/14 20:23:50 rillig Exp $
d163 1
@


1.250
log
@make(1): add test for parsing the end of a condition
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.249 2020/12/13 17:44:31 rillig Exp $
d162 1
@


1.249
log
@make(1): demonstrate wrong error handling in compat mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.248 2020/12/13 05:13:38 sjg Exp $
d59 1
@


1.248
log
@Prune job debug output that may appear out of order.

A race between child and parent means that we cannot
guarantee whether all child output is seen before we call
JobClosePipes, thus intervening debug output can appear
before or after the last child output.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.247 2020/12/13 02:09:33 sjg Exp $
d49 1
@


1.247
log
@Ensure we have a value for .MAKE.UID
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.246 2020/12/13 00:46:25 rillig Exp $
d540 1
a543 2
	-e 's,^\(Process\) [0-9][0-9]*,\1 <pid>,' \
	-e 's,^\(JobFinish:\) [0-9][0-9]*,\1 <pid>,' \
@


1.246
log
@make(1): add test for misspelled directives

This test allows the other directive-* tests to focus on the purpose of
the individual directive, allowing these tests to continue after
parsing, without errors.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.245 2020/12/12 15:06:11 rillig Exp $
d34 3
d205 1
a205 1
.if ${.MAKE.UID:U0} > 0
@


1.245
log
@make(1): add test for a shell with error control

None of the predefined shells has error control, and the corresponding
code had not been covered by the existing unit tests.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.244 2020/12/10 17:06:13 rillig Exp $
d167 1
@


1.244
log
@make(1): test all combinations of switches for running commands

The code in JobPrintSpecials is rather complicated and contains
surprising interaction between some of the switches.

To see the exact effects of the switches, record the current state and
its output, to prevent accidental breakage during the upcoming
refactorings.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.243 2020/12/09 08:18:35 rillig Exp $
d265 1
d488 1
d526 1
a526 1
# Omit details from the output of the -dg1 option such as process IDs.
d534 9
@


1.243
log
@make(1): remove noise from test output of opt-jobs-no-action
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.242 2020/12/09 07:57:52 rillig Exp $
d265 1
d487 1
@


1.242
log
@make(1): add test for the -n option combined with RunFlags
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.241 2020/12/09 00:25:00 rillig Exp $
d479 2
a480 4
SED_CMDS.opt-no-action-runflags= \
	-e '/^echo hide-from-output/d' \
	-e 's,hide-from-output ,,' \
	-e 's,hide-from-output,,'
d530 7
@


1.241
log
@make(1): add test for combining -j1 with -n
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.240 2020/12/07 22:27:56 rillig Exp $
d245 1
d479 4
@


1.240
log
@make(1): normalize output of test sh-dots for non-native mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.239 2020/12/07 21:35:43 rillig Exp $
d239 1
@


1.239
log
@make(1): add tests and tutorial for the ?= assignment operator
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.238 2020/12/07 01:32:04 rillig Exp $
d477 5
a481 1
SED_CMDS.sh-dots=		-e 's,^.*\.\.\.:.*,<normalized: ...: not found>,'
@


1.238
log
@make(1): add test for wrong exit status 0 after failed targets with -k
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.237 2020/12/06 21:22:04 rillig Exp $
a259 1
TESTS+=		qequals
@


1.237
log
@make(1): add test for .END after failed main node
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.236 2020/12/05 03:42:15 sjg Exp $
d240 1
@


1.236
log
@Use .MAKE.OS if we can
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.235 2020/12/04 14:28:50 rillig Exp $
d118 1
@


1.235
log
@make(1): use fixed format for debug output of the directory cache

The previous output format had a %-20s conversion specifier.  This
produced different output depending on the length of the pathname, which
was too difficult to normalize.  By moving the directory name to the
end, it is no longer necessary to fill up any space, and the numbers are
always aligned properly.

As a result, 3 of the unit tests no longer need any special
postprocessing of their output.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.234 2020/12/01 22:16:36 rillig Exp $
d555 1
a555 1
.if ${:!uname -s!} == "NetBSD"
@


1.234
log
@make(1): add test and tutorial for indirect modifiers
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.233 2020/12/01 20:37:30 rillig Exp $
d500 3
a502 6
POSTPROC.deptgt-suffixes= awk '/^\#\*\*\* Suffixes/,/^never-stop/'
POSTPROC.gnode-submake=	awk '/Input graph/, /^$$/'
POSTPROC.opt-debug-graph1=	${STD_POSTPROC.dg1}
POSTPROC.varname-empty=	${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p'
POSTPROC.suff-main-several=	${STD_POSTPROC.dg1}
POSTPROC.suff-transform-debug=	${STD_POSTPROC.dg1}
d514 2
a515 1
STD_SED_CMDS.dg1=	-e 's,${.CURDIR},<curdir>,'
a520 4
# The layout of the lines in the directory cache vary depending on the path
# length, which cannot be predicted.  Therefore omit these lines.
STD_POSTPROC.dg1=	awk '/Directory Cache/,/^$$/ { next } { print }'

@


1.233
log
@make(1): add test for the special .MAKEFLAGS variable
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.232 2020/12/01 17:50:04 rillig Exp $
d321 1
@


1.232
log
@make(1): add tests for suppressing "stopped in"

These tests demonstrate the unwanted behavior described in PR bin/55578
and PR bin/55832.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.231 2020/11/30 21:10:15 rillig Exp $
d378 1
@


1.231
log
@make(1): fix tests for :gmtime and :localtime for 32-bit time_t

https://bugs.freebsd.org/251465
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.230 2020/11/30 18:32:49 sjg Exp $
d189 3
d439 7
a445 4
FLAGS.cond-func-make=	via-cmdline
FLAGS.directive-ifmake=	first second
FLAGS.doterror=		# none, especially not -k
FLAGS.varname-empty=	-dv '$${:U}=cmdline-u' '=cmdline-plain'
@


1.230
log
@Add some tests for meta mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.229 2020/11/29 18:49:36 rillig Exp $
d476 7
a484 1
SED_CMDS.varmod-edge+=	-e 's, line [0-9]*:, line omitted:,'
@


1.229
log
@make(1): clean up memory management for CachedDirs

Previously, the reference count for a newly created CacheDir had been
set to 1 in CacheNewDir.  This was wrong because at that point, the
object had not been referenced by any nonlocal variable.  The reference
count is no longer incremented at this point.

All callers of CacheNewDir either append the newly created CachedDir to
a SearchPath via Lst_Append and CachedDir_Ref, or they assign it to a
global variable via CachedDir_Assign.

Since the reference count is no longer wrongly incremented, it does not
need to be decremented more than necessary in Dir_End.  To keep the code
simple and maintainable, all assignments to global variables are now
handled by CachedDir_Assign.  Adding a CachedDir to a list is still done
manually via Lst_Append, and the corresponding code for decrementing is
in SearchPath_Clean and SearchPath_Free.  These details may be cleaned
up in a follow-up commit.

As a result, when OpenDirs_Done is called in the unit tests, the list of
open directories is empty.  It had been non-empty in a single unit test
before (dep-wildcards.mk), as a result of calling Dir_Expand.

The additional debug logging for the reference counting is not enabled
by default since it contains memory addresses, which makes the output
dependent on the memory allocator.

The function CachedDir_Destroy has been merged into CachedDir_Undef,
which had only been used in Dir_End before.  The new name emphasizes
that it corresponds to CachedDir_Ref.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.228 2020/11/29 14:29:19 rillig Exp $
d191 1
@


1.228
log
@make(1): add debug logging for OpenDirs_Done
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.227 2020/11/29 10:57:16 rillig Exp $
d443 1
a443 1
SED_CMDS.dir+=		-e '/^CachedDir refCount/d'
@


1.227
log
@make(1): add debug logging for reference counting of CachedDir
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.226 2020/11/25 00:50:44 sjg Exp $
d442 1
@


1.226
log
@Add .MAKE.UID and .MAKE.GID
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.225 2020/11/25 00:32:18 sjg Exp $
d441 2
@


1.225
log
@access(2) does not work for root, so skip objdir-writable
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.224 2020/11/24 19:02:59 rillig Exp $
d196 1
a196 1
.if ${id -u:L:sh} > 0
@


1.224
log
@make(1): add test for bug in error handling of .BEGIN in -k mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.223 2020/11/24 17:59:42 rillig Exp $
d196 1
d198 1
@


1.223
log
@make(1): add test for error in dependency of .END node in -k mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.222 2020/11/24 15:36:51 rillig Exp $
d112 2
@


1.222
log
@make(1): add test for missing "Stop" after error in .END
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.221 2020/11/23 16:01:59 rillig Exp $
d116 1
@


1.221
log
@make(1): make output of test opt-debug-graph1 consistent

The output from the directory cache made the regular NetBSD build fail
because the pathname to the working directory differs, thus affecting
the spacing.

This time, document why the directory cache needs to be excluded from
the output.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.220 2020/11/23 15:00:32 rillig Exp $
d115 1
@


1.220
log
@make(1): test that .PHONY targets are not resolved using suffix rules
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.219 2020/11/22 23:45:20 rillig Exp $
d478 1
a479 1
# The directory cache contains the hard-coded '/usr/share/mk'.
d498 3
@


1.219
log
@make(1): add test for debug output from transformation rules
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.218 2020/11/22 20:36:17 rillig Exp $
d271 1
@


1.218
log
@make(1): add another unit test for suffix handling
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.217 2020/11/22 19:37:27 rillig Exp $
d273 1
a449 1
SED_CMDS.sh-dots=		-e 's,^.*\.\.\.:.*,<normalized: ...: not found>,'
d457 1
d460 1
d479 2
a480 1
POSTPROC.suff-main-several=	awk '/Directory Cache/,/^$$/ { next } { print }'
d497 1
@


1.217
log
@make(1): document the selection of the main target
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.216 2020/11/22 18:44:10 rillig Exp $
d270 1
d458 1
d476 2
@


1.216
log
@make(1): make configuration of export tests simpler

The configuration section of unit-tests/Makefile is already complicated
enough to read, due to the excessive use of regular expressions.
Therefore, to keep the structuring elements at a minimum, inline the
.for loop.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.215 2020/11/22 18:25:43 rillig Exp $
d61 1
@


1.215
log
@make(1): add more output to test for -dg1

Previously, the variables section had been omitted.  This was because
the variables had been output in hashcode order until 2020-10-18, and
because some of the variable values are specific to the test environment
or the individual run (MACHINE_ARCH, MAKE.PPID).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.214 2020/11/21 21:41:27 rillig Exp $
d431 3
a433 6
SED_CMDS.export= \
	-e '/^[^=_A-Za-z0-9]*=/d'
# these all share the same requirement
.for t in export-all export-env
SED_CMDS.$t= ${SED_CMDS.export}
.endfor
@


1.214
log
@make(1): capture more output from test deptgt-suffixes

This will have an effect with the next commit.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.213 2020/11/21 17:44:40 rillig Exp $
d448 3
a450 6
SED_CMDS.objdir-writable= -e 's,${RO_OBJDIR},OBJDIR/roobj,g'
SED_CMDS.opt-debug-graph1= \
			-e 's,${.CURDIR},CURDIR,'
SED_CMDS.opt-debug-graph1+= \
			-e '/Global Variables:/,/Suffixes:/d'
SED_CMDS.sh-dots=	-e 's,^.*\.\.\.:.*,<normalized: ...: not found>,'
d458 1
d484 11
@


1.213
log
@make(1): limit memory usage in tests

There is a suspicious condition in SuffUpdateTarget code that looks wrong
on the first sight.  When removing it though, make allocates huge amounts
of memory.  To stop freezing the whole machine in this situation, limit
the total memory.

The limit of 200000 has been determined experimentally on NetBSD 8.0
x86_64.  With a limit of 100000, make wouldn't even start.  100 MB of
memory is really a lot for such a simple program that according to top(1)
only needs 8 MB.  But 200 MB is still better than 5 GB.

Since the Makefile is used on other platforms as well, via the bmake
distribution, and since every operating system has its own list of ulimit
options, make this configurable.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.212 2020/11/21 10:32:42 rillig Exp $
d475 1
a475 2
POSTPROC.deptgt-suffixes= \
			${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p'
@


1.212
log
@make(1): add test for incomplete transformation rule
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.211 2020/11/19 23:50:26 rillig Exp $
d519 5
d531 1
@


1.211
log
@make(1): fix test opt-debug-jobs for native shell

Even after substituting the actual shell name with <shell>, the trailing
optional -q option needs to be normalized.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.210 2020/11/19 21:46:10 rillig Exp $
d266 1
@


1.210
log
@make(1): fix test opt-debug-jobs when compiled with dash as shell

make USER_CPPFLAGS=-DDEFSHELL_CUSTOM='\"/usr/pkg/bin/dash\"'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.209 2020/11/19 21:39:50 rillig Exp $
d459 1
a459 1
SED_CMDS.opt-debug-jobs+=	-e 's,^\(.Command: sh\) -q,\1,'
@


1.209
log
@make(1): remove redundant postprocessing for test var-op-shell

The regular expression from the previous line already matches everything
that the removed line could ever match.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.208 2020/11/19 21:35:46 rillig Exp $
d457 1
@


1.208
log
@make(1): remove postprocessing for test directive-export-gmake

Since revision 1.3, directive-export-gmake.mk takes care of handling this
case.  Removing the "error" lines from the output of the tests only makes
the test harder to understand and may also hide future bugs.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.207 2020/11/18 04:10:34 sjg Exp $
a460 1
	-e 's,^${.SHELL:T}: ,,' \
@


1.207
log
@Cleanup - colliding fixes for same issue
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.206 2020/11/18 01:12:00 sjg Exp $
a435 3
SED_CMDS.directive-export-gmake= \
	${:D dash is a pain } \
	-e /non-zero/d
@


1.206
log
@Some tests need help with dash
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.205 2020/11/17 20:27:35 rillig Exp $
d431 1
a431 1
       -e '/^[^=_A-Za-z0-9]*=/d'
d462 4
a465 5
SED_CMDS.var-op-shell+=	-e 's,^${.SHELL:T}: [ 0-9:]*,,'
SED_CMDS.var-op-shell+=	-e '/command/{ s,^[1-9]: ,,;s,No such.*,not found,; }'
SED_CMDS.vardebug= \
	${:D canonicalize .SHELL } \
	-e 's,${.SHELL},/bin/sh,'
@


1.205
log
@make(1): make test vardebug independent from the shell
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.204 2020/11/17 20:19:24 rillig Exp $
d430 9
d463 4
a466 1
SED_CMDS.var-op-shell+=	-e '/command/s,No such.*,not found,'
@


1.204
log
@make(1): fix test output of var-op-shell for dash

Dash is helpful and outputs the line number in case of an error.  The
other shells don't do this.  Accept both variants.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.203 2020/11/16 15:12:16 rillig Exp $
d455 1
@


1.203
log
@make(1): add test for self-referencing suffix rule

Just to ensure that make doesn't run into an endless loop.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.202 2020/11/15 20:50:46 rillig Exp $
d453 1
a453 1
SED_CMDS.var-op-shell+=	-e 's,^${.SHELL:T}: ,,'
@


1.202
log
@make(1): fix typo in test for variable with empty name
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.201 2020/11/15 20:20:58 rillig Exp $
d269 1
@


1.201
log
@make(1): update and add comments in tests

As a result of the new comments, some line numbers have changed in the
output of the tests.  No other changes.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.200 2020/11/14 18:07:26 rillig Exp $
d426 1
a426 1
FLAGS.varname-empty=	-dv '$${:U}=cmdline-u' '=cmline-plain'
@


1.200
log
@make(1): use progname instead of hard-coded 'make' in warning

This only affects the warning that chdir to objdir failed.  In sub-makes
the progname includes the [n], allowing to narrow down the actual cause
of the problem.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.199 2020/11/14 15:35:20 rillig Exp $
d384 20
@


1.199
log
@make(1): add test for the -t option in jobs mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.198 2020/11/12 23:35:21 sjg Exp $
d510 2
@


1.198
log
@Pass a writable flag to Main_SetObjdir to control writable check

For curdir and an explicit .OBJDIR target, we allow for
the directory to be read-only.
During InitObjdir we otherwise default to requiring objdir to be
writable - this can be controlled by env variable
MAKE_OBJDIR_CHECK_WRITABLE

Add unit-tests/objdir-writable

Reviewed by: christos rillig
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.197 2020/11/10 22:23:37 rillig Exp $
d235 1
@


1.197
log
@make(1): add more tests for parsing .if directives

The details of parsing are quite tricky and not documented in the manual
page.  Record the current behavior to be a little safer in future
refactorings.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.196 2020/11/10 00:19:19 rillig Exp $
d191 1
d383 5
d392 1
d419 1
@


1.196
log
@make(1): add test for the obsolete variable VPATH
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.195 2020/11/09 20:50:56 rillig Exp $
d153 1
@


1.195
log
@make(1): in tests, move command line arguments into the test proper
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.194 2020/11/09 20:39:46 rillig Exp $
d389 1
@


1.194
log
@make(1): move test for != assignments to var-op-shell
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.193 2020/11/09 19:12:52 sjg Exp $
d395 1
a395 13
FLAGS.doterror=		# none
FLAGS.envfirst=		-e
FLAGS.export=		# none
FLAGS.opt-ignore=	-i
FLAGS.opt-keep-going=	-k
FLAGS.opt-no-action=	-n
FLAGS.opt-query=	-q
FLAGS.opt-var-expanded=	-v VAR -v VALUE
FLAGS.opt-var-literal=	-V VAR -V VALUE
FLAGS.opt-warnings-as-errors= -W
FLAGS.order=		-j1
FLAGS.recursive=	-dL
FLAGS.sh-leading-plus=	-n
@


1.193
log
@Control TZ for depsrc-optional
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.192 2020/11/08 23:54:28 rillig Exp $
a379 1
TESTS+=		varshell
d383 1
a388 1
ENV.depsrc-optional+=   TZ=UTC
d433 2
a437 2
SED_CMDS.varshell+=	-e 's,^${.SHELL:T}: ,,'
SED_CMDS.varshell+=	-e '/command/s,No such.*,not found,'
@


1.192
log
@make(1): in lint mode, only allow '&&' and '||', not '&' and '|'

These variants of the condition operators are neither documented in the
manual page nor are they used in practice.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.191 2020/11/08 16:44:47 rillig Exp $
d389 1
@


1.191
log
@make(1): add test for expanding variable expressions
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.190 2020/11/07 23:25:06 rillig Exp $
d65 1
d68 1
@


1.190
log
@make(1): add test for OP_SUBMAKE
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.189 2020/11/07 20:01:17 rillig Exp $
d374 1
@


1.189
log
@make(1): add test for job command flags
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.188 2020/11/04 04:24:57 rillig Exp $
d175 1
d444 1
@


1.188
log
@make(1): add test for undefined variables in command line arguments

The variable discardUndefined has an implicit negation in its name,
which makes it hard to understand.  Plus, most of the time it is true.
It's better to have a flag that is false most of the time and has a
positive name.

On the first attempt of inverting that variable, I stumbled upon
MainParseArgs, which initially leaves discardUndefined == FALSE, and
after handling the dashed options, sets it to TRUE.  This would make a
difference when more command line arguments would be added later via the
.MAKEFLAGS special target.

Upon further inspection, the only place where discardUndefined is used
is in VarAssign_EvalSubst in parse.c, and that place is not reachable
from any of the dashed options.  Therefore, discardUndefined could
already be set at the very beginning of MainParseArgs or even when
initializing the global variable itself, without any observable
difference.

Not even the ::= variable modifier could do anything about this since it
is not reachable from the dashed command line options as well, and in
addition, it expands its right-hand side in any case, always discarding
undefined variables.  Oh, these little inconsistencies everywhere.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.187 2020/11/03 17:17:31 rillig Exp $
d178 1
@


1.187
log
@make(1): move tests from directives.mk to separate tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.186 2020/11/02 21:53:28 rillig Exp $
d44 1
@


1.186
log
@make(1): remove obsolete POSTPROC.varname from unit tests

It was not needed anymore since 2020-10-18.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.185 2020/11/02 20:43:27 rillig Exp $
a161 1
TESTS+=		directives
@


1.185
log
@make(1): add test for parse errors in commands in lint mode (-dL)

The difference to non-lint mode is that the exit status is now 2 instead
of 0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.184 2020/11/02 20:40:10 rillig Exp $
a441 1
POSTPROC.varname=	${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p'
@


1.184
log
@make(1): remove debugging code from sync-mi
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.183 2020/11/02 20:20:42 rillig Exp $
d41 1
@


1.183
log
@make(1): add test for parse errors in shell commands, compat mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.182 2020/11/02 20:19:33 rillig Exp $
a550 1
	echo $$?; \
@


1.182
log
@make(1): handle errors when sync-mi fails because of a syntax error
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.181 2020/11/01 19:02:22 rillig Exp $
d40 1
@


1.181
log
@make(1): move test flags to test varmod-match-escape.mk
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.180 2020/10/31 20:30:06 rillig Exp $
d547 5
a551 2
	(cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi"; \
	distrib/sets/fmt-list "$$mi";					\
@


1.180
log
@make(1): add more tests for the variable modifier :localtime
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.179 2020/10/31 11:30:57 rillig Exp $
a400 1
FLAGS.varmod-match-escape= -dv
a439 1
POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p'
@


1.179
log
@make(1): add test for recursive variable expressions
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.178 2020/10/31 11:06:24 rillig Exp $
d381 1
@


1.178
log
@make(1): merge the SysV modifier tests into varmod-sysv
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.177 2020/10/30 15:03:58 rillig Exp $
d281 1
@


1.177
log
@make(1): move test flags for varname-dot-shell to the test itself
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.176 2020/10/29 18:19:41 rillig Exp $
a263 1
TESTS+=		sysv
@


1.176
log
@make(1): move MAKEFLAGS handling in vardebug test to the test itself
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.175 2020/10/24 02:25:02 rillig Exp $
a400 1
FLAGS.varname-dot-shell= -dpv
d433 3
a435 3
SED_CMDS.varname-dot-shell=	-e 's, = /.*, = (details omitted),'
SED_CMDS.varname-dot-shell+=	-e 's,"/[^"]*","(details omitted)",'
SED_CMDS.varname-dot-shell+=	-e 's,\[/[^]]*\],[(details omitted)],'
a441 2
POSTPROC.varname-dot-shell= \
			awk '/\.SHELL/ || /^ParseReadLine/'
@


1.175
log
@make(1): add test for looking up suffixes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.174 2020/10/23 19:54:35 rillig Exp $
a399 1
FLAGS.vardebug=		-k -dv FROM_CMDLINE=
a440 1
POSTPROC.vardebug=	${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
@


1.174
log
@make(1): add test for dependencies of the form '%.o: %.c'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.173 2020/10/23 19:23:01 rillig Exp $
d257 1
@


1.173
log
@make(1): add test case in which .BEGIN depends on .END

Just for fun.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.172 2020/10/23 19:11:30 rillig Exp $
d81 1
@


1.172
log
@make(1): add test for the '::' dependency operator
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.171 2020/10/23 14:38:39 rillig Exp $
d84 1
@


1.171
log
@make(1): move tests from cond2.mk to varmod-ifelse.mk (fixup)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.170 2020/10/23 06:18:23 rillig Exp $
d78 1
@


1.170
log
@make(1): add test for .ERROR_CMD in jobs mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.169 2020/10/20 20:36:53 rillig Exp $
a71 1
TESTS+=		cond2
@


1.169
log
@make(1): split test suffixes.mk into simpler, isolated tests

The code in suff.c is already hard to understand, and so were the tests
in suffixes.mk since several independent topics were merged into a
single test.

Splitting this test into a separate test per issue allows to document
the expected and actual behavior in more detail.  That's complicated
enough already.

PR bin/49086
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.168 2020/10/18 22:55:52 sjg Exp $
d361 1
@


1.168
log
@In meta mode we do not have to re-run all tests when Makefile is touched
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.167 2020/10/18 16:33:18 rillig Exp $
d252 3
a254 1
TESTS+=		# suffixes	# runs into an endless loop (try -dA)
d257 3
@


1.167
log
@make(1): add test for turning a target into a transformation
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.166 2020/10/17 16:53:26 rillig Exp $
d549 6
a554 1
${TESTS:=.rawout}: ${TEST_MAKE} ${.PARSEDIR}/Makefile
@


1.166
log
@make(1): document why the ampersand is not listed in export.exp
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.165 2020/10/10 19:25:19 sjg Exp $
d253 1
@


1.165
log
@Limit output of export tests to POSIX compatible env vars
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.164 2020/10/08 19:11:35 rillig Exp $
a395 6
SED_CMDS.export= \
	-e '/^[^=_A-Za-z0-9]*=/d'
# these all share the same requirement
.for t in export-all export-env
SED_CMDS.$t= ${SED_CMDS.export}
.endfor
@


1.164
log
@make(1): remove test misc.mk from Makefile
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.163 2020/10/08 17:54:20 rillig Exp $
d396 6
@


1.163
log
@make(1): fix test opt-debug-jobs on non-native platforms
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.162 2020/10/05 19:27:48 rillig Exp $
a176 1
TESTS+=		misc
@


1.162
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.160 2020/10/04 06:53:15 rillig Exp $
d417 2
@


1.161
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.156 2020/10/02 20:34:59 rillig Exp $
d171 1
d233 1
d249 4
d273 1
d413 4
@


1.160
log
@make(1): add tests for parsing assignments, especially :sh

Luckily nobody uses the :sh variable assignment modifier since its
syntactical variant != is simpler.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.159 2020/10/03 17:30:54 rillig Exp $
a170 1
TESTS+=		hanoi-include
a231 1
TESTS+=		parse-var
a246 4
TESTS+=		shell-csh
TESTS+=		shell-custom
TESTS+=		shell-ksh
TESTS+=		shell-sh
a266 1
TESTS+=		var-op-sunsh
a405 4
SED_CMDS.opt-debug-jobs=	-e 's,([0-9][0-9]*),(<pid>),'
SED_CMDS.opt-debug-jobs+=	-e 's,pid [0-9][0-9]*,pid <pid>,'
SED_CMDS.opt-debug-jobs+=	-e 's,Process [0-9][0-9]*,Process <pid>,'
SED_CMDS.opt-debug-jobs+=	-e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,'
@


1.159
log
@make(1): add test demonstrating the Towers of Hanoi puzzle

It's not the primary task of make to handle procedure calls with
parameters, combined with lexical scoping, therefore the code does not
look as straight-forward or clean as in other programming languages.  It
feels more like squeezing a programming problem from the imperative
world into the world of declarative dependencies.

A more idiomatic way of implementing this puzzle should be as a
dependency graph since that's both the natural structure of the puzzle
and the primary domain of make.  Something like having a main target
"hanoi-5" that depends on intermediate targets of the form
"move-1.2.3.4.5-_._._._._-_._._._._", each representing a single
configuration of the stacks.  These targets could be generated
dynamically.  A benefit of this implementation would be that the puzzle
could be resumed from an arbitrary configuration, just just from the
initial configuration.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.158 2020/10/03 14:39:36 rillig Exp $
d233 1
d273 1
@


1.158
log
@make(1): add tests for the various supported shells
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.157 2020/10/03 08:16:53 rillig Exp $
d171 1
@


1.157
log
@make(1): add test for the -dj debug option
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.156 2020/10/02 20:34:59 rillig Exp $
d247 4
@


1.156
log
@make(1): add tests for parsing and exporting variables

Once again, there are a few surprises deeply hidden inside the edge
cases.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.155 2020/09/29 18:16:24 rillig Exp $
d406 4
@


1.155
log
@make(1): fix test job-output-long-lines

The test failed on Linux since the test relied on the two child
processes interleaving each other.  This is not guaranteed to happen
though.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.154 2020/09/27 20:11:34 rillig Exp $
d140 1
d354 1
@


1.154
log
@make(1): add test for merging long lines of job output
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.153 2020/09/27 13:18:30 rillig Exp $
d388 11
a417 2
POSTPROC.job-output-long-lines= \
			awk '/^[ab]+--- job-[ab] ---/ { print "bad"; exit }'
@


1.153
log
@make(1): run tests with jemalloc debugging enabled

This protects against very simple memory allocation bugs such as
migrating Lst_ForEachUntil to Lst_ForEach without remembering that
Lst_ForEachUntil can handle the situation where the current list node is
removed from the list, but Lst_ForEach cannot.  This happens in
Make_ExpandUse, for example.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.152 2020/09/25 23:24:49 rillig Exp $
d172 1
d407 2
@


1.152
log
@make(1): add test for harmless bug in Parse_File

When there is a dependency group at the end of a top-level makefile,
this dependency group is not finished properly.  This allows to add
further commands to the targets of this dependency group, which was not
intended.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.151 2020/09/25 20:11:06 rillig Exp $
d450 2
d460 1
a460 1
	env -i PATH="$$PATH" ${ENV.${.PREFIX:T}} \
@


1.151
log
@make(1): add test for make() function in conditions
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.150 2020/09/25 18:18:25 rillig Exp $
d77 1
@


1.150
log
@make(1): add test for deleting the suffixes during parsing
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.149 2020/09/25 05:56:59 rillig Exp $
d365 1
@


1.149
log
@make(1): add test for partial expansion of undefined variables
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.148 2020/09/23 07:54:08 rillig Exp $
d245 1
@


1.148
log
@make(1): remove debug output from counter tests

Now that the tests work as intended, the debug information is no longer
necessary.  It was only intended to track down the cause of the
unexpected behavior.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.147 2020/09/23 03:33:55 rillig Exp $
d350 1
@


1.147
log
@make(1): add variant of the counter test

I had expected that using the ::+= modifier instead of the ::= modifier
would work, since the assignment modifier for COUNTER no longer contains
a reference to itself.  But instead of ending up at 4, the counter even
goes up to 6.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.146 2020/09/23 03:06:38 rillig Exp $
a399 3
POSTPROC.counter=	${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
POSTPROC.counter-append= ${POSTPROC.counter}

@


1.146
log
@make(1): fix assertion failure in -j mode with .END node

There had been two separate global variables for the .END node, and in
parallel mode, only the one in jobs.c was initialized.

The code in JobRun heads over to Compat_Make without calling Compat_Run
first, which left the variable ENDNode uninitialized.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.145 2020/09/21 04:20:35 rillig Exp $
d74 1
a362 1
FLAGS.counter=		-dv
d401 2
@


1.145
log
@make(1): run tests with absolute filenames as well

The tests varname-dot-parsedir and varname-dot-parsefile had been broken
before if they were run with the "-f $PWD/$test.mk" option.  This way of
running the tests is used by FreeBSD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.144 2020/09/21 03:45:29 rillig Exp $
d105 1
@


1.144
log
@make(1): fix tests for .PARSEDIR/.PARSEFILE

The output of these tests previously depended upon whether the test
makefile was specified as relative or as absolute path.  In NetBSD, it
is specified as relative path, in FreeBSD as absolute path.

Adjust the expected output to hide this difference; in the .rawout files
it is still visible.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.143 2020/09/15 16:22:04 rillig Exp $
d421 3
d425 1
d454 1
a454 1
	env -i PATH="$$PATH" ${ENV.${.TARGET:R}} \
d457 1
a457 1
	    ${FLAGS.${.TARGET:R}:U-k} \
d475 1
a475 1
	@@${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.TARGET:R}} \
d477 1
a477 1
	@@${POSTPROC.${.TARGET:R}:Ucat} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2
@


1.143
log
@make(1): move flags for lint test into the test itself
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.142 2020/09/14 06:44:50 rillig Exp $
d392 2
@


1.142
log
@make(1): add test for undefined expressions in conditions in lint mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.141 2020/09/14 06:22:59 rillig Exp $
a365 1
FLAGS.lint=		-dL -k
@


1.141
log
@make(1): add tests for numbers in conditions
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.140 2020/09/13 09:20:23 rillig Exp $
d70 1
@


1.140
log
@make(1): add tests for the various .include directives
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.139 2020/09/13 09:17:47 rillig Exp $
d51 1
@


1.139
log
@make(1): fix sync-mi helper target, at least for adding tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.138 2020/09/07 18:49:15 rillig Exp $
d124 1
d138 1
d144 2
d147 1
@


1.138
log
@make(1): explain why each test is run in a sub-make
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.137 2020/09/07 18:43:59 rillig Exp $
d490 2
a491 14
SYNC_MI_AWK= \
	BEGIN {								\
	  testsdir = "usr.bin/make/unit-tests";				\
	  linestart = "./usr/tests/" testsdir;				\
	  fmt = linestart "/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \
	  cmd = "cd " testsdir " && ls *.exp *.mk | xargs printf '" fmt "'" \
	}								\
	function startswith(s, prefix) {				\
	  return substr(s, 1, length(prefix)) == prefix;		\
	}								\
	startswith($$1, linestart) && $$1 ~ /\.(exp|mk)$$/ { next }	\
	{ print $$0 }							\
	$$1 == linestart "/Makefile" { system(cmd) }

a492 3
	# Obsolete entries in the mi file must be marked as obsolete,
	# the lines must be preserved instead of just being deleted.
	@@echo "$@@: Doesn't work right now." 1>&2; exit 1
d497 4
a500 2
	awk ${SYNC_MI_AWK:Q} < "$$mi" > "$$mi.$@@";			\
	mv -f "$$mi.$@@" "$$mi";						\
@


1.137
log
@make(1): use consistent spelling for postprocessing
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.136 2020/09/05 12:59:07 rillig Exp $
d434 3
a436 1
# the tests are actually done with sub-makes.
@


1.136
log
@make(1): add test for intentional hash collision for variable names

Hash collisions may slow down make in certain special situations.  There
is no point though in maliciously triggering such a situation since
anyone who can inject values into makefiles can easily run shell
commands using the :!cmd! modifier or similar mechanisms.  Crafting
variable names just to slow down make is thus not an attack vector.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.135 2020/09/05 06:36:40 rillig Exp $
d375 1
a375 1
# Some tests need extra post-processing.
d449 1
a449 1
# Post-process the test output so that the results can be compared.
@


1.135
log
@make(1): move test for -dg1 from opt-debug-g1 to opt-debug-graph1
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.134 2020/09/05 06:20:51 rillig Exp $
d396 1
@


1.134
log
@make(1): add tests for each debug option
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.133 2020/09/04 19:03:38 rillig Exp $
a181 1
TESTS+=		opt-debug-g1
a359 1
FLAGS.opt-debug-g1=	-dg1
d376 4
a379 2
SED_CMDS.opt-debug-g1=	-e 's,${.CURDIR},CURDIR,'
SED_CMDS.opt-debug-g1+=	-e '/Global Variables:/,/Suffixes:/d'
@


1.133
log
@make(1): re-enable the archive test

The test had failed in the releng build because it assumed it were run
with .CURDIR == .PARSEDIR.  This assumption is true when the tests are
run directly from usr.bin/make, but not when they are run from
tests/usr.bin/make.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.132 2020/09/04 17:05:39 rillig Exp $
d174 8
d183 16
@


1.132
log
@make(1): add test for the special variable MAKEFILE
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.131 2020/09/04 05:23:25 rillig Exp $
d38 1
a38 1
TESTS+=		# archive	# broken on FreeBSD, enabled in t_make.sh
a330 1
FLAGS.archive=		-dA
@


1.131
log
@make(1): extend tests for the :hash variable modifier

The previous test vectors didn't contain any hash with a leading zero.
This could have been a simple programming mistake by using %8x instead
of the intended %08x.  Using snprintf wouldn't have been possible anyway
since the hex digits are printed in little-endian order, but without
reversing the bits of each digit.  Kind of unusual, but doesn't affect
the distribution of the hashes.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.130 2020/09/02 05:33:57 rillig Exp $
d313 1
@


1.130
log
@make(1): add test for the .for directive

For a long time, I had assumed that the iteration variables of a .for
loop are just normal global variables.  This assumption was wrong but
didn't have any consequences.

The iteration variables of a .for loop can just be accessed like global
variables, therefore it is not obvious that they are implemented in a
completely different way.

There are some edge cases in conditions used inside .for loops, in which
the iteration variables cannot be used like normal variables.  An
example is brought up in https://gnats.netbsd.org/47888, which observes
that the defined() and empty() functions in conditions only work with
variables but ignore the iteration "variables", simply because these are
not variables but only expressions.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.129 2020/08/29 19:35:38 rillig Exp $
a159 1
TESTS+=		hash
@


1.129
log
@make(1): fix sh-dots test

The exact output depends on the shell.  Some shells prefix the error
message with their name, some don't.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.128 2020/08/29 19:07:32 rillig Exp $
d135 1
@


1.128
log
@make(1): add test for the .ifmake directive
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.127 2020/08/29 18:50:25 rillig Exp $
a354 1
SED_CMDS.opt-debug-g1+=	-e 's,[/[a-z]*/share/mk,/.../share/mk,'
d356 1
a356 1
SED_CMDS.sh-dots+=	-e 's,^${.SHELL}: ,,' -e '/not found/s,command ,,'
@


1.127
log
@make(1): add tests for .else and .for + .endif
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.126 2020/08/29 14:47:26 rillig Exp $
d332 1
@


1.126
log
@make(1): fix assertion failure for .SUFFIXES in archives

This occurred in the posix1.mk test, even though it is disabled in
unit-tests.  But in tests/usr.bin/make it still runs.  There, it should
have produced an "expected failure" but crashed instead.

The archive-suffix test is the stripped-down version of the posix1 test.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.125 2020/08/29 10:52:47 rillig Exp $
d135 1
@


1.125
log
@make(1): fix test opt-debug-g1

Including the directory cache made the test output fragile.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.124 2020/08/28 15:40:53 rillig Exp $
d39 1
@


1.124
log
@make(1): add test for interrupting a command
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.123 2020/08/28 04:05:35 rillig Exp $
d353 1
a353 1
SED_CMDS.opt-debug-g1+=	-e '/Global Variables/,/Directory Cache/d'
@


1.123
log
@make(1): add test for the undocumented .NULL special dependency target
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.122 2020/08/28 03:51:06 rillig Exp $
d39 1
@


1.122
log
@make(1): add tests for the special .INCLUDES and .LIBS variables
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.121 2020/08/28 02:45:51 rillig Exp $
d325 2
d365 2
@


1.121
log
@make(1): disable the sync-mi convenience target
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.120 2020/08/27 19:00:17 rillig Exp $
d275 1
d278 1
@


1.120
log
@make(1): add test for the -dg1 option
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.119 2020/08/23 14:46:33 rillig Exp $
d469 3
@


1.119
log
@make(1): add test for + commands with the -n command line option
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.118 2020/08/23 14:28:04 rillig Exp $
d171 1
d329 1
d346 3
@


1.118
log
@make(1): add tests for the -i -k -v -V -W options
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.117 2020/08/23 13:50:17 rillig Exp $
d337 1
@


1.117
log
@make(1): add tests for numeric comparisons in .if directives
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.116 2020/08/23 09:28:52 rillig Exp $
d328 2
d332 3
@


1.116
log
@make(1): fix assertion failure in debug output for read-only variables
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.115 2020/08/23 09:18:25 rillig Exp $
d42 6
@


1.115
log
@make(1): add test for the newly added .SHELL variable
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.114 2020/08/22 21:55:54 rillig Exp $
d338 3
a340 1
SED_CMDS.varname-dot-shell= -e 's, = /.*, = (details omitted),'
@


1.114
log
@make(1): add test for expanding wildcards in directories

This test covers DirExpandInt.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.113 2020/08/22 21:30:52 sjg Exp $
d296 1
d328 1
d338 1
d344 2
@


1.113
log
@bash says 'command not found'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.112 2020/08/22 21:22:24 rillig Exp $
d114 1
@


1.112
log
@make(1): try to set the variable named "" using the command line

Before 2020-08-22, the command line argument '=cmline-plain' triggered
undefined behavior, just like the assignment '=assigned' in the Makefile.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.111 2020/08/22 20:50:43 sjg Exp $
d329 1
a329 1
SED_CMDS.sh-dots+=	-e 's,^${.SHELL}: ,,'
@


1.111
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.110 2020/08/22 20:23:14 rillig Exp $
d326 1
d340 1
@


1.110
log
@make(1): add test for assigning to the variable named ""

This has been possible at least since 2013, probably much longer.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.109 2020/08/22 16:51:26 rillig Exp $
d328 1
a328 1
SED_CMDS.sh-dots+=	-e '/not found/s,^.*sh: ,,'
d332 1
a332 1
SED_CMDS.varshell+=	-e 's,^[a-z]*sh: ,,'
@


1.109
log
@make(1): add test for deferred variable expansion in dependencies
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.108 2020/08/22 15:25:50 sjg Exp $
d296 1
@


1.108
log
@Supress /bin/sh: in error for sh-dots
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.107 2020/08/22 12:51:11 rillig Exp $
d69 1
@


1.107
log
@make(1): add test for "no target to make"
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.106 2020/08/22 11:27:02 rillig Exp $
d326 1
@


1.106
log
@make(1): add test for the special "..." in shell commands
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.105 2020/08/22 08:29:13 rillig Exp $
d68 1
@


1.105
log
@make(1): add test for combining :: and .USEBEFORE
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.104 2020/08/20 18:05:57 rillig Exp $
d190 1
@


1.104
log
@make(1): enable debug logging for archive test

This test succeeds locally on NetBSD 8.0 but not in the official test
runs on https://releng.netbsd.org/test-results.html.  To see the
difference, run the test with full debug information.

This test is commented out in usr.bin/make/unit-tests/Makefile, but that
doesn't stop tests/usr.bin/make/t_make.sh from running it nevertheless,
since over there, all *.mk files are considered tests, be they commented
out or not.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.103 2020/08/20 17:45:47 rillig Exp $
d86 1
d440 1
@


1.103
log
@make(1): add test for parsing functions in .if conditions
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.102 2020/08/19 05:25:26 rillig Exp $
d309 1
@


1.102
log
@make(1): add test for the -n option
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.101 2020/08/19 05:13:18 rillig Exp $
d43 1
@


1.101
log
@make(1): add test for the -q option
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.100 2020/08/16 20:43:01 rillig Exp $
d313 1
@


1.100
log
@make(1): move tests for the :Ox modifier into separate file

The test has been extended by ensuring that the shuffled words are still
the same.  Comparing two shuffled lists is probabilistic, but comparing
their sorted results is not, therefore that's completely sensible to do.

When writing this test, by coincidence I discovered how to generate the
"Undefined variable" error message.  Unfortunately, the error message is
wrong since the variable NUMBERS is defined at that point.  In summary,
that error message is shown when it shouldn't, and when it should it is
not shown.  Still, I'm glad that I finally found it.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.99 2020/08/16 20:03:53 rillig Exp $
d313 1
@


1.99
log
@make(1): move tests for the :M modifier into separate files

The test for the different escaping has been adjusted to actually show
the different parsing results in the test output.  To do this, it had to
get its own file since it needs the -dv debug flag and specialized
post-processing.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.98 2020/08/16 18:40:13 rillig Exp $
a153 1
TESTS+=		modorder
@


1.98
log
@make(1): run tests in an almost empty, controlled environment

Several of the tests use simple variable names that might be influenced
by environment variables of the same name.  Especially the tests for the
?= variable assignment operator need an empty environment to start with,
to produce reliable results.

The PATH must be in the base environment since several tests depend on
the usual tools like echo(1), sleep(1), grep(1).  Setting the PATH to a
fixed value would have made it impossible to run the tests in a custom
environment that don't have a /bin directory.  It's the user's
responsibility to provide a sane PATH.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.97 2020/08/16 18:17:17 rillig Exp $
d234 1
d317 1
d329 1
d331 1
@


1.97
log
@make(1): force all tests to be run with the -r flag

Without that flag, <sys.mk> is loaded before the tests.  The tests are
not intended to either use or even test these rules and definitions,
therefore it is safe to omit this command line option.

If there should ever be tests for POSIX-conformance that need the
builtin rules and definitions, these tests can still ".include <sys.mk>"
at the beginning and be done with it, since the -m command line option
is not touched.  The system-default rules and definitions are still
available, they are just not active by default.

Suggested by sjg.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.96 2020/08/16 18:04:33 rillig Exp $
d300 2
a301 2
# Override environment variables for some of the tests.
ENV.counter=		-i
a302 5
ENV.export=		-i PATH=${PATH:Q}
ENV.export-variants=	-i PATH=${PATH:Q}
ENV.lint=		-i
ENV.make-exported=	-i PATH=${PATH:Q}
ENV.recursive=		-i
d366 5
a370 3
	env ${ENV.${.TARGET:R}} ${TEST_MAKE} -C ${.CURDIR} \
	  -r ${FLAGS.${.TARGET:R}:U-k} -f ${.IMPSRC} \
	  > ${.TARGET}.tmp 2>&1 \
@


1.96
log
@make(1): use consistent formatting for running the tests

With the many newly added tests, having two messages ("testing xzy" and
"postprocessing xyz") made the output too noisy since the words were not
aligned nicely.  Use the same formatting as for MAKEVERBOSE=0, and
remove the message for postprocessing.  If there should ever be problems
during postprocessing, it's trivial to run "../make TESTS=bad-test -dl"
to find out where the problem is.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.95 2020/08/16 17:58:48 rillig Exp $
d313 1
a313 1
FLAGS.counter=		-r -dv
d316 1
a316 1
FLAGS.export=		-r
d319 1
a319 1
FLAGS.recursive=	-dL -r
d372 1
a372 1
	  ${FLAGS.${.TARGET:R}:U-k} -f ${.IMPSRC} \
@


1.95
log
@make(1): clean up cleaning of test files

The variables CLEANFILES and CLEANDIRS are not supposed to be
user-settable, thus use a simple "=" instead of "+=".

Since CLEANDIRS is always set, there is no point in making the rm
conditional.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.94 2020/08/16 12:30:45 rillig Exp $
d368 1
a368 1
	@@echo testing ${.IMPSRC}
a389 1
	@@echo postprocess ${.TARGET}
@


1.94
log
@make(1): move tests for :S, :C, :@@ from modmisc to their separate tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.93 2020/08/16 12:07:51 rillig Exp $
d348 1
a348 1
CLEANFILES+=		*.rawout *.out *.status *.tmp *.core *.tmp
d351 1
a351 1
CLEANRECURSIVE+=	dir dummy		# posix1.mk
d355 1
a355 3
.if !empty(CLEANRECURSIVE)
	rm -rf ${CLEANRECURSIVE}
.endif
@


1.93
log
@make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.92 2020/08/15 01:49:07 rillig Exp $
d323 2
a324 2
SED_CMDS.moderrs+=	-e 's,\(Regex compilation error:\).*,\1 (details omitted),'
SED_CMDS.modmisc+=	-e 's,\(Regex compilation error:\).*,\1 (details omitted),'
d443 1
a443 1
${TESTS:=.rawout}: ${TEST_MAKE}
@


1.92
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.91 2020/08/09 16:32:28 rillig Exp $
d41 8
d50 5
d56 4
d63 46
d110 22
d157 25
d188 9
d204 12
d220 3
d224 72
@


1.91
log
@make(1): add test for .USE combined with inference rule without commands

Discovered by christos.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.90 2020/08/09 12:59:16 rillig Exp $
d36 3
a38 1
TESTS+=		# archive	# broken on FreeBSD
@


1.90
log
@make(1): add test for non-obvious .MAKE.EXPORTED edge case
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.89 2020/08/07 19:24:27 rillig Exp $
d82 1
@


1.89
log
@make(1): add test for exporting variables
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.88 2020/08/07 14:40:59 rillig Exp $
d62 1
d97 1
@


1.88
log
@make(1): document why the suffixes test must stay disabled
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.87 2020/08/07 14:26:18 rillig Exp $
d55 1
d94 1
d122 4
@


1.87
log
@make(1): enable test phony-end

This at least documents the actual behavior.  Not sure what the expected
behavior is and why.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.86 2020/08/07 13:43:50 rillig Exp $
d69 1
a69 1
TESTS+=		phony-end	# broken by reverting POSIX changes
d74 1
a74 1
TESTS+=		# suffixes	# broken by reverting POSIX changes
@


1.86
log
@make(1): enable test for .IMPSRC

Having this test disabled was very confusing since its content didn't
match the actual behavior, and this also differs from the GNU make
behavior.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.85 2020/08/06 16:23:52 sjg Exp $
d69 1
a69 1
TESTS+=		# phony-end	# broken by reverting POSIX changes
@


1.85
log
@Use -r for recursive
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.84 2020/08/06 05:36:33 rillig Exp $
d58 1
a58 1
TESTS+=		# impsrc	# broken by reverting POSIX changes
@


1.84
log
@make(1): add test for unintended "recursive variable" in -dL mode
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.83 2020/08/03 15:43:32 rillig Exp $
d106 1
a106 1
FLAGS.recursive=	-dL
@


1.83
log
@make(1): in lint mode, disallow dynamic variable names in :@@ modifier

This is an extremely obscure feature that hopefully nobody ever
considered using.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.82 2020/08/02 22:43:14 rillig Exp $
d73 1
d94 1
d106 1
@


1.82
log
@make(1): set more predictable environment for counter test

Having an environment variable or a global variable called "C" would
change the debug output since an existing variable is not set to the
empty value first.  See parse.c, keyword "!Var_Exists".
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.81 2020/08/02 14:53:02 rillig Exp $
d60 1
d92 1
d102 1
@


1.81
log
@make(1): add test for nested VAR_SUBST assignments
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.80 2020/08/01 18:14:08 rillig Exp $
d88 1
d96 1
a96 1
FLAGS.counter=		-dv
@


1.80
log
@make(1): fix error message when regcomp fails

If regcomp fails, it's not the regex substitution that is erroneous, but
the regex compilation.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.79 2020/08/01 15:28:28 rillig Exp $
d43 1
d95 1
d110 1
@


1.79
log
@make(1): improve output grouping in varmod-edge test

The generated error messages are now closer to the test cases that
produce them.  To keep the expected output stable, the line numbers are
omitted from the .info directives.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.78 2020/07/31 22:07:28 rillig Exp $
d101 2
a102 2
SED_CMDS.moderrs+=	-e 's,\(substitution error:\).*,\1 (details omitted),'
SED_CMDS.modmisc+=	-e 's,\(substitution error:\).*,\1 (details omitted),'
@


1.78
log
@make(1): automate adding or removing test files
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.77 2020/07/31 16:42:51 rillig Exp $
d103 1
@


1.77
log
@make(1): add test for braces in dependency lines

The comment at DirExpandCurly says something about "recursively", but the
nested braces don't work.

The manual page only mentions that "{} may be used", but it keeps quiet
about the exact meaning and also doesn't mention any nesting.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.76 2020/07/29 19:48:33 rillig Exp $
d27 5
a31 2
# Makefiles that are not added to TESTS must be ignored in
# src/tests/usr.bin/make/t_make.sh (example: include-sub).
d192 22
@


1.76
log
@make(1): add enough tests to cover the ApplyModifier functions

Only a few return statements are still missing from the code coverage.

In ApplyModifier_Assign, the test for an empty variable name is skipped
for now since it segfaults.

In ApplyModifier_SysV after the second ParseModifierPart, the branch for
the missing delimiter is not reached since this case is already checked
for in the first part of the function. To trigger this branch, a
specially crafted, unrealistic string needs to be created, and that's too
complicated for the moment.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.75 2020/07/28 22:44:44 rillig Exp $
d40 1
@


1.75
log
@make(1): add test for setting .OBJDIR via the command line
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.74 2020/07/28 18:39:56 sjg Exp $
d97 1
@


1.74
log
@Use cat if no POSTPROC.${.TARGET:R}

On Linux sed with no flags throws an error.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.73 2020/07/28 16:26:37 sjg Exp $
d34 1
@


1.73
log
@Ensure .CURDIR is correct for tests that run sub-makes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.72 2020/07/28 16:11:55 rillig Exp $
d161 1
a161 1
	@@${POSTPROC.${.TARGET:R}:U${TOOL_SED}} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2
@


1.72
log
@make(1): disable archive test

On FreeBSD, running the archive.mk test results in "create-archive is up
to date" and similar messages.  The situation is unclear, and the
archive code seems to be practically unused.  Furthermore the archive
test doesn't ensure that it is run in ${.PARSEDIR}, so it needs a bit
more work.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.71 2020/07/28 00:48:00 sjg Exp $
d139 1
a139 1
	env ${ENV.${.TARGET:R}} ${TEST_MAKE} \
@


1.71
log
@Use -r for export.mk to minimize interference
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.70 2020/07/27 20:46:17 rillig Exp $
d33 1
a33 1
TESTS+=		archive
@


1.70
log
@make(1): add tests for parsing directives like .if and .info
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.69 2020/07/27 19:45:56 rillig Exp $
d91 1
@


1.69
log
@make(1): prepare test for .export to show all exported variables

Currently the unit tests don't cover exporting of local variables like
.TARGET or @@.  To see the effects, all exported variables must be listed
by the tests.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.68 2020/07/27 19:23:12 rillig Exp $
d39 1
@


1.68
log
@make(1): sort flags for test cases alphabetically
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.67 2020/07/27 18:51:56 rillig Exp $
d82 1
d137 1
a137 1
	${ENV.${.TARGET:R}} ${TEST_MAKE} \
@


1.67
log
@make(1): add very basic test for archive handling

The whole code in arch.c had been uncovered by tests before.

The code coverage shows that neither the archive name nor the member
contain any $, even though archive.mk looks like it.  It could be
necessary to place the variable assignments below the dependency line,
to force late evaluation.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.66 2020/07/26 22:15:36 rillig Exp $
d88 1
a89 1
FLAGS.envfirst=		-e
@


1.66
log
@make(1): add test for off-by-one error in Var_Parse
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.65 2020/07/26 11:10:29 rillig Exp $
d33 1
@


1.65
log
@make(1): add test for appending and exporting a variable
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.64 2020/07/25 21:19:29 rillig Exp $
d75 1
@


1.64
log
@make(1): add tests for previously uncovered code
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.63 2020/07/09 22:40:14 sjg Exp $
d80 3
@


1.63
log
@Fix typo
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.62 2020/07/04 22:17:09 rillig Exp $
d41 1
d71 2
d78 4
a81 1
# Override make flags for certain tests; default is -k.
d84 2
d92 3
d128 8
a135 4
	@@echo ${TEST_MAKE} ${FLAGS.${.TARGET:R}:U-k} -f ${.IMPSRC}
	-@@cd ${.OBJDIR} && \
	{ ${TEST_MAKE} ${FLAGS.${.TARGET:R}:U-k} -f ${.IMPSRC} \
	  2>&1 ; echo $$? >${.TARGET:R}.status ; } > ${.TARGET}.tmp
d152 5
a156 3
	  < ${.IMPSRC} > ${.TARGET}.tmp
	@@echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp
	@@mv ${.TARGET}.tmp ${.TARGET}
@


1.62
log
@make(1): ignore system-specific error message from regcomp in test

NetBSD 8 has: repetition-operator operand invalid
Ubuntu has: Invalid preceding regular expression
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.61 2020/07/04 22:01:10 rillig Exp $
d42 1
a42 1
TESTS+=		# escape	# broken by referting POSIX changes
d49 1
a49 1
TESTS+=		# impsrc	# broken by referting POSIX changes
d59 1
a59 1
TESTS+=		# phony-end	# broken by referting POSIX changes
d61 1
a61 1
TESTS+=		# posix1	# broken by referting POSIX changes
d63 1
a63 1
TESTS+=		# suffixes	# broken by referting POSIX changes
@


1.61
log
@make(1): add post-processing for tests

By defining SED_CMDS.${test}, a test can do additional post-processing
on its output, for example to normalize paths or error messages.

The Makefile for the tests now follows the common style to have all
relevant definitions at the top of the file, and all the implementation
details at the bottom.

By using the += instead of backslashed lists, it becomes easier to
comment out a single test, either temporarily or permanently (such as
the POSIX tests).

The :C modifier has been replaced with the simpler :S, some :S modifiers
have been replaced with simpler := modifiers.

The postprocessing commands have been extracted from the actual command.
This makes editing and commenting them easier.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.60 2020/07/04 21:04:25 rillig Exp $
d80 1
d123 3
d128 1
d130 1
a133 4
# We always pretend .MAKE was called 'make' 
# and strip ${.CURDIR}/ from the output
# and replace anything after 'stopped in' with unit-tests
# so the results can be compared.
@


1.60
log
@make(1): improve documentation about adding new tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.59 2020/06/28 09:42:40 rillig Exp $
d14 5
d24 1
a24 1
# and it should be added to the TESTNAMES list.
d27 1
a27 1
# Makefiles that are not added to TESTNAMES must be ignored in
d31 54
d87 1
a87 1
UNIT_TESTS:= ${.PARSEDIR}
d90 1
a90 53
# Each test is in a sub-makefile.
# Keep the list sorted.
TESTNAMES= \
	comment \
	cond-late \
	cond-short \
	cond1 \
	cond2 \
	dollar \
	doterror \
	dotwait \
	error \
	export \
	export-all \
	export-env \
	forloop \
	forsubst \
	hash \
	include-main \
	misc \
	moderrs \
	modmatch \
	modmisc \
	modorder \
	modts \
	modword \
	order \
	posix \
	qequals \
	sunshcmd \
	sysv \
	ternary \
	unexport \
	unexport-env \
	varcmd \
	varmisc \
	varmod-edge \
	varquote \
	varshell

# these tests were broken by referting POSIX chanegs
STRICT_POSIX_TESTS = \
	escape \
	impsrc \
	phony-end \
	posix1 \
	suffixes

# Override make flags for certain tests
flags.doterror=
flags.order=-j1

OUTFILES= ${TESTNAMES:S/$/.out/}
d94 4
a97 4
CLEANFILES += *.rawout *.out *.status *.tmp *.core *.tmp
CLEANFILES += obj*.[och] lib*.a		# posix1.mk
CLEANFILES += issue* .[ab]*		# suffixes.mk
CLEANRECURSIVE += dir dummy		# posix1.mk
d105 2
a106 2
TEST_MAKE?= ${.MAKE}
TOOL_SED?= sed
d109 2
a110 2
LC_ALL= C
LANG= C
d116 1
a116 1
	@@echo ${TEST_MAKE} ${flags.${.TARGET:R}:U-k} -f ${.IMPSRC}
d118 1
a118 1
	{ ${TEST_MAKE} ${flags.${.TARGET:R}:U-k} -f ${.IMPSRC} \
d122 6
d134 1
a134 5
	@@${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[][0-9]*:,make:,' \
	  -e 's,${TEST_MAKE:C/\./\\\./g},make,' \
	  -e '/stopped/s, /.*, unit-tests,' \
	  -e 's,${.CURDIR:C/\./\\\./g}/,,g' \
	  -e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' \
d142 1
a142 1
	for test in ${TESTNAMES}; do \
d153 1
a153 1
	@@for test in ${TESTNAMES}; do \
d160 1
a160 1
${TESTNAMES:S/$/.rawout/}: ${TEST_MAKE}
@


1.59
log
@make(1): demonstrate bug when evaluating conditions
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.58 2020/05/17 12:36:26 rillig Exp $
d4 1
a5 4
# 
# all:	run all the tests
# test:	run 'all', and compare to expected results
# accept: move generated output to expected results
d7 10
a16 1
# Adding a test case.  
d20 5
a24 1
# 
@


1.58
log
@usr.bin/make: demonstrate actual behavior of .INCLUDEDFROMFILE
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.57 2020/05/10 12:42:11 rillig Exp $
d26 1
@


1.57
log
@usr.bin/make: sort test cases alphabetically
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.56 2020/05/10 12:34:01 rillig Exp $
d38 1
@


1.56
log
@usr.bin/make: add tests for surprising dollar removal
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.55 2020/04/29 23:15:21 rillig Exp $
d29 2
a34 2
	doterror \
	dotwait \
@


1.55
log
@usr.bin/make: add test case for lazy conditions
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.54 2019/11/30 00:38:51 rillig Exp $
d28 1
@


1.54
log
@Add unit tests for variable modifiers like :M and :N
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.53 2018/05/24 00:25:44 christos Exp $
d25 1
@


1.53
log
@unit test for $ underquoting in :Q modifier
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.52 2015/05/05 21:51:09 sjg Exp $
d53 1
@


1.53.2.1
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
# $NetBSD$
a52 1
	varmod-edge \
@


1.52
log
@When evaluating condtionals from .if we want to require
that the lhs is a variable reference, a number or a quoted string.
This helps avoid subtle bugs caused by typos.

When conditionals are being evaluated during variable expansion
we cannot be as strict becuase lhs will already have been expanded.

We therefor pass a boolean to Cond_EvalExpression to tell it how
lhs should be treated.

Add unit-tests/cond2.mk to test the above

Reviewed by: christos, joerg
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.51 2014/10/20 23:21:11 sjg Exp $
d53 1
@


1.52.14.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.53 2018/05/24 00:25:44 christos Exp $
a52 1
	varquote \
@


1.52.8.1
log
@Pull up following revision(s) (requested by christos in ticket #870):

	sys/lib/libgnuefi/Makefile.inc: revision 1.5
	external/mit/xorg/xorg-pkg-ver.mk: revision 1.9
	sys/arch/i386/stand/lib/Makefile.inc: revision 1.17
	sys/compat/common/Makefile.inc: revision 1.25
	usr.bin/make/unit-tests/varquote.exp: revision 1.1, 1.2
	sys/lib/libsa/Makefile.inc: revision 1.24
	usr.bin/make/var.c: revision 1.220
	sys/arch/ia64/stand/efi/libefi/Makefile.inc: revision 1.5
	sys/arch/hppa/spmath/Makefile.inc: revision 1.10
	usr.bin/make/unit-tests/varquote.mk: revision 1.1, 1.2
	usr.bin/make/unit-tests/Makefile: revision 1.53
	sys/lib/libkern/Makefile.inc: revision 1.45
	sys/arch/acorn32/stand/lib/Makefile.inc: revision 1.4
	sys/arch/m68k/fpsp/Makefile.inc: revision 1.21
	usr.bin/make/make.1: revision 1.273
	sys/lib/libz/Makefile.inc: revision 1.17

- Introduce :q modifier for make variables and make it double escape $'s so
  that passing variables to recursive makes with :q works as expected.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@@

XXX: pullup 8
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.52 2015/05/05 21:51:09 sjg Exp $
a52 1
	varquote \
@


1.51
log
@Extract broken tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.50 2014/08/29 20:03:27 sjg Exp $
d26 1
@


1.50
log
@*.rawout are out-of-date if ${TEST_MAKE} is newer.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.49 2014/08/29 15:55:44 sjg Exp $
a26 1
	escape \
a34 1
	impsrc \
a42 1
	phony-end \
a43 1
	posix1 \
a44 1
	suffixes \
d54 8
@


1.49
log
@posix1.mk and suffixes.mk need to cleanup in order to achieve
repeatable results.
posix1.mk's lib.a target still looks dubious.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.48 2014/08/24 17:17:24 apb Exp $
d130 4
@


1.48
log
@Let "make clean" delete the files and dirs created by some of the tests.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.47 2014/08/24 11:52:45 apb Exp $
d69 1
a69 1
CLEANFILES += issue*			# suffixes.mk
@


1.47
log
@Add tests for backslash escaping in make(1).

Many of these tests fail, and I have populated the escape.exp file with
the results that I expect, not with the results that make(1) actually
produces.

Also update the set lists for these tests.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.46 2014/08/23 15:21:35 christos Exp $
d67 5
d73 4
a76 1
	rm -f *.rawout *.out *.status *.tmp *.core *.tmp
@


1.46
log
@Instead of adding the test in 48095 I added the tests in 48096. Add the
missing test now.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.45 2014/08/23 15:02:04 christos Exp $
d27 1
@


1.45
log
@Convert test in PR/49085
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.44 2014/08/21 22:00:30 apb Exp $
d46 1
@


1.44
log
@Add a .PATH, so you can be in any other directory and run
"make -f /path/to/this/Makefile sometest.out"
and have it create sometest.out in your current directory.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.43 2014/08/21 15:37:13 apb Exp $
d35 1
d47 1
@


1.43
log
@Add varmisc.mk, for miscellaneous variable tests.

For now, the only test is copied from
src/tests/usr.bin/make/d_unmatchedvarparen.mk.  This was
the only test in src/tests/usr.bin/make that was not also in
src/usr.bin/make/unit-tests.

XXX: src/tests/usr.bin/mk should be changed to reach over to
src/usr.bin/make/unit-tests, instead of keeping out of date copies
of the tests.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.42 2014/08/21 13:44:51 apb Exp $
d19 1
@


1.42
log
@Give each group of tests its own output file.

* Rename each sub-makefile to *.mk;
* Add a *.exp file of expected output for each sub-makefile;
* Remove test.exp, which is replaced by all the other *.exp files.
* Use suffix rules to generate *.rawout and *.out files for
  each test case.
* Rewrite the test and accept targets to adapt to the new way.

The old (now removed) test.exp file is almost identical to the
concatenation (in the correct order) of all the new *.exp files.  There
are expected differences in makefile names embedded in the output, and
the new "exit status" lines.  Some old "*** Error code 1 (ignored)"
lines are also removed (replaced by new "exit status 1" lines).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.41 2014/08/21 13:31:52 apb Exp $
d51 1
@


1.41
log
@Stricter sed expression for matching an optional PID in square brackets.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.40 2014/08/21 12:42:03 apb Exp $
d7 1
a7 1
# test:	run 'all', capture output and compare to expected results
d12 2
a13 1
# named makefile which should be added to SUBFILES to hook it in.
d20 3
a22 3
# Simple sub-makefiles - we run them as a black box
# keep the list sorted.
SUBFILES= \
d53 1
a53 2
all: ${SUBFILES}

d57 3
a59 5
# the tests are actually done with sub-makes.
.PHONY: ${SUBFILES}
.PRECIOUS: ${SUBFILES}
${SUBFILES}:
	-@@${.MAKE} ${flags.$@@:U-k} -f ${UNIT_TESTS}/$@@
d62 1
a62 3
	rm -f *.out *.fail *.core

.-include <bsd.obj.mk>
d72 9
a80 1
# The driver.
d85 23
a107 10
test:
	@@echo "${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1"
	cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
	${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[][0-9]*:,make:,' \
	-e 's,${TEST_MAKE:C/\./\\\./g},make,' \
	-e '/stopped/s, /.*, unit-tests,' \
	-e 's,${.CURDIR:C/\./\\\./g}/,,g' \
	-e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' > ${.TARGET}.out || { \
	tail ${.TARGET}.out; mv ${.TARGET}.out ${.TARGET}.fail; exit 1; }
	diff -u ${UNIT_TESTS}/${.TARGET}.exp ${.TARGET}.out
d110 5
a114 1
	mv test.out ${.CURDIR}/test.exp
d116 1
@


1.40
log
@When sanitising test output, replace "${TEST_MAKE}" with "make".
This string may appear in error messages that end up in the output.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.39 2014/08/20 08:39:14 apb Exp $
d83 2
a84 2
	@@cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
	${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[^:]*:,make:,' \
@


1.39
log
@Add tests for VAR != command.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.38 2013/08/28 21:56:50 sjg Exp $
d85 1
@


1.38
log
@Fix parsing of SUNSHCMD style :sh = assigments.

Submitted by: Will Andrews at freebsd.org
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.37 2013/07/16 19:59:28 sjg Exp $
d49 2
a50 1
	varcmd
@


1.37
log
@Fix unit-tests to cope with recent change to progname
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.36 2013/03/22 16:36:46 sjg Exp $
d44 1
@


1.36
log
@Add unit-test for export-env and gmake export
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $
d82 1
a82 1
	${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}:,make:,' \
@


1.35
log
@Add a unit-test for .ORDER
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $
d27 1
@


1.34
log
@Add unit-tests for .for
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33 2011/09/29 23:38:04 sjg Exp $
d39 1
d52 1
@


1.34.2.1
log
@Resync to 2012-11-19 00:00:00 UTC
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $
a38 1
	order \
a50 1
flags.order=-j1
@


1.34.2.2
log
@resync from head
@
text
@d1 1
a1 1
# $NetBSD$
a26 1
	export-env \
@


1.34.2.3
log
@Rebase to HEAD as of a few days ago.
@
text
@a43 1
	sunshcmd \
d82 1
a82 1
	${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[^:]*:,make:,' \
@


1.33
log
@Make sure .PHONY targets get .TARGET set.
This wasn't happening when a dependency of .END.
Set .PREFIX too and add a unit-test.

PR: 43534
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.32 2011/04/07 01:40:02 joerg Exp $
d29 1
@


1.33.2.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33 2011/09/29 23:38:04 sjg Exp $
a28 1
	forloop \
@


1.33.2.2
log
@sync with (a bit old) head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33.2.1 2012/10/30 19:00:23 yamt Exp $
a38 1
	order \
a50 1
flags.order=-j1
@


1.33.2.3
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33.2.2 2013/01/16 05:34:06 yamt Exp $
a26 1
	export-env \
a42 1
	sunshcmd \
d81 1
a81 1
	${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[^:]*:,make:,' \
@


1.32
log
@Add the :hash modifier to compute a 32bit hash of an variable.
This uses MurmurHash3 to get a reasonable collission-free hash with
small code. The result is endian neutral.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.31 2011/03/06 00:02:14 sjg Exp $
d38 1
@


1.31
log
@Add unit tests to check that exists(some/dir/) works

Also fix handling of sysV substitutions when lhs and variable are empty.

Also that modifiers do not cause errors during conditional tests
when undefined variables should otherwise be ok.
Ie. .if defined(nosuch) && ${nosuch:Mx} != ""
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.30 2010/12/10 00:37:23 sjg Exp $
d30 1
@


1.30
log
@fix style
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.29 2010/12/10 00:36:33 sjg Exp $
d30 1
d39 1
@


1.29
log
@Need to export LC_ALL=C too
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.28 2010/04/22 21:41:11 sjg Exp $
d62 1
a62 1
LC_ALL = C
@


1.28
log
@Force LANG=C to ensure sort(1) behaves as expected
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.27 2010/04/22 19:15:24 sjg Exp $
d62 1
d64 1
a64 1
.export LANG
@


1.27
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.26 2010/04/08 17:41:29 sjg Exp $
d61 4
@


1.26
log
@Process .ERROR the same as .BEGIN, .END etc
so that it cannot be the default target.
Add unit-tests for .info - .error, and .ERROR.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.25 2009/11/19 00:30:25 sjg Exp $
d56 1
a56 1
.include <bsd.obj.mk>
d59 1
@


1.25
log
@Add .unexport - the exact opposite of .export
and .unexport-env which unexport's all previously .export'd globals
as well as clearing environ[].
Allow's sys.mk near total controll.

Reviewed by: apb
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.24 2009/10/07 16:40:30 sjg Exp $
d24 1
d27 1
d45 2
d51 1
a51 1
	-@@${.MAKE} -k -f ${UNIT_TESTS}/$@@
@


1.24
log
@The parser used to break dependency lines at ';' without regard
for substitution patterns.  This (perhaps coupled with the
new handling of .for variables in ${:U<value>...) caused interesting
results for lines like:

.for file in ${LIST}
for-subst:       ${file:S;^;${here}/;g}

add a unit-test to keep an eye on this.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.23 2008/10/25 22:27:39 apb Exp $
d37 2
@


1.23
log
@Use ${TOOL_SED} instead if plain sed in Makefiles.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.22 2008/03/31 00:12:21 sjg Exp $
d27 1
@


1.22
log
@If the name passed to Var_Exists contains '$' run it through Var_Subst.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.21 2007/10/05 15:27:46 sjg Exp $
d61 1
a61 1
	sed -e 's,^${TEST_MAKE:T:C/\./\\\./g}:,make:,' \
@


1.21
log
@Add the ability to .export variables to the environment.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.20 2006/05/11 15:37:07 sjg Exp $
d34 1
@


1.20
log
@Extract the variable modifier logic to a separate function.
This cuts Var_Parse in half! and allows the modifier logic to
be used recursively - when getting modifiers via variables.

Add new unit-test, to check that certain error cases are handled
correctly.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.19 2006/02/26 22:45:46 apb Exp $
d24 2
@


1.20.12.1
log
@sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.21 2007/10/05 15:27:46 sjg Exp $
a23 2
	export \
	export-all \
@


1.19
log
@Make ".WAIT" apply recursively to all children of nodes on the right
hand side of the .WAIT, except when the recursive interpretation would
cause a cycle in the dependency graph.

Discussed in tech-toolchain.  Reviewed by christos, sjg.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2006/02/26 21:43:01 sjg Exp $
d25 1
@


1.18
log
@Update man page and add test case for specifying modifiers via variable.
Also allow said variable to appear anywhere in the modifier list.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2006/02/13 18:17:36 apb Exp $
d24 1
d38 1
@


1.17
log
@Escape dots in sed regexps.  Without this patch, and without
an OBJDIR, "make test" in usr.bin/make fails.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2005/06/15 22:32:22 rpaulo Exp $
d25 1
@


1.16
log
@Add a unit-test for comments.
Addition to PR bin/17732.
Approved by sjg and christos.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2005/06/01 17:17:34 sjg Exp $
d54 1
a54 1
	sed -e 's,^${TEST_MAKE:T}:,make:,' \
d56 2
a57 2
	-e 's,${.CURDIR}/,,g' \
	-e 's,${UNIT_TESTS}/,,g' > ${.TARGET}.out || { \
@


1.15
log
@Add :Ox for random ordering, based on patch from
Mike M. Volokhov <mishka@@apk.od.ua>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2004/06/30 03:26:26 jmc Exp $
d22 1
@


1.14
log
@Add missing NetBSD ID tags
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2004/05/07 08:12:16 sjg Exp $
d24 1
d43 1
a43 1
TEST_MAKE?= ${MAKE}
@


1.14.2.1
log
@Pull up revision 1.16 (requested by rpaulo in ticket #458):
Add a unit-test for comments.
Addition to PR bin/17732.
Approved by sjg and christos.
@
text
@d1 1
a1 1
# $NetBSD$
a21 1
	comment \
@


1.14.2.2
log
@Backout ticket 458, it causes PR toolchain/30536.
@
text
@d22 1
@


1.14.2.3
log
@Pull up revision 1.16 (requested by rpaulo in ticket #491):
Add a unit-test for comments.
Addition to PR bin/17732.
Approved by sjg and christos.
@
text
@a21 1
	comment \
@


1.13
log
@Remove use of sh -e when running in compat mode.
Its not posix compliant and serves very little purpose.
With this change compat and jobs modes are consistent wrt how
they treat each line of a script.

Add support for the '+' command line prefix as required by posix.
Lines prefixed with '+' are executed even when -n is given.
[Actually posix says they should also be done for -q and -t]

PR:
Reviewed by: jmc
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.12 2004/04/08 00:59:01 sjg Exp $
@


1.12
log
@Add check for extraneous .else's - based on patch from Arne H. Juul
in PR/24420.
Add a unit-test for conditionals.
Also in the unit-test makefile strip any .CURDIR in output.

PR: 24420
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.11 2004/02/20 09:03:26 sjg Exp $
d26 1
d35 1
a35 1
	@@${.MAKE} -k -f ${UNIT_TESTS}/$@@
d47 1
d52 4
a55 1
	sed -e 's,^${TEST_MAKE:T}:,make:,' -e 's,${.CURDIR}/,,g' > ${.TARGET}.out || { \
@


1.11
log
@Fix :M so that modifiers in nested variables don't terminate parsing
early.  Add a unit-test to verify it works and keeps working.
Re-jig the unit-tests so that all are sub makefiles.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.10 2004/01/19 00:32:26 sjg Exp $
d22 1
d44 3
a46 2
# We always pretend .MAKE was called 'make' so the results
# can be compared.
d50 1
a50 1
	sed 's,^${TEST_MAKE:T}:,make:,' > ${.TARGET}.out || { \
@


1.11.2.1
log
@Pull up revision 1.12 (requested by sjg in ticket #282):
Add check for extraneous .else's - based on patch from Arne H. Juul
in PR/24420.
Add a unit-test for conditionals.
Also in the unit-test makefile strip any .CURDIR in output.
PR: 24420
@
text
@d1 1
a1 1
# $Id$
a21 1
	cond1 \
d43 2
a44 3
# We always pretend .MAKE was called 'make' 
# and strip ${.CURDIR}/ from the output
# so the results can be compared.
d48 1
a48 1
	sed -e 's,^${TEST_MAKE:T}:,make:,' -e 's,${.CURDIR}/,,g' > ${.TARGET}.out || { \
@


1.11.2.2
log
@Pull up revision 1.13 (requested by sjg in ticket #282):
Remove use of sh -e when running in compat mode.
Its not posix compliant and serves very little purpose.
With this change compat and jobs modes are consistent wrt how
they treat each line of a script.
Add support for the '+' command line prefix as required by posix.
Lines prefixed with '+' are executed even when -n is given.
[Actually posix says they should also be done for -q and -t]
PR:
Reviewed by: jmc
@
text
@a25 1
	posix \
d34 1
a34 1
	-@@${.MAKE} -k -f ${UNIT_TESTS}/$@@
a45 1
# and replace anything after 'stopped in' with unit-tests
d50 1
a50 4
	sed -e 's,^${TEST_MAKE:T}:,make:,' \
	-e '/stopped/s, /.*, unit-tests,' \
	-e 's,${.CURDIR}/,,g' \
	-e 's,${UNIT_TESTS}/,,g' > ${.TARGET}.out || { \
@


1.10
log
@ternary is .PHONY
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.9 2004/01/09 00:56:44 sjg Exp $
d11 2
a12 2
# Each feature should get its own set of tests which should be hooked
# into the 'all' target.
d19 14
a32 39
all: mod-ts varcmd modword ternary

LIST= one two three
LIST+= four five six

FU_mod-ts = a / b / cool

AAA= a a a
B.aaa= Baaa

mod-ts:
	@@echo 'LIST="${LIST}"'
	@@echo 'LIST:ts,="${LIST:ts,}"'
	@@echo 'LIST:ts/:tu="${LIST:ts/:tu}"'
	@@echo 'LIST:ts::tu="${LIST:ts::tu}"'
	@@echo 'LIST:ts:tu="${LIST:ts:tu}"'
	@@echo 'LIST:tu:ts/="${LIST:tu:ts/}"'
	@@echo 'LIST:ts:="${LIST:ts:}"'
	@@echo 'LIST:ts="${LIST:ts}"'
	@@echo 'LIST:ts:S/two/2/="${LIST:ts:S/two/2/}"'
	@@echo 'LIST:S/two/2/:ts="${LIST:S/two/2/:ts}"'
	@@echo 'LIST:ts/:S/two/2/="${LIST:ts/:S/two/2/}"'
	@@echo "Pretend the '/' in '/n' etc. below are back-slashes."
	@@echo 'LIST:ts/n="${LIST:ts\n}"'
	@@echo 'LIST:ts/t="${LIST:ts\t}"'
	@@echo 'LIST:ts/012:tu="${LIST:ts\012:tu}"'
	@@echo 'LIST:tx="${LIST:tx}"'
	@@echo 'LIST:ts/x:tu="${LIST:ts\x:tu}"'
	@@echo 'FU_$@@="${FU_${@@:ts}:ts}"'
	@@echo 'FU_$@@:ts:T="${FU_${@@:ts}:ts:T}" == cool?'
	@@echo 'B.$${AAA:ts}="${B.${AAA:ts}}" == Baaa?'

# Some tests are best handled via a sub-make
.PHONY: varcmd modword
varcmd modword:
	@@${.MAKE} -k -f ${UNIT_TESTS}/$@@

.PHONY:	ternary
ternary:
a33 2
	@@${.MAKE} -k -f ${UNIT_TESTS}/$@@ A=
	@@${.MAKE} -k -f ${UNIT_TESTS}/$@@ A=42
d42 3
a44 1
# here is the driver
@


1.9
log
@Add unit test for ternary modifier
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.8 2003/09/27 21:29:37 sjg Exp $
d56 1
@


1.8
log
@Implement :[] modifier to allow picking a range of words out of a variable.
Also :tW and a W flag to :C and :S to allow treating value as a single word.
Add unit tests for the above, and fix some corner cases.
Based on patches supplied by Alan Barrett <apb@@cequrux.com>
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.7 2003/08/08 06:42:38 sjg Exp $
d19 1
a19 1
all: mod-ts varcmd modword
d56 5
@


1.7
log
@Hook make unit-tests into regress
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.6 2003/08/01 04:57:20 sjg Exp $
d19 1
a19 1
all: mod-ts varcmd
d26 3
d33 2
d49 1
d51 4
a54 3
.PHONY: varcmd
varcmd:
	@@${.MAKE} -f ${UNIT_TESTS}/varcmd
@


1.6
log
@Avoid \a as a test of invalid separator, since if we make ksh the default
shell, we get different results.  \x seems safe.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.5 2003/07/31 00:46:15 sjg Exp $
d17 2
d47 1
a47 1
	@@${.MAKE} -f ${MAKEFILE:H}/varcmd
d62 1
a62 1
	diff -u ${.CURDIR}/${.TARGET}.exp ${.TARGET}.out
@


1.5
log
@Test behavior of commandline variable assignments.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.4 2003/07/29 08:44:42 sjg Exp $
d39 1
a39 1
	@@echo 'LIST:ts/a:tu="${LIST:ts\a:tu}"'
d57 1
a57 1
	@@cd ${.OBJDIR}; ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
@


1.4
log
@First bug picked up by the unit tests - delim wasn't always initialized.
Avoid putting '\' in test case script lines since shell's like that on
SunOS insist on interpreting them.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.3 2003/07/29 08:16:01 sjg Exp $
d17 1
a17 1
all: mod-ts
d43 4
d57 1
a57 1
	@@${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
@


1.3
log
@Use single quotes to protect everything from shell's that might
alter the results.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.2 2003/07/29 06:35:09 sjg Exp $
d34 4
a37 3
	@@echo 'LIST:ts\n="${LIST:ts\n}"'
	@@echo 'LIST:ts\t="${LIST:ts\t}"'
	@@echo 'LIST:ts\012:tu="${LIST:ts\012:tu}"'
d39 1
a39 1
	@@echo 'LIST:ts\a:tu="${LIST:ts\a:tu}"'
@


1.2
log
@Regardless of the name of TEST_MAKE, force it to make in test.exp
to avoid needless failures.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.1 2003/07/28 22:52:12 sjg Exp $
d25 16
a40 16
	@@echo LIST='${LIST}'
	@@echo LIST:ts,='${LIST:ts,}'
	@@echo LIST:ts/:tu='${LIST:ts/:tu}'
	@@echo LIST:tu:ts/='${LIST:tu:ts/}'
	@@echo LIST:ts:='${LIST:ts:}'
	@@echo LIST:ts='${LIST:ts}'
	@@echo LIST:ts:S/two/2/='${LIST:ts:S/two/2/}'
	@@echo LIST:S/two/2/:ts='${LIST:S/two/2/:ts}'
	@@echo LIST:ts/:S/two/2/='${LIST:ts/:S/two/2/}'
	@@echo "LIST:ts\n='${LIST:ts\n}'"
	@@echo "LIST:ts\t='${LIST:ts\t}'"
	@@echo "LIST:ts\012:tu='${LIST:ts\012:tu}'"
	@@echo "LIST:tx='${LIST:tx}'"
	@@echo "LIST:ts\a:tu='${LIST:ts\a:tu}'"
	@@echo "FU_$@@='${FU_${@@:ts}:ts}'"
	@@echo "FU_$@@:ts:T='${FU_${@@:ts}:ts:T}' == cool?"
@


1.1
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
# $Id$
d52 2
a53 1
	@@${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1 || { \
@
