head	1.58;
access;
symbols
	netbsd-9-5-RELEASE:1.52.6.1
	perseant-exfatfs-base-20250801:1.58
	netbsd-10-1-RELEASE:1.52.14.2
	perseant-exfatfs-base-20240630:1.57
	perseant-exfatfs:1.57.0.2
	perseant-exfatfs-base:1.57
	netbsd-8-3-RELEASE:1.51
	netbsd-9-4-RELEASE:1.52
	netbsd-10-0-RELEASE:1.52.14.1
	netbsd-10-0-RC6:1.52.14.1
	netbsd-10-0-RC5:1.52.14.1
	netbsd-10-0-RC4:1.52.14.1
	netbsd-10-0-RC3:1.52.14.1
	netbsd-10-0-RC2:1.52.14.1
	netbsd-10-0-RC1:1.52.14.1
	netbsd-10:1.52.0.14
	netbsd-10-base:1.52
	netbsd-9-3-RELEASE:1.52
	cjep_sun2x-base1:1.52
	cjep_sun2x:1.52.0.12
	cjep_sun2x-base:1.52
	cjep_staticlib_x-base1:1.52
	netbsd-9-2-RELEASE:1.52
	cjep_staticlib_x:1.52.0.10
	cjep_staticlib_x-base:1.52
	netbsd-9-1-RELEASE:1.52
	phil-wifi-20200421:1.52
	phil-wifi-20200411:1.52
	is-mlppp:1.52.0.8
	is-mlppp-base:1.52
	phil-wifi-20200406:1.52
	netbsd-8-2-RELEASE:1.51
	netbsd-9-0-RELEASE:1.52
	netbsd-9-0-RC2:1.52
	netbsd-9-0-RC1:1.52
	phil-wifi-20191119:1.52
	netbsd-9:1.52.0.6
	netbsd-9-base:1.52
	phil-wifi-20190609:1.52
	netbsd-8-1-RELEASE:1.51
	netbsd-8-1-RC1:1.51
	pgoyette-compat-merge-20190127:1.52
	pgoyette-compat-20190127:1.52
	pgoyette-compat-20190118:1.52
	pgoyette-compat-1226:1.52
	pgoyette-compat-1126:1.52
	pgoyette-compat-1020:1.52
	pgoyette-compat-0930:1.52
	pgoyette-compat-0906:1.52
	netbsd-7-2-RELEASE:1.50
	pgoyette-compat-0728:1.52
	netbsd-8-0-RELEASE:1.51
	phil-wifi:1.52.0.4
	phil-wifi-base:1.52
	pgoyette-compat-0625:1.52
	netbsd-8-0-RC2:1.51
	pgoyette-compat-0521:1.52
	pgoyette-compat-0502:1.52
	pgoyette-compat-0422:1.52
	netbsd-8-0-RC1:1.51
	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.50
	pgoyette-compat:1.52.0.2
	pgoyette-compat-base:1.52
	netbsd-7-1-1-RELEASE:1.50
	matt-nb8-mediatek:1.51.0.8
	matt-nb8-mediatek-base:1.51
	perseant-stdc-iso10646:1.51.0.6
	perseant-stdc-iso10646-base:1.51
	netbsd-8:1.51.0.4
	netbsd-8-base:1.51
	prg-localcount2-base3:1.51
	prg-localcount2-base2:1.51
	prg-localcount2-base1:1.51
	prg-localcount2:1.51.0.2
	prg-localcount2-base:1.51
	pgoyette-localcount-20170426:1.51
	bouyer-socketcan-base1:1.51
	pgoyette-localcount-20170320:1.51
	netbsd-7-1:1.50.0.14
	netbsd-7-1-RELEASE:1.50
	netbsd-7-1-RC2:1.50
	netbsd-7-nhusb-base-20170116:1.50
	bouyer-socketcan:1.50.0.12
	bouyer-socketcan-base:1.50
	pgoyette-localcount-20170107:1.50
	netbsd-7-1-RC1:1.50
	pgoyette-localcount-20161104:1.50
	netbsd-7-0-2-RELEASE:1.50
	localcount-20160914:1.50
	netbsd-7-nhusb:1.50.0.10
	netbsd-7-nhusb-base:1.50
	pgoyette-localcount-20160806:1.50
	pgoyette-localcount-20160726:1.50
	pgoyette-localcount:1.50.0.8
	pgoyette-localcount-base:1.50
	netbsd-7-0-1-RELEASE:1.50
	netbsd-7-0:1.50.0.6
	netbsd-7-0-RELEASE:1.50
	netbsd-7-0-RC3:1.50
	netbsd-7-0-RC2:1.50
	netbsd-7-0-RC1:1.50
	netbsd-5-2-3-RELEASE:1.38
	netbsd-5-1-5-RELEASE:1.38
	netbsd-6-0-6-RELEASE:1.49
	netbsd-6-1-5-RELEASE:1.49
	netbsd-7:1.50.0.4
	netbsd-7-base:1.50
	yamt-pagecache-base9:1.50
	yamt-pagecache-tag8:1.49
	netbsd-6-1-4-RELEASE:1.49
	netbsd-6-0-5-RELEASE:1.49
	tls-earlyentropy:1.50.0.2
	tls-earlyentropy-base:1.50
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.50
	riastradh-drm2-base3:1.49
	netbsd-6-1-3-RELEASE:1.49
	netbsd-6-0-4-RELEASE:1.49
	netbsd-5-2-2-RELEASE:1.38
	netbsd-5-1-4-RELEASE:1.38
	netbsd-6-1-2-RELEASE:1.49
	netbsd-6-0-3-RELEASE:1.49
	netbsd-5-2-1-RELEASE:1.38
	netbsd-5-1-3-RELEASE:1.38
	netbsd-6-1-1-RELEASE:1.49
	riastradh-drm2-base2:1.49
	riastradh-drm2-base1:1.49
	riastradh-drm2:1.49.0.16
	riastradh-drm2-base:1.49
	netbsd-6-1:1.49.0.22
	netbsd-6-0-2-RELEASE:1.49
	netbsd-6-1-RELEASE:1.49
	khorben-n900:1.49.0.20
	netbsd-6-1-RC4:1.49
	netbsd-6-1-RC3:1.49
	agc-symver:1.49.0.18
	agc-symver-base:1.49
	netbsd-6-1-RC2:1.49
	netbsd-6-1-RC1:1.49
	yamt-pagecache-base8:1.49
	netbsd-5-2:1.38.0.12
	netbsd-6-0-1-RELEASE:1.49
	yamt-pagecache-base7:1.49
	netbsd-5-2-RELEASE:1.38
	netbsd-5-2-RC1:1.38
	matt-nb6-plus-nbase:1.49
	yamt-pagecache-base6:1.49
	netbsd-6-0:1.49.0.14
	netbsd-6-0-RELEASE:1.49
	netbsd-6-0-RC2:1.49
	tls-maxphys:1.49.0.12
	tls-maxphys-base:1.50
	matt-nb6-plus:1.49.0.10
	matt-nb6-plus-base:1.49
	netbsd-6-0-RC1:1.49
	yamt-pagecache-base5:1.49
	yamt-pagecache-base4:1.49
	netbsd-6:1.49.0.8
	netbsd-6-base:1.49
	netbsd-5-1-2-RELEASE:1.38
	netbsd-5-1-1-RELEASE:1.38
	yamt-pagecache-base3:1.49
	yamt-pagecache-base2:1.49
	yamt-pagecache:1.49.0.6
	yamt-pagecache-base:1.49
	cherry-xenmp:1.49.0.4
	cherry-xenmp-base:1.49
	bouyer-quota2-nbase:1.49
	bouyer-quota2:1.49.0.2
	bouyer-quota2-base:1.49
	matt-mips64-premerge-20101231:1.49
	matt-nb5-mips64-premerge-20101231:1.38
	matt-nb5-pq3:1.38.0.10
	matt-nb5-pq3-base:1.38
	netbsd-5-1:1.38.0.8
	netbsd-5-1-RELEASE:1.38
	netbsd-5-1-RC4:1.38
	matt-nb5-mips64-k15:1.38
	netbsd-5-1-RC3:1.38
	netbsd-5-1-RC2:1.38
	netbsd-5-1-RC1:1.38
	netbsd-5-0-2-RELEASE:1.38
	matt-nb5-mips64-premerge-20091211:1.38
	matt-premerge-20091211:1.49
	playstation2-eol-2009:1.48
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.38
	matt-nb4-mips64-k7-u2a-k9b:1.38
	matt-nb5-mips64-u1-k1-k5:1.38
	matt-nb5-mips64:1.38.0.6
	netbsd-5-0-1-RELEASE:1.38
	jym-xensuspend-nbase:1.48
	netbsd-5-0:1.38.0.4
	netbsd-5-0-RELEASE:1.38
	netbsd-5-0-RC4:1.38
	netbsd-5-0-RC3:1.38
	netbsd-5-0-RC2:1.38
	jym-xensuspend:1.39.0.2
	jym-xensuspend-base:1.48
	netbsd-5-0-RC1:1.38
	netbsd-5:1.38.0.2
	netbsd-5-base:1.38
	matt-mips64-base2:1.37
	matt-mips64:1.34.0.6
	netbsd-4-0-1-RELEASE:1.29
	wrstuden-revivesa-base-3:1.37
	wrstuden-revivesa-base-2:1.37
	wrstuden-fixsa-newbase:1.29
	wrstuden-revivesa-base-1:1.37
	yamt-pf42-base4:1.37
	yamt-pf42-base3:1.37
	hpcarm-cleanup-nbase:1.37
	yamt-pf42-baseX:1.37
	yamt-pf42-base2:1.37
	wrstuden-revivesa:1.37.0.12
	wrstuden-revivesa-base:1.37
	yamt-pf42:1.37.0.10
	yamt-pf42-base:1.37
	mjf-devfs2:1.37.0.8
	mjf-devfs2-base:1.37
	keiichi-mipv6:1.37.0.6
	keiichi-mipv6-base:1.37
	mjf-devfs:1.37.0.4
	mjf-devfs-base:1.37
	matt-armv6-nbase:1.37
	matt-armv6-prevmlocking:1.34
	wrstuden-fixsa-base-1:1.29
	netbsd-4-0:1.29.0.6
	netbsd-4-0-RELEASE:1.29
	cube-autoconf:1.37.0.2
	cube-autoconf-base:1.37
	netbsd-4-0-RC5:1.29
	netbsd-4-0-RC4:1.29
	netbsd-4-0-RC3:1.29
	netbsd-4-0-RC2:1.29
	netbsd-4-0-RC1:1.29
	matt-armv6:1.34.0.4
	matt-armv6-base:1.37
	matt-mips64-base:1.34
	hpcarm-cleanup:1.34.0.2
	hpcarm-cleanup-base:1.37
	netbsd-3-1-1-RELEASE:1.24.2.1
	netbsd-3-0-3-RELEASE:1.24.2.1
	wrstuden-fixsa:1.29.0.4
	wrstuden-fixsa-base:1.29
	abandoned-netbsd-4-base:1.27
	abandoned-netbsd-4:1.27.0.2
	netbsd-3-1:1.24.2.1.0.4
	netbsd-3-1-RELEASE:1.24.2.1
	netbsd-3-0-2-RELEASE:1.24.2.1
	netbsd-3-1-RC4:1.24.2.1
	netbsd-3-1-RC3:1.24.2.1
	netbsd-3-1-RC2:1.24.2.1
	netbsd-3-1-RC1:1.24.2.1
	netbsd-4:1.29.0.2
	netbsd-4-base:1.29
	netbsd-3-0-1-RELEASE:1.24.2.1
	netbsd-3-0:1.24.2.1.0.2
	netbsd-3-0-RELEASE:1.24.2.1
	netbsd-3-0-RC6:1.24.2.1
	netbsd-3-0-RC5:1.24.2.1
	netbsd-3-0-RC4:1.24.2.1
	netbsd-3-0-RC3:1.24.2.1
	netbsd-3-0-RC2:1.24.2.1
	netbsd-3-0-RC1:1.24.2.1
	netbsd-2-0-3-RELEASE:1.21
	netbsd-2-1:1.21.0.6
	netbsd-2-1-RELEASE:1.21
	netbsd-2-1-RC6:1.21
	netbsd-2-1-RC5:1.21
	netbsd-2-1-RC4:1.21
	netbsd-2-1-RC3:1.21
	netbsd-2-1-RC2:1.21
	netbsd-2-1-RC1:1.21
	netbsd-2-0-2-RELEASE:1.21
	netbsd-3:1.24.0.2
	netbsd-3-base:1.24
	netbsd-2-0-1-RELEASE:1.21
	netbsd-2:1.21.0.4
	netbsd-2-base:1.21
	netbsd-2-0-RELEASE:1.21
	netbsd-2-0-RC5:1.21
	netbsd-2-0-RC4:1.21
	netbsd-2-0-RC3:1.21
	netbsd-2-0-RC2:1.21
	netbsd-2-0-RC1:1.21
	netbsd-2-0:1.21.0.2
	netbsd-2-0-base:1.21
	netbsd-1-6-PATCH002-RELEASE:1.5.2.1
	netbsd-1-6-PATCH002:1.5.2.1
	netbsd-1-6-PATCH002-RC4:1.5.2.1
	netbsd-1-6-PATCH002-RC3:1.5.2.1
	netbsd-1-6-PATCH002-RC2:1.5.2.1
	netbsd-1-6-PATCH002-RC1:1.5.2.1
	netbsd-1-6-PATCH001:1.5.2.1
	netbsd-1-6-PATCH001-RELEASE:1.5.2.1
	netbsd-1-6-PATCH001-RC3:1.5.2.1
	netbsd-1-6-PATCH001-RC2:1.5.2.1
	netbsd-1-6-PATCH001-RC1:1.5.2.1
	fvdl_fs64_base:1.15
	netbsd-1-6-RELEASE:1.5.2.1
	netbsd-1-6-RC3:1.5.2.1
	netbsd-1-6-RC2:1.5.2.1
	netbsd-1-6-RC1:1.5.2.1
	netbsd-1-6:1.5.0.2
	netbsd-1-6-base:1.5;
locks; strict;
comment	@# @;


1.58
date	2024.12.28.18.37.39;	author tsutsui;	state dead;
branches;
next	1.57;
commitid	aJ6JbOyAOwH1AiDF;

1.57
date	2024.06.08.13.03.40;	author tsutsui;	state Exp;
branches
	1.57.2.1;
next	1.56;
commitid	9uU4nBBlDycUfbdF;

1.56
date	2024.05.31.20.57.32;	author tsutsui;	state Exp;
branches;
next	1.55;
commitid	HMWYul6aG5JS7ccF;

1.55
date	2024.05.31.20.54.33;	author tsutsui;	state Exp;
branches;
next	1.54;
commitid	vDDIXV0LjRNm7ccF;

1.54
date	2024.05.16.14.21.45;	author tsutsui;	state Exp;
branches;
next	1.53;
commitid	buYHX5Yi3TpDqeaF;

1.53
date	2023.05.19.14.47.16;	author hauke;	state Exp;
branches;
next	1.52;
commitid	Jue05KTEtys6eApE;

1.52
date	2018.01.24.09.04.40;	author skrll;	state Exp;
branches
	1.52.6.1
	1.52.14.1;
next	1.51;
commitid	chDfudLRSHNjJ6oA;

1.51
date	2017.02.11.03.07.06;	author christos;	state Exp;
branches;
next	1.50;
commitid	RQbVHlgh5ObhUtFz;

1.50
date	2014.03.31.11.25.47;	author martin;	state Exp;
branches
	1.50.8.1
	1.50.12.1;
next	1.49;
commitid	8ger15aQpmwzlQux;

1.49
date	2009.12.05.16.29.10;	author pooka;	state Exp;
branches
	1.49.6.1
	1.49.12.1;
next	1.48;

1.48
date	2009.03.29.04.56.16;	author tsutsui;	state Exp;
branches;
next	1.47;

1.47
date	2009.03.25.13.53.05;	author tsutsui;	state Exp;
branches;
next	1.46;

1.46
date	2009.03.25.09.50.21;	author tsutsui;	state Exp;
branches;
next	1.45;

1.45
date	2009.03.22.08.43.54;	author tsutsui;	state Exp;
branches;
next	1.44;

1.44
date	2009.03.22.08.22.37;	author tsutsui;	state Exp;
branches;
next	1.43;

1.43
date	2009.03.22.07.35.43;	author tsutsui;	state Exp;
branches;
next	1.42;

1.42
date	2009.03.21.23.52.38;	author tsutsui;	state Exp;
branches;
next	1.41;

1.41
date	2009.03.21.22.41.57;	author tsutsui;	state Exp;
branches;
next	1.40;

1.40
date	2009.03.09.11.34.37;	author tsutsui;	state Exp;
branches;
next	1.39;

1.39
date	2009.01.28.17.11.54;	author tsutsui;	state Exp;
branches
	1.39.2.1;
next	1.38;

1.38
date	2008.10.25.22.27.34;	author apb;	state Exp;
branches;
next	1.37;

1.37
date	2007.12.08.12.30.18;	author tsutsui;	state Exp;
branches
	1.37.4.1
	1.37.8.1;
next	1.36;

1.36
date	2007.12.07.21.08.58;	author tsutsui;	state Exp;
branches;
next	1.35;

1.35
date	2007.12.07.18.35.21;	author tsutsui;	state Exp;
branches;
next	1.34;

1.34
date	2007.03.08.13.51.37;	author bouyer;	state Exp;
branches
	1.34.4.1;
next	1.33;

1.33
date	2007.03.04.04.59.41;	author tsutsui;	state Exp;
branches;
next	1.32;

1.32
date	2007.03.04.04.27.21;	author tsutsui;	state Exp;
branches;
next	1.31;

1.31
date	2007.03.04.03.52.08;	author tsutsui;	state Exp;
branches;
next	1.30;

1.30
date	2007.02.20.18.09.05;	author mrg;	state Exp;
branches;
next	1.29;

1.29
date	2006.09.17.03.56.03;	author tsutsui;	state Exp;
branches;
next	1.28;

1.28
date	2006.09.17.03.20.46;	author tsutsui;	state Exp;
branches;
next	1.27;

1.27
date	2005.12.03.01.23.23;	author riz;	state Exp;
branches
	1.27.2.1;
next	1.26;

1.26
date	2005.10.22.15.56.16;	author riz;	state Exp;
branches;
next	1.25;

1.25
date	2005.10.04.19.29.34;	author martin;	state Exp;
branches;
next	1.24;

1.24
date	2005.01.20.08.05.55;	author jmc;	state Exp;
branches
	1.24.2.1;
next	1.23;

1.23
date	2004.12.31.08.34.13;	author jmc;	state Exp;
branches;
next	1.22;

1.22
date	2004.10.13.23.28.34;	author gavan;	state Exp;
branches;
next	1.21;

1.21
date	2004.02.29.01.08.22;	author jmc;	state Exp;
branches;
next	1.20;

1.20
date	2003.07.26.17.06.38;	author salo;	state Exp;
branches;
next	1.19;

1.19
date	2003.07.10.11.23.53;	author lukem;	state Exp;
branches;
next	1.18;

1.18
date	2003.07.10.10.34.04;	author lukem;	state Exp;
branches;
next	1.17;

1.17
date	2003.03.07.09.52.59;	author lukem;	state Exp;
branches;
next	1.16;

1.16
date	2003.02.13.23.55.12;	author jmc;	state Exp;
branches;
next	1.15;

1.15
date	2002.12.09.14.20.52;	author scw;	state Exp;
branches;
next	1.14;

1.14
date	2002.10.21.05.08.23;	author lukem;	state Exp;
branches;
next	1.13;

1.13
date	2002.10.08.15.20.50;	author lukem;	state Exp;
branches;
next	1.12;

1.12
date	2002.10.03.07.28.33;	author lukem;	state Exp;
branches;
next	1.11;

1.11
date	2002.10.03.05.26.49;	author lukem;	state Exp;
branches;
next	1.10;

1.10
date	2002.10.03.03.58.56;	author lukem;	state Exp;
branches;
next	1.9;

1.9
date	2002.09.29.14.29.19;	author lukem;	state Exp;
branches;
next	1.8;

1.8
date	2002.09.29.07.23.15;	author lukem;	state Exp;
branches;
next	1.7;

1.7
date	2002.06.24.14.49.15;	author mrg;	state Exp;
branches;
next	1.6;

1.6
date	2002.06.15.02.15.15;	author lukem;	state Exp;
branches;
next	1.5;

1.5
date	2001.01.17.02.07.25;	author tv;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2000.11.30.21.33.41;	author tv;	state Exp;
branches;
next	1.3;

1.3
date	2000.11.30.00.04.08;	author tv;	state Exp;
branches;
next	1.2;

1.2
date	2000.11.29.19.56.19;	author tv;	state Exp;
branches;
next	1.1;

1.1
date	2000.11.29.16.35.03;	author tv;	state Exp;
branches;
next	;

1.57.2.1
date	2025.08.02.05.20.19;	author perseant;	state dead;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.52.6.1
date	2024.08.24.08.12.58;	author martin;	state Exp;
branches;
next	;
commitid	PwoU1EEQoCqPa3nF;

1.52.14.1
date	2023.05.28.09.58.41;	author martin;	state Exp;
branches;
next	1.52.14.2;
commitid	6cAL4WEa9x3SlIqE;

1.52.14.2
date	2024.07.03.18.38.53;	author martin;	state Exp;
branches;
next	;
commitid	ukIKIblTxA6ajqgF;

1.50.8.1
date	2017.03.20.06.52.04;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.50.12.1
date	2017.04.21.16.51.08;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.49.6.1
date	2014.05.22.12.01.27;	author yamt;	state Exp;
branches;
next	;
commitid	yqlfOuaAhYmASwBx;

1.49.12.1
date	2014.08.19.23.45.38;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.39.2.1
date	2009.05.13.19.17.40;	author jym;	state Exp;
branches;
next	;

1.37.4.1
date	2007.12.08.12.30.18;	author tsutsui;	state dead;
branches;
next	1.37.4.2;

1.37.4.2
date	2007.12.08.12.30.19;	author tsutsui;	state Exp;
branches;
next	;

1.37.8.1
date	2008.10.05.20.10.14;	author mjf;	state dead;
branches;
next	;

1.34.4.1
date	2008.01.09.01.27.51;	author matt;	state Exp;
branches;
next	;

1.27.2.1
date	2006.09.25.21.48.18;	author tron;	state Exp;
branches;
next	1.27.2.2;

1.27.2.2
date	2006.09.25.21.51.39;	author tron;	state Exp;
branches;
next	;

1.24.2.1
date	2005.10.06.11.45.59;	author tron;	state Exp;
branches;
next	;

1.5.2.1
date	2002.06.15.02.19.39;	author lukem;	state Exp;
branches;
next	;


desc
@@


1.58
log
@Remove historical distrib/cdrom stuff.

All release ISO images are now handled by build.sh without these files.

No objection on tech-install@@:
 https://mail-index.netbsd.org/tech-install/2024/09/15/msg000752.html
@
text
@# $NetBSD: Makefile,v 1.57 2024/06/08 13:03:40 tsutsui Exp $
#
# Consult "*.conf" for the configuration variables; this Makefile is typically
# not edited for basic configuration changes.
##############################################################################

all:	cdimages

.include <bsd.own.mk>

.if exists(site.conf)
.include "site.conf"
.endif

.if ${MKREPRO_TIMESTAMP:Uno} != "no"
PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
.endif

.if !defined(RELEASE)
.BEGIN:
	@@echo "Please set RELEASE in the environment or in site.conf to the basename"
	@@echo "of the release configuration file to use.  For example:"
	@@echo "> ${MAKE} RELEASE=foo"
	@@echo "will use the configuration file foo.conf."
	@@false
.endif

.if exists(${RELEASE}.conf)
.include "${RELEASE}.conf"
.elif !target(.BEGIN)
.BEGIN:
	@@echo "Error: File does not exist: ${RELEASE}.conf"
	@@false
.endif

CD_RELEASE?=
CD_SIZE?=		650000
RELEASENAME?=		NetBSD-${CD_RELEASE}
MKISOFS_ARGS=		-A "NetBSD ${CD_RELEASE}" \
			-hide-rr-moved -m Split -m cdrom
#			-hide-list ${.CURDIR}/hide-iso.lst

ALL_PORTS=
.for image in ${CD_IMAGES}
BASE_PORTS.${image}?=
ALL_PORTS:=		${ALL_PORTS} ${BASE_PORTS.${image}}
.endfor

.if exists(${RELEASENAME}.mk)
.include "${RELEASENAME}.mk"
.elif !target(.BEGIN)
.if !empty(CD_RELEASE)
.BEGIN:
	@@echo "Error: File does not exist: ${RELEASENAME}.mk"
	@@echo "(specified by variable CD_RELEASE in ${RELEASE}.conf)"
	@@false
.else
.BEGIN:
	@@echo "Error: CD_RELEASE not set in ${RELEASE}.conf"
	@@false
.endif
.endif

SUBDIR=

.if !empty(ALL_PORTS:Mmac68k) || !empty(ALL_PORTS:Mmacppc)
MKISOFS=	${TOOL_MKHYBRID}
.endif

.if !empty(SUBDIR)
.include <bsd.subdir.mk>
.endif

.include <bsd.obj.mk>
.include <bsd.own.mk>

##### Default paths for programs #####

MKISOFS?=	/usr/local/bin/mkisofs
RSYNC?=		/usr/pkg/bin/rsync
ALPHA_IBOOT?=	${TOOL_INSTALLBOOT} -m alpha -o sunsum,append
PMAX_IBOOT?=	${TOOL_INSTALLBOOT} -m pmax -o sunsum,append
VAX_IBOOT?=	${TOOL_INSTALLBOOT} -m vax -o sunsum,append
.if !empty(ALL_PORTS:Msgimips)
SGIMIPS_SGIVOL?=	${TOOLDIR}/bin/nbsgivol
.endif

check_mkisofs:
.if !exists(${MKISOFS})
	@@echo "Error: File does not exist: ${MKISOFS}"
	@@echo "Please build and install mkisofs(8) utility and set MKISOFS in the environment"
	@@echo "or in site.conf to create image."
	@@false
.endif

check_rsync:
.if !exists(${RSYNC})
	@@echo "Error: File does not exist: ${RSYNC}"
	@@echo "Please build and install rsync(1) utility and set RSYNC in the environment"
	@@echo "or in site.conf to fetch release binaries."
	@@false
.endif

##### rsync settings #####

# rsync host; check mirrors on http://www.NetBSD.org/mirrors/#rsync
# (note not all rsync mirrors provide NetBSD-daily)
RSYNC_HOST?=	rsync.NetBSD.org

# extra path for rsync mirrors ("/pub", "/netbsd" etc.)
RSYNC_PATH_PREFIX?=

.if !target(.BEGIN)
.if ${RELEASE} == "current"
# daily date dir name
BRANCH?=	HEAD
#DAILY_DIR?=	yyyymmddhhmmZ
RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD-daily/${BRANCH}/${DAILY_DIR}
.else
# extra suffix on pre-release ("_BETA2", "_RC5" etc.)
RELEASE_SUFFIX?=
RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD/${RELEASENAME}${RELEASE_SUFFIX}

# alternative for NetBSD-daily sets of stable branches
#DAILY_DIR?=	yyyymmddhhmmZ
#BRANCH?=	netbsd-4
#RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD-daily/${BRANCH}/${DAILY_DIR}
.endif
.endif

RSYNC_SITE?=	rsync://${RSYNC_HOST}${RSYNC_PATH}
RSYNC_ARGS?=	-va --delete
RSYNC_EXCLUDE+=	--exclude=/* --exclude=Split --exclude=cdrom

DOWNLOADDIR?=	${.OBJDIR}/download
DISTRIBDIR?=	${DOWNLOADDIR}
STAGEDIR?=	${.OBJDIR}/staging
IMAGEDIR?=	${.OBJDIR}
EXTFILEDIR?=	${.OBJDIR}/extfiles
EASTER_EGG?=	/dev/null

##### MACHINE_ARCH for possible shared sets for each (shared) port #####

MACHINE_ARCH.acorn32=	arm
MACHINE_ARCH.algor=	mipsel
MACHINE_ARCH.amiga=	m68k
MACHINE_ARCH.amigappc=	powerpc
MACHINE_ARCH.arc=	mipsel
MACHINE_ARCH.atari=	m68k
MACHINE_ARCH.bebox=	powerpc
MACHINE_ARCH.cats=	arm
MACHINE_ARCH.cesfic=	m68k
MACHINE_ARCH.cobalt=	mipsel
MACHINE_ARCH.dreamcast=	sh3el
MACHINE_ARCH.evbarm=	arm
MACHINE_ARCH.evbmips=	mipsel
MACHINE_ARCH.evbppc=	powerpc
MACHINE_ARCH.evbsh3=	sh3eb
MACHINE_ARCH.hp300=	m68k
MACHINE_ARCH.hpcarm=	arm
MACHINE_ARCH.hpcmips=	mipsel
MACHINE_ARCH.hpcsh=	sh3el
MACHINE_ARCH.iyonix=	arm
MACHINE_ARCH.luna68k=	m68k
MACHINE_ARCH.mac68k=	m68k
MACHINE_ARCH.macppc=	powerpc
MACHINE_ARCH.mipsco=	mipseb
MACHINE_ARCH.mmeye=	sh3eb
MACHINE_ARCH.mvme68k=	m68k
MACHINE_ARCH.netwinder=	arm
MACHINE_ARCH.news68k=	m68k
MACHINE_ARCH.newsmips=	mipseb
MACHINE_ARCH.next68k=	m68k
MACHINE_ARCH.ofppc=	powerpc
MACHINE_ARCH.playstation2=mipsel
MACHINE_ARCH.pmax=	mipsel
MACHINE_ARCH.prep=	powerpc
MACHINE_ARCH.sandpoint=	powerpc
MACHINE_ARCH.sbmips=	mipseb
MACHINE_ARCH.sgimips=	mipseb
MACHINE_ARCH.shark=	arm
MACHINE_ARCH.sun3=	m68k
MACHINE_ARCH.x68k=	m68k

##### Fetched directories from FTP server #####

.if defined(ALL_PORTS) && !empty(ALL_PORTS)
RSYNC_INCLUDE+=		--include "/shared"
RSYNC_EXCLUDE+=		--exclude "/[a-z]*" \
			--exclude "/shared/[a-z]*"
.endif

RSYNC_ARCHS=
.for port in ${ALL_PORTS:O:u}			# {
RSYNC_INCLUDE+=		--include "/${port}"
.if defined(MACHINE_ARCH.${port})
RSYNC_ARCHS+=		${MACHINE_ARCH.${port}}
.endif
.endfor						# }
.for arch in ${RSYNC_ARCHS:O:u}
RSYNC_INCLUDE+=		--include "/shared/${arch}"
.endfor

##### Boot info and additional options for various platforms #####

.if defined(PUBLISHER)
MKISOFS_ARGS+=		-publisher "${PUBLISHER}"
.endif

.if defined(PREPARER)
MKISOFS_ARGS+=		-p "${PREPARER}"
.endif


##### Per image settings #####

.for image in ${CD_IMAGES}			# {
ports:=${BASE_PORTS.${image}}

.if !defined(VOLID.${image}) && !target(.BEGIN)
.BEGIN:
	@@echo "Error: VOLID.${image} not set in ${RELEASE}.conf"
	@@false
.endif

MKISOFS_ARGS.${image}=	-V "${VOLID.${image}}"

pathlist.${image}:=${STAGEDIR}/${image}.pathlist
contents.${image}:=${IMAGEDIR}/${image}.contents

MKISOFS_ARGS.${image}+=	-graft-points -path-list ${pathlist.${image}}

.if defined(ABSTRACT.${image})
MKISOFS_ARGS.${image}+=	-abstract ${ABSTRACT.${image}}
.endif

# Options specified in release config file

EXTFILES?=
INTFILES.${image}?=
INTDIRS.${image}?=
ADDFILES.${image}?=

bports=			# empty first
# For a source only cd just ignore the shared/ALL directory
.if ${ports} != "source" && exists(${DISTRIBDIR}/shared/ALL)
bports+=		shared/ALL
.endif
.for port in ${ports}					# {
EXTFILES+=		${EXTFILES.${port}}
INTFILES.${image}+=	${INTFILES.${port}}
INTDIRS.${image}+=	${INTDIRS.${port}}
ADDFILES.${image}+=	${ADDFILES.${port}}
MKISOFS_ARGS.${image}+=	${MKISOFS_ARGS.${port}}
# add shared/ALL and shared/${MACHINE_ARCH} to BASE_PORTS.${image}
bports+=		${port}
.if defined(MACHINE_ARCH.${port}) &&	\
    exists(${DISTRIBDIR}/shared/${MACHINE_ARCH.${port}})
bports+=		shared/${MACHINE_ARCH.${port}}
.endif
.endfor							# }
BASE_PORTS.${image}:=	${bports:O:u}


# i386

.if !empty(ports:Mi386)
.if empty(INTFILES.i386:Mbootxx_cd9660)
# non-emulation boot
MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.i386} -c boot.catalog -no-emul-boot
.else
#2.88MB emulation boot
MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.i386} -c boot.catalog
.endif
.endif

# amd64

.if !empty(ports:Mamd64)
.if empty(INTFILES.amd64:Mbootxx_cd9660)
# non-emulation boot
MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.amd64} -c boot.catalog -no-emul-boot
.else
#2.88MB emulation boot
MKISOFS_ARGS.${image}+= -b ${BOOTFILE.amd64} -c boot.catalog
.endif
.endif

# Mac (mac68k, macppc)

.if !empty(ports:Mmacppc)
BOOTHFS=	boothfs
MKISOFS_ARGS.${image}+=	-hfs -part -hide-hfs-list ${.CURDIR}/hide-hfs.lst \
	--macbin -map ${.CURDIR}/hfsmap.lst \
	-boot-hfs-file ${.OBJDIR}/${BOOTHFS}
UUDECODE_FILES=	${BOOTHFS}
.include <bsd.files.mk>
.elif defined(USE_APPLE_ISO) || !empty(ports:Mmac68k)
MKISOFS_ARGS.${image}+=	-apple --macbin -map ${.CURDIR}/hfsmap.lst
.endif

# Sun (sparc, sparc64, sun3)

SUN_BOOT_ARGS.${image}:=
.if !empty(ports:Msparc*) || !empty(ports:Msun3*)	# {
SUN_BOOT.123:=	-
SUN_BOOT.4:=	-
SUN_BOOT.5:=	-

.if !empty(ports:Msparc)
SUN_BOOT.123:=	${BOOTFILE.sparc}
.endif

.if !empty(ports:Msun3)					# {
.if !defined(BOOTFILE.sun3x)
# NetBSD >= 1.4; sun3 and sun3x are the same
SUN_BOOT.5:=	${BOOTFILE.sun3}
.endif
SUN_BOOT.4:=	${BOOTFILE.sun3}
.endif							# }

.if !empty(ports:Msun3x) && defined(BOOTFILE.sun3x)
# NetBSD < 1.4; sun3 and sun3x are separate
SUN_BOOT.5:=	${BOOTFILE.sun3x}
.endif

.if !empty(ports:Msparc64)				# {
.if (${SUN_BOOT.5} != "-")
# add warning
SUN_BOOT.5:=	${SUN_BOOT.5} ${BOOTFILE.sparc64}
.else
SUN_BOOT.5:=	${BOOTFILE.sparc64}
.endif
.endif							# }

SUN_BOOT_ARGS.${image}:= ${SUN_BOOT.123} ${SUN_BOOT.123} ${SUN_BOOT.123} ${SUN_BOOT.4} ${SUN_BOOT.5}

.if empty(SUN_BOOT_ARGS.${image}:N/dev/null)
SUN_BOOT_ARGS.${image}:=
.endif
.endif							# }

.endfor		# image in ${CD_IMAGES}		# }

##### Additional options for host OS's #####

# (USE_APPLE_ISO is tested above)

.if defined(USE_ROCK_RIDGE)
MKISOFS_ARGS+=		-r
.endif

.if defined(USE_LONG_NAMES)
MKISOFS_ARGS+=		-l
.endif

.if defined(USE_TRANS_TBL)
MKISOFS_ARGS+=		-T
.endif

.if defined(USE_JOLIET)
MKISOFS_ARGS+=		-J -hide-joliet-list ${.CURDIR}/hide-jol.lst
.if defined(USE_TRANS_TBL)
MKISOFS_ARGS+=		-hide-joliet-trans-tbl
.endif
.endif

##### File extract rule #####

USE-FILE: .USE
	@@if [ ! -r $@@ ]; then case $> in \
		/*,link) \
			echo "cp ${>:S/,link$//} $@@"; \
			cp ${>:S/,link$//} $@@;; \
		*,link) \
			echo "cp `pwd -P`/${>:S/,link$//} $@@"; \
			cp `pwd -P`/${>:S/,link$//} $@@;; \
		*.tgz,*) \
			echo "Extracting: $> --> $@@..."; \
			${TOOL_PAX} ${PAX_TIMESTAMP} -rnz \
			-f ${>:C/,.*$//} ${>:C/^.*,//} ; \
			cp ${>:C/^.*,//} $@@; rm -rf ${>:C/^.*,//} ;; \
		*.gz) echo "gunzip -c <$> >$@@"; gunzip -c <$> >$@@;; \
		*) echo "Unknown archive method for $@@"; false;; \
	esac; else true; fi

##### Makefile rules #####

.for image in ${CD_IMAGES}			# {
cdimages: ${IMAGEDIR}/${image}.iso

stage-${image}:
	mkdir -p ${STAGEDIR}/${image} ${EXTFILEDIR}
	rm -f ${pathlist.${image}} ${contents.${image}}
.if defined(BASE_PORTS.${image}) && !empty(BASE_PORTS.${image})
.for dir in ${INTDIRS.${image}}
	mkdir -p ${STAGEDIR}/${image}/${dir}
.endfor
.for arch in ${BASE_PORTS.${image}}
	@@echo "${arch}=${DISTRIBDIR}/${arch}" >> ${pathlist.${image}}
	@@echo "${arch}" >> ${contents.${image}}
.endfor
.endif

extfileprep:
.for file in ${EXTFILES}			# {
extfileprep: ${EXTFILEDIR}/${file:C/:.*$//}
${EXTFILEDIR}/${file:C/:.*$//}: ${DISTRIBDIR}/${file:C/^.*://} USE-FILE
${DISTRIBDIR}/${file:C/^.*://}: .PHONY
.endfor						# }

fileprep-${image}:
.for file in ${INTFILES.${image}}		# {
fileprep-${image}: ${STAGEDIR}/${image}/${file:C/:.*$//}
${STAGEDIR}/${image}/${file:C/:.*$//}: ${DISTRIBDIR}/${file:C/^.*://} USE-FILE
${DISTRIBDIR}/${file:C/^.*://}: .PHONY
.endfor						# }
.for file in ${ADDFILES.${image}}		# {
fileprep-${image}: ${STAGEDIR}/${image}/${file:C/:.*$//}
${STAGEDIR}/${image}/${file:C/:.*$//}: ${file:C/^.*://} USE-FILE
${file:C/^.*://}: .PHONY
.endfor						# }

.if !empty(BASE_PORTS.${image}:Mmacppc)
fileprep-${image}: ${BOOTHFS}
.endif

# Size the CD image.  This is done via the following formula:
# 1. Size the image produced by mkisofs.
# 2. Add images added by distrib/common/sunbootcd.sh by rounding to a 320k
#    boundary and adding each Sun image rounded to a 320k boundary.
# 3. Add bootfile sizes rounded up to 512 bytes for pmax and vax.
# 4. Round up to a 32k boundary, then add another 32k for TAO padding.

SGIVOLHDR.size= 4096

size-${image}: stage-${image} extfileprep fileprep-${image} check_mkisofs
	@@size=$$((`cd ${STAGEDIR}/${image} && \
		   ${MKISOFS} ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} \
			-print-size . 2>&1 \
		   | tee /dev/stderr \
		   | ${TOOL_SED} '/=/!d;s/^[^=]*=//'` * 2048)) && \
	if [ "${SUN_BOOT_ARGS.${image}}" != "" ]; then \
		size=$$(($$(($$size + 327679)) / 327680 * 327680)) && \
		bootfiles=`for f in ${SUN_BOOT_ARGS.${image}:N-:O}; do echo $$f; done | uniq` && \
		for f in $$bootfiles; do \
			bfsize=$$(${TOOL_STAT} -f '%z' $$f) && \
			size=$$(($$size + $$(($$(($$bfsize + 327679)) / 327680 * 327680)))); \
		done; \
	fi && \
	if [ "${BASE_PORTS.${image}:Mpmax}" != "" ]; then \
		size=$$(($$size + $$(($$(($$(${TOOL_STAT} -f '%z' ${BOOTFILE.pmax}) + 511)) / 512 * 512)))); \
	fi && \
	if [ "${BASE_PORTS.${image}:Mvax}" != "" ]; then \
		size=$$(($$size + $$(($$(($$(${TOOL_STAT} -f '%z' ${BOOTFILE.vax})  + 511)) / 512 * 512)))); \
	fi && \
	if [ "${BASE_PORTS.${image}:Msgimips}" != "" -a \
	    "${EXTFILES.sgimips}" != "" ]; then \
		size=$$(($$size + ${SGIVOLHDR.size} * 512)); \
	fi && \
	size=$$(($$(($$size + 16383)) / 16384 * 16384 + 32768)) && \
	sizek=$$(($$size / 1024)) && \
	echo "Projected size of ${image}.iso: $$size bytes ($${sizek}K)." && \
	if [ $$sizek -gt ${CD_SIZE} ]; then echo "Image too large for ${CD_SIZE} KB CD!"; false; fi

# Actually build the image with all the bootstrap goo....

${IMAGEDIR}/${image}.iso: size-${image} check_mkisofs
	@@sort -o ${contents.${image}} ${contents.${image}}
.if defined(LOG_MKISOFS)
	cd ${STAGEDIR}/${image} && ${MKISOFS} -o $@@ ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} -v -v . >${IMAGEDIR}/${image}.iso.log 2>&1
.else
	cd ${STAGEDIR}/${image} && ${MKISOFS} -o $@@ ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} .
.endif
.if !empty(SUN_BOOT_ARGS.${image})
	SUNLABEL=${TOOL_SUNLABEL:Q} \
	    ${HOST_SH} ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \
	    ${.TARGET} ${SUN_BOOT_ARGS.${image}}
.endif
.if !empty(BASE_PORTS.${image}:Mmacppc)
	${TOOL_MACPPCINSTALLBOOT} $@@ ${EXTFILEDIR}/macppc.bootxx /ofwboot
.endif
.if !empty(BASE_PORTS.${image}:Mpmax)
	${PMAX_IBOOT} $@@ ${BOOTFILE.pmax}
.endif
.if !empty(BASE_PORTS.${image}:Mvax)
	${VAX_IBOOT} $@@ ${BOOTFILE.vax}
.endif
.if !empty(BASE_PORTS.${image}:Malpha)
	${ALPHA_IBOOT} $@@ ${BOOTFILE.alpha}
.endif
.if !empty(BASE_PORTS.${image}:Msgimips) && defined(EXTFILES.sgimips)
	@@echo "Prepending SGI volume header"
	mv $@@ $@@.raw
	dd if=/dev/zero of=$@@.tmp bs=512 count=${SGIVOLHDR.size}
	dd if=$@@.raw of=$@@.tmp bs=512 seek=${SGIVOLHDR.size}
	${SGIMIPS_SGIVOL} -f -i -h ${SGIVOLHDR.size} $@@.tmp
	${SGIMIPS_SGIVOL} -f -w aoutboot ${STAGEDIR}/${image}/aoutboot $@@.tmp
	${SGIMIPS_SGIVOL} -f -w ip2xboot ${STAGEDIR}/${image}/ip2xboot $@@.tmp
	${SGIMIPS_SGIVOL} -f -w ip3xboot ${STAGEDIR}/${image}/ip3xboot $@@.tmp
	mv $@@.tmp $@@
	rm -f $@@.raw $@@.tmp
.endif
	@@echo Rounding up to 32k boundary and padding 32k....
	@@size=$$(${TOOL_STAT} -f '%z' $@@); \
	    pad=$$(( 32768 - ( $$size & 32767 ) )); \
	    [ $$pad = 32768 ] || \
	    dd if=/dev/zero bs=1 count=$$pad >>$@@ 2>/dev/null

.endfor		# image in ${CD_IMAGES}		# }

fetch: check_rsync
	@@mkdir -p ${DISTRIBDIR}
	@@echo Fetching distributions....
	${RSYNC} ${RSYNC_INCLUDE} ${RSYNC_ARGS} ${RSYNC_EXCLUDE} ${RSYNC_SITE}/ ${DISTRIBDIR}/

clean: cleanstagedir cleanimages
cleandir distclean: cleandownloaddir

cleanimages:
.for image in ${CD_IMAGES}
	-rm -f ${IMAGEDIR}/${image}.iso ${IMAGEDIR}/${image}.iso.log \
		${contents.${image}}
.endfor

cleanstagedir:
	-rm -rf ${STAGEDIR} ${EXTFILEDIR}

cleandownloaddir:
	-rm -rf ${DOWNLOADDIR}
@


1.57
log
@Build src/distrib/cdrom/macppc_installboot in src/tools as a tool.

Also use the tools version ${TOOLS_MACPPC_INSTALLBOOT} to create
bootable ISO9660/HFS hybrid installcd image for macppc.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.56 2024/05/31 20:57:32 tsutsui Exp $
@


1.57.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.57 2024/06/08 13:03:40 tsutsui Exp $
@


1.56
log
@Drop -data-change-warn from MKISOFS_FLAGS.

It's available only on cdrtools-3.x and later.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.55 2024/05/31 20:54:33 tsutsui Exp $
a69 4
.if !empty(ALL_PORTS:Mmacppc)
SUBDIR+=	macppc_installboot
.endif

a83 3
.if !empty(ALL_PORTS:Mmacppc)
MACPPC_IBOOTDIR!= cd ${.CURDIR}/macppc_installboot && ${PRINTOBJDIR}
.endif
a467 4
.if !empty(BASE_PORTS.${image}:Mmacppc)
${IMAGEDIR}/${image}.iso: all-macppc_installboot
.endif

d481 1
a481 2
	${MACPPC_IBOOTDIR}/macppc_installboot \
	    $@@ ${EXTFILEDIR}/macppc.bootxx /ofwboot
@


1.55
log
@Build mac68k and macppc iso images using tools/mkhybrid.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.54 2024/05/16 14:21:45 tsutsui Exp $
d301 1
a301 1
	--macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst \
d306 1
a306 1
MKISOFS_ARGS.${image}+=	-apple --macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst
@


1.54
log
@Add -data-change-warn to MKISOFS_ARGS for macppc as done for mac68k:

https://mail-index.netbsd.org/source-changes/2023/05/19/msg144826.html
> Creating Type&Creator mappings for .bin (macbinary encoded) files,
> mkisofs changes files, then turns around and complains they have been
> changed.
>
> This is a self-inflicted wound, so demote the error to a warning.

This looks to make macppccd builds with cdrtools-3.02a10.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.53 2023/05/19 14:47:16 hauke Exp $
d66 4
@


1.53
log
@Creating Type&Creator mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.

Reported upstream as <https://codeberg.org/schilytools/schilytools/issues/58>.

Arguably fixes PR toolchain/42166

Request pull-ups to netbsd-{8,9,10}.

XXX What about macppc?
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.52 2018/01/24 09:04:40 skrll Exp $
d297 1
a297 1
	--macbin -map ${.CURDIR}/hfsmap.lst \
@


1.52
log
@Remove port-acorn26

OK core@@
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.51 2017/02/11 03:07:06 christos Exp $
d291 1
a291 1
        
d302 1
a302 1
MKISOFS_ARGS.${image}+=	-apple --macbin -map ${.CURDIR}/hfsmap.lst
@


1.52.6.1
log
@Pull up following revision(s) (requested by hauke in ticket #1878):

	etc/etc.mac68k/Makefile.inc: revision 1.24
	distrib/cdrom/Makefile: revision 1.53

Creating Type&Creator mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.
Reported upstream as https://codeberg.org/schilytools/schilytools/issues/58

Arguably fixes PR toolchain/41266
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.52 2018/01/24 09:04:40 skrll Exp $
d291 1
a291 1

d302 1
a302 1
MKISOFS_ARGS.${image}+=	-apple --macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst
@


1.52.14.1
log
@Pull up following revision(s) (requested by lukem in ticket #178):

	etc/etc.mac68k/Makefile.inc: revision 1.24
	distrib/cdrom/Makefile: revision 1.53

Creating Type&Creator mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.

Reported upstream as <https://codeberg.org/schilytools/schilytools/issues/58>.

Arguably fixes PR toolchain/42166

Request pull-ups to netbsd-{8,9,10}.
XXX What about macppc?
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.52 2018/01/24 09:04:40 skrll Exp $
d291 1
a291 1

d302 1
a302 1
MKISOFS_ARGS.${image}+=	-apple --macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst
@


1.52.14.2
log
@Pull up following revision(s) (requested by tsutsui in ticket #733):

	external/gpl2/mkhybrid/dist/mkisofs.h: revision 1.6
	distrib/cdrom/Makefile: revision 1.55
	distrib/cdrom/macppc_installboot/Makefile: revision 1.12
	external/gpl2/mkhybrid/dist/getopt.c: revision 1.2
	external/gpl2/mkhybrid/dist/libfile/LEGAL.NOTICE: revision 1.1
	external/gpl2/mkhybrid/dist/write.c: revision 1.1
	distrib/cdrom/Makefile: revision 1.56
	distrib/cdrom/macppc_installboot/Makefile: revision 1.13
	distrib/cdrom/macppc_installboot/installboot.c: revision 1.6
	external/gpl2/mkhybrid/dist/getopt.c: revision 1.3
	external/gpl2/mkhybrid/dist/write.c: revision 1.2
	external/gpl2/mkhybrid/dist/libhfs_iso/data.h: revision 1.1
	distrib/cdrom/Makefile: revision 1.57
	distrib/cdrom/macppc_installboot/Makefile: revision 1.14
	distrib/cdrom/macppc_installboot/installboot.c: revision 1.7
	tools/Makefile: revision 1.221
	tools/Makefile: revision 1.222
	external/gpl2/mkhybrid/dist/libhfs_iso/file.h: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/README: revision 1.1
	distrib/macppc/Makefile: revision 1.18
	external/gpl2/mkhybrid/dist/TODO: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/block.h: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/record.c: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/hfs.c: revision 1.1
	external/gpl2/mkhybrid/dist/match.c: revision 1.1
	external/gpl2/mkhybrid/dist/libfile/softmagic.c: revision 1.1
	external/gpl2/mkhybrid/dist/match.c: revision 1.2
	external/gpl2/mkhybrid/dist/libfile/softmagic.c: revision 1.2
	external/gpl2/mkhybrid/dist/volume.c: revision 1.1
	external/gpl2/mkhybrid/dist/volume.c: revision 1.2
	external/gpl2/mkhybrid/dist/libhfs_iso/internal.h: revision 1.1
	external/gpl2/mkhybrid/dist/getopt1.c: revision 1.1
	external/gpl2/mkhybrid/dist/getopt1.c: revision 1.2
	external/gpl2/mkhybrid/dist/getopt1.c: revision 1.3
	external/gpl2/mkhybrid/dist/README.mkisofs: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/hybrid.h: revision 1.1
	tools/mkhybrid/Makefile: revision 1.1
	external/gpl2/mkhybrid/dist/README.hfs_magic: revision 1.1
	external/gpl2/mkhybrid/dist/apple.h: revision 1.1
	external/gpl2/mkhybrid/dist/include/prototyp.h: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/volume.h: revision 1.1
	external/gpl2/mkhybrid/dist/apple.h: revision 1.2
	external/gpl2/mkhybrid/dist/mkisofs.c: revision 1.1
	external/gpl2/mkhybrid/dist/desktop.c: revision 1.1
	external/gpl2/mkhybrid/dist/mkisofs.c: revision 1.2
	external/gpl2/mkhybrid/dist/desktop.c: revision 1.2
	external/gpl2/mkhybrid/dist/mkisofs.c: revision 1.3
	external/gpl2/mkhybrid/dist/mkisofs.c: revision 1.4
	external/gpl2/mkhybrid/dist/libfile/file.h: revision 1.1
	external/gpl2/mkhybrid/dist/mkisofs.c: revision 1.5
	external/gpl2/mkhybrid/dist/libfile/file.h: revision 1.2
	external/gpl2/mkhybrid/dist/mkisofs.c: revision 1.6
	external/gpl2/mkhybrid/dist/libfile/file.h: revision 1.3
	external/gpl2/mkhybrid/dist/mkisofs.c: revision 1.7
	external/gpl2/mkhybrid/dist/getopt.h: revision 1.1
	distrib/cdrom/macppc_installboot/installboot.h: revision 1.5
	etc/etc.mac68k/Makefile.inc: revision 1.25
	external/gpl2/mkhybrid/dist/getopt.h: revision 1.2
	external/gpl2/mkhybrid/dist/write.h: revision 1.1
	etc/etc.mac68k/Makefile.inc: revision 1.26
	external/gpl2/mkhybrid/dist/rock.c: revision 1.1
	external/gpl2/mkhybrid/dist/hash.c: revision 1.1
	external/gpl2/mkhybrid/dist/hash.c: revision 1.2
	external/gpl2/mkhybrid/dist/libhfs_iso/record.h: revision 1.1
	external/gpl2/mkhybrid/dist/README.hfs_boot: revision 1.1
	external/gpl2/mkhybrid/dist/README: revision 1.1
	external/gpl2/mkhybrid/dist/README.win32: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h: revision 1.2
	external/gpl2/mkhybrid/dist/config.h.in: revision 1.1
	external/gpl2/mkhybrid/dist/config.h.in: revision 1.2
	distrib/cdrom/boothfs.uue: revision 1.2
	external/gpl2/mkhybrid/dist/config.h.in: revision 1.3
	external/gpl2/mkhybrid/dist/volume.h: revision 1.1
	external/gpl2/mkhybrid/dist/volume.h: revision 1.2
	external/gpl2/mkhybrid/dist/ChangeLog: revision 1.1
	external/gpl2/mkhybrid/dist/libfile/apprentice.c: revision 1.1
	external/gpl2/mkhybrid/dist/libfile/apprentice.c: revision 1.2
	external/gpl2/mkhybrid/dist/mapping: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/btree.h: revision 1.1
	external/gpl2/mkhybrid/bin/Makefile: revision 1.1
	external/gpl2/mkhybrid/dist/include/statdefs.h: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/Makefile: revision 1.1
	external/gpl2/mkhybrid/bin/Makefile: revision 1.2
	external/gpl2/mkhybrid/dist/magic: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/node.h: revision 1.1
	external/gpl2/mkhybrid/bin/Makefile: revision 1.3
	external/gpl2/mkhybrid/dist/acconfig.h: revision 1.1
	external/gpl2/mkhybrid/dist/eltorito.c: revision 1.1
	external/gpl2/mkhybrid/dist/libfile/patchlevel.h: revision 1.1
	share/mk/bsd.own.mk: revision 1.1375
	share/mk/bsd.own.mk: revision 1.1376
	external/gpl2/mkhybrid/dist/README.session: revision 1.1
	external/gpl2/mkhybrid/dist/libfile/lfile.c: revision 1.1
	external/gpl2/mkhybrid/dist/libfile/lfile.c: revision 1.2
	tools/macppc_installboot/Makefile: revision 1.1
	external/gpl2/mkhybrid/README.md: revision 1.1
	etc/etc.macppc/Makefile.inc: revision 1.13
	external/gpl2/mkhybrid/dist/defaults.h: revision 1.1
	external/gpl2/mkhybrid/dist/mkisofs.spec: revision 1.1
	external/gpl2/mkhybrid/dist/defaults.h: revision 1.2
	external/gpl2/mkhybrid/dist/mac_label.h: revision 1.1
	external/gpl2/mkhybrid/dist/defaults.h: revision 1.3
	external/gpl2/mkhybrid/dist/include/mconfig.h: revision 1.1
	external/gpl2/mkhybrid/dist/include/mconfig.h: revision 1.2
	external/gpl2/mkhybrid/dist/libfile/proto.h: revision 1.1
	external/gpl2/mkhybrid/dist/COPYING: revision 1.1
	external/gpl2/mkhybrid/dist/name.c: revision 1.1
	external/gpl2/mkhybrid/dist/configure.in: revision 1.1
	external/gpl2/mkhybrid/dist/configure.in: revision 1.2
	external/gpl2/mkhybrid/dist/mac_label_proto.h: revision 1.1
	external/gpl2/mkhybrid/dist/configure.in: revision 1.3
	external/gpl2/mkhybrid/dist/libhfs_iso/low.c: revision 1.1
	distrib/cdrom/macppc_mkboothfs/mkboothfs.c: revision 1.4
	external/gpl2/mkhybrid/dist/mkhybrid.8: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/btree.c: revision 1.1
	distrib/cdrom/macppc_installboot/cd9660.c: revision 1.5
	external/gpl2/mkhybrid/dist/config.h: revision 1.1
	external/gpl2/mkhybrid/dist/mkhybrid.8: revision 1.2
	distrib/cdrom/macppc_installboot/cd9660.c: revision 1.6
	external/gpl2/mkhybrid/dist/config.h: revision 1.2
	external/gpl2/mkhybrid/dist/libhfs_iso/node.c: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/data.c: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/file.c: revision 1.1
	external/gpl2/mkhybrid/dist/README.eltorito: revision 1.1
	external/gpl2/mkhybrid/dist/include/fctldefs.h: revision 1.1
	external/gpl2/mkhybrid/dist/libfile/README: revision 1.1
	external/gpl2/mkhybrid/dist/libhfs_iso/block.c: revision 1.1
	external/gpl2/mkhybrid/dist/mactypes.h: revision 1.1
	external/gpl2/mkhybrid/dist/apple_proto.h: revision 1.1
	external/gpl2/mkhybrid/dist/apple_proto.h: revision 1.2
	external/gpl2/mkhybrid/dist/multi.c: revision 1.1
	external/gpl2/mkhybrid/dist/match.h: revision 1.1
	external/gpl2/mkhybrid/dist/match.h: revision 1.2
	external/gpl2/mkhybrid/dist/mac_label.c: revision 1.1
	external/gpl2/mkhybrid/dist/Makefile.in: revision 1.1
	external/gpl2/mkhybrid/dist/mac_label.c: revision 1.2
	external/gpl2/mkhybrid/dist/libhfs_iso/lvolume.c: revision 1.1
	external/gpl2/mkhybrid/dist/Makefile.in: revision 1.2
	external/gpl2/mkhybrid/dist/configure: revision 1.1
	external/gpl2/mkhybrid/dist/configure: revision 1.2
	external/gpl2/mkhybrid/dist/install-sh: revision 1.1
	external/gpl2/mkhybrid/dist/configure: revision 1.3
	distrib/cdrom/macppc_installboot/cd9660.c: file removal
	external/gpl2/mkhybrid/dist/README.mkhybrid: revision 1.1
	external/gpl2/mkhybrid/dist/ChangeLog.mkhybrid: revision 1.1
	external/gpl2/mkhybrid/dist/iso9660.h: revision 1.1
	external/gpl2/mkhybrid/dist/joliet.c: revision 1.1
	external/gpl2/mkhybrid/dist/apple.c: revision 1.1
	external/gpl2/mkhybrid/dist/apple.c: revision 1.2
	external/gpl2/mkhybrid/dist/apple.c: revision 1.3
	etc/Makefile: revision 1.471
	external/gpl2/mkhybrid/dist/apple.c: revision 1.4
	external/gpl2/mkhybrid/dist/tree.c: revision 1.1
	etc/Makefile: revision 1.472
	external/gpl2/mkhybrid/dist/tree.c: revision 1.2
	external/gpl2/mkhybrid/dist/tree.c: revision 1.3
	external/gpl2/mkhybrid/dist/libhfs_iso/low.h: revision 1.1
	external/gpl2/mkhybrid/dist/mkisofs.h: revision 1.1
	external/gpl2/mkhybrid/dist/mkisofs.8: revision 1.1
	external/gpl2/mkhybrid/dist/mkisofs.h: revision 1.2
	external/gpl2/mkhybrid/dist/mkisofs.h: revision 1.3
	external/gpl2/mkhybrid/dist/mkisofs.h: revision 1.4
	external/gpl2/mkhybrid/dist/mkisofs.h: revision 1.5
	distrib/cdrom/Makefile: revision 1.54
	external/gpl2/mkhybrid/dist/getopt.c: revision 1.1

Add -data-change-warn to MKISOFS_ARGS for macppc as done for mac68k:
https://mail-index.netbsd.org/source-changes/2023/05/19/msg144826.html

Creating Type&Creator mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.
This is a self-inflicted wound, so demote the error to a warning.
This looks to make macppccd builds with cdrtools-3.02a10.
Sync with src/usr.sbin/installboot/cd9660.c:
- include now properly updated cd9660_extern.h for function prototypes
  and remove them from local installboot.h
- use ISO_MAXNAMLEN rather than (BSD specific and incorrect) MAXNAMLEN
- use proper names for the secondary boot file
- appease several pointer signedness warnings (not fatal on HOST tools)
Use native cd9660 blocksize to specify block numbers in cd9660.c.
This reduces diffs from src/usr.sbin/installboot/cd9660.c.
Also explicitly call cd9660_match() to get fstype->blocksize properly.
Pull sharable src/usr.sbin/installboot/cd9660.c.
Import mkhybrid from OpenBSD 7.3 to create ISO9660/HFS hybrid ISO images.
- files in libfile except proto.h prepared by OpenBSD are not imported
  due to non-standard license
  (newer BSD Licensed versions will be imported later)
- unnecessary files for tools build are not imported
- RCSId strings are trimmed to avoid unintended substitutions
Proposed on tech-toolchain@@:
https://mail-index.netbsd.org/tech-toolchain/2024/05/25/msg004355.html

Import BSD licensed libfile for mkhybrid builds from cdrtools-3.01.
- unnecessary files for tools build are not imported
- file.c is renamed to lfile.c to avoid conflict with libhfs_iso
- RCSId strings are trimmed
Remove dependencies on non-existent exclude.h.
Pull changes from mkisofs-1.12.1 to avoid statvfs(2).
Make newer BSD Licensed libfile sources build as tools.
Update mkhybrid Makefile for NetBSD's tools builds.
Suppress implicit declaration warnings.
Appease discard-const warnings.
Remove duplicated SYSTEM_ID_DEFAULT definitions.
Don't redefine SYSTEM_ID_DEFAULT if it's specified in CPPFLAGS.
Remove ancient rlimit hacks for NetBSD disabled in cdrtools-2.01.
Always use local getopt.h as cdrtools-2.01 did.
Tweak and regen configure using autoconf-2.13 to use pkgsrc tools.
Check <stdlib.h> and <flock.h> in configure and regen config.h.
Use HAVE_CONFIG_H to include <stdlib.h> and <string.h> in getopt sources.
Appease more warnings and remove unused getopt functions.
Pull options -hide-joliet-trans-tbl and -hide-rr-moved from mkisofs-1.13.
Pull -graft-points option from mkisofs-1.13 and cdrtools-2.01.
Also remove #ifdef APPLE_HYB for NON-HFS changes to reduce diffs.
Tweak OPTION_* definitions to reduce diffs from mkisofs-1.13.
Pull malloc related fixes from cdrtools-2.01.
This seems to fix SIGSEGV during free(3) in write.c:write_one_file().
Build mkhybrid as a build tool.
Build mac68k and macppc iso images using tools/mkhybrid.
Drop -data-change-warn from MKISOFS_FLAGS.
It's available only on cdrtools-3.x and later.
Use tools/mkhybrid as MKISOFS for mac68k and future macppc.
Note about current status.
Also pull man page description of options pulled from mkisofs-1.13.
Don't print progress if -quiet is specfied as cdrtools-2.01 and later.
Exclude debug.tgz and xdebug.tgz from mac68k ISO to save ~320MB.
Drop -T (for non-Rock Ridge capable systems) from ${MKISOFS_FLAGS}.
Even old mac68k and macppc don't require it, and somehow TRANS.TBL
files are shown on NetBSD when the ISO images created with both -T
and and -hide-joliet-trans-tbl are mounted by mount_cd9660(8).
Note this also happens with mkisofs(8) from cdrtools-3.02,
but I have not investigated if it's expected behavior.
Build src/distrib/cdrom/macppc_installboot in src/tools as a tool.
Also use the tools version ${TOOLS_MACPPC_INSTALLBOOT} to create
bootable ISO9660/HFS hybrid installcd image for macppc.
Make sure NetBSD_BootBlock partition has 32KB to avoid extra padding.
It looks at least OpenFirmware 2.x fails to load the primary bootloader
in the NetBSD_BootBlock partition if the partition size is too small,
probably because OpenFirmware read() function implicitly uses 32KB blocks.
Build macppc iso with TOOL_MKHYBRID via "iso-image" target in src/etc.
No need to check and redefine C89 strerror(3) and strtoul(3).
Fixes build error on MacOS 10.4 with Xcode 2.5.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.52.14.1 2023/05/28 09:58:41 martin Exp $
d66 2
a67 2
.if !empty(ALL_PORTS:Mmac68k) || !empty(ALL_PORTS:Mmacppc)
MKISOFS=	${TOOL_MKHYBRID}
d84 3
d302 1
a302 1
MKISOFS_ARGS.${image}+=	-apple --macbin -map ${.CURDIR}/hfsmap.lst
d471 4
d488 2
a489 1
	${TOOL_MACPPCINSTALLBOOT} $@@ ${EXTFILEDIR}/macppc.bootxx /ofwboot
@


1.51
log
@more MKREPRO_TIMESTAMP fixes (for pax/tar generated files)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.50 2014/03/31 11:25:47 martin Exp $
a146 1
MACHINE_ARCH.acorn26=	arm
@


1.50
log
@Bring back the playstation2 port - now that a toolchain for it is
available again.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.49 2009/12/05 16:29:10 pooka Exp $
d15 4
d384 2
a385 1
			${TOOL_PAX} -rnz -f ${>:C/,.*$//} ${>:C/^.*,//} ; \
@


1.50.12.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.51 2017/02/11 03:07:06 christos Exp $
a14 4
.if ${MKREPRO_TIMESTAMP:Uno} != "no"
PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
.endif

d380 1
a380 2
			${TOOL_PAX} ${PAX_TIMESTAMP} -rnz \
			-f ${>:C/,.*$//} ${>:C/^.*,//} ; \
@


1.50.8.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.51 2017/02/11 03:07:06 christos Exp $
a14 4
.if ${MKREPRO_TIMESTAMP:Uno} != "no"
PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
.endif

d380 1
a380 2
			${TOOL_PAX} ${PAX_TIMESTAMP} -rnz \
			-f ${>:C/,.*$//} ${>:C/^.*,//} ; \
@


1.49
log
@Remove support for NetBSD/playstation2.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.48 2009/03/29 04:56:16 tsutsui Exp $
d175 1
@


1.49.12.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
# $NetBSD$
a174 1
MACHINE_ARCH.playstation2=mipsel
@


1.49.6.1
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.49 2009/12/05 16:29:10 pooka Exp $
a174 1
MACHINE_ARCH.playstation2=mipsel
@


1.48
log
@Use pre-generated boothfs.uue binary to create macppccd.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.47 2009/03/25 13:53:05 tsutsui Exp $
a174 1
MACHINE_ARCH.playstation2=mipsel
@


1.47
log
@Remove an extra escape char. bash(1) complains about it.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.46 2009/03/25 09:50:21 tsutsui Exp $
d63 1
a63 1
SUBDIR+=	macppc_mkboothfs macppc_installboot
a81 1
MACPPC_MKBOOTHFSDIR!= cd ${.CURDIR}/macppc_mkboothfs && ${PRINTOBJDIR}
d292 1
d295 3
a297 1
	-boot-hfs-file ${MACPPC_MKBOOTHFSDIR}/boothfs
d423 4
a433 4
.if !empty(BASE_PORTS.${image}:Mmacppc)
size-${image}: all-macppc_mkboothfs all-macppc_installboot
.endif

a436 3
.if !empty(BASE_PORTS.${image}:Mmacppc)
	${MACPPC_MKBOOTHFSDIR}/macppc_mkboothfs ${MACPPC_MKBOOTHFSDIR}/boothfs
.endif
d467 4
@


1.46
log
@Use ${TOOL_PAX} rather than tar(1) on the build host.
On some system tar(1) doesn't have --fast-read option.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.45 2009/03/22 08:43:54 tsutsui Exp $
d442 1
a442 2
		   | ${TOOL_SED} '/=/!d;s/^[^=]*=//'` \
	       \* 2048)) && \
@


1.45
log
@Don't remove ${DISTRIBDIR} on cleandir if it isn't default.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.44 2009/03/22 08:22:37 tsutsui Exp $
d378 1
a378 1
			tar --fast-read -xzf ${>:C/,.*$//} ${>:C/^.*,//} ; \
@


1.44
log
@Check if RSYNC and MKISOFS tools are installed before invoking them.
(otherwise we get strange error messages because MKISOFS is used in pipe)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.43 2009/03/22 07:35:43 tsutsui Exp $
d135 2
a136 1
DISTRIBDIR?=	${.OBJDIR}/download
d520 1
a520 1
cleandir distclean: cleandistribdir
d531 2
a532 2
cleandistribdir:
	-rm -rf ${DISTRIBDIR}
@


1.43
log
@Print error message properly when ${RELEASE} is not set.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.42 2009/03/21 23:52:38 tsutsui Exp $
d88 16
d433 1
a433 1
size-${image}: stage-${image} extfileprep fileprep-${image}
d468 1
a468 1
${IMAGEDIR}/${image}.iso: size-${image}
d513 1
a513 1
fetch:
@


1.42
log
@Fix a bug slipped in rev 1.40 which puts extra MD directories into ISO
on multiple image targets.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.41 2009/03/21 22:41:57 tsutsui Exp $
d97 1
d113 1
@


1.41
log
@Change default path of mkisofs(8) from /usr/pkg/bin to /usr/local/bin
since recent versions in pkgsrc won't work.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.40 2009/03/09 11:34:37 tsutsui Exp $
d226 1
d229 1
a229 1
bports=			shared/ALL
@


1.40
log
@- explicitly define the default make target
- create shared/ALL and shared/${MACHINE_ARCH} directories
  only if they exist in ${DISTRIBDIR}
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.39 2009/01/28 17:11:54 tsutsui Exp $
d75 1
a75 1
MKISOFS?=	/usr/pkg/bin/mkisofs
@


1.39
log
@Add backslashes missed in rev 1.38.
Fixes traditional bootable macppccd build.
(though this seems to require mkisofs 2.01 or prior)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.38 2008/10/25 22:27:34 apb Exp $
d7 2
a10 2
all:

d227 1
a227 1
.if ${ports} != "source"
d238 2
a239 1
.if defined(MACHINE_ARCH.${port})
d367 1
a367 1
all: ${IMAGEDIR}/${image}.iso
@


1.39.2.1
log
@Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.48 2009/03/29 04:56:16 tsutsui Exp $
d7 1
a7 1
all:	cdimages
d9 1
a9 1
.include <bsd.own.mk>
d63 1
a63 1
SUBDIR+=	macppc_installboot
d75 1
a75 1
MKISOFS?=	/usr/local/bin/mkisofs
d82 1
a87 16
check_mkisofs:
.if !exists(${MKISOFS})
	@@echo "Error: File does not exist: ${MKISOFS}"
	@@echo "Please build and install mkisofs(8) utility and set MKISOFS in the environment"
	@@echo "or in site.conf to create image."
	@@false
.endif

check_rsync:
.if !exists(${RSYNC})
	@@echo "Error: File does not exist: ${RSYNC}"
	@@echo "Please build and install rsync(1) utility and set RSYNC in the environment"
	@@echo "or in site.conf to fetch release binaries."
	@@false
.endif

a96 1
.if !target(.BEGIN)
a111 1
.endif
d117 1
a117 2
DOWNLOADDIR?=	${.OBJDIR}/download
DISTRIBDIR?=	${DOWNLOADDIR}
a225 1
bports=			# empty first
d227 2
a228 2
.if ${ports} != "source" && exists(${DISTRIBDIR}/shared/ALL)
bports+=		shared/ALL
d238 1
a238 2
.if defined(MACHINE_ARCH.${port}) &&	\
    exists(${DISTRIBDIR}/shared/${MACHINE_ARCH.${port}})
a271 1
BOOTHFS=	boothfs
d274 1
a274 3
	-boot-hfs-file ${.OBJDIR}/${BOOTHFS}
UUDECODE_FILES=	${BOOTHFS}
.include <bsd.files.mk>
d357 1
a357 1
			${TOOL_PAX} -rnz -f ${>:C/,.*$//} ${>:C/^.*,//} ; \
d366 1
a366 1
cdimages: ${IMAGEDIR}/${image}.iso
a399 4
.if !empty(BASE_PORTS.${image}:Mmacppc)
fileprep-${image}: ${BOOTHFS}
.endif

d407 4
d413 4
a416 1
size-${image}: stage-${image} extfileprep fileprep-${image} check_mkisofs
d421 2
a422 1
		   | ${TOOL_SED} '/=/!d;s/^[^=]*=//'` * 2048)) && \
d448 1
a448 5
.if !empty(BASE_PORTS.${image}:Mmacppc)
${IMAGEDIR}/${image}.iso: all-macppc_installboot
.endif

${IMAGEDIR}/${image}.iso: size-${image} check_mkisofs
d493 1
a493 1
fetch: check_rsync
d499 1
a499 1
cleandir distclean: cleandownloaddir
d510 2
a511 2
cleandownloaddir:
	-rm -rf ${DOWNLOADDIR}
@


1.38
log
@Use ${TOOL_SED} instead if plain sed in Makefiles.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.37 2007/12/08 12:30:18 tsutsui Exp $
d419 1
a419 1
			-print-size . 2>&1
d421 2
a422 2
		   | ${TOOL_SED} '/=/!d;s/^[^=]*=//'`
	       * 2048)) && \
@


1.37
log
@Use ${TOOL_STAT} to get file size instead of ls and awk in more places.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.36 2007/12/07 21:08:58 tsutsui Exp $
d7 2
d417 6
a422 1
	@@size=$$((`cd ${STAGEDIR}/${image} && ${MKISOFS} ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} -print-size . 2>&1 | tee /dev/stderr | sed '/=/!d;s/^[^=]*=//'` * 2048)) && \
@


1.37.4.1
log
@file Makefile was added on branch mjf-devfs on 2007-12-08 12:30:19 +0000
@
text
@d1 504
@


1.37.4.2
log
@Use ${TOOL_STAT} to get file size instead of ls and awk in more places.
@
text
@a0 504
# $NetBSD: Makefile,v 1.37 2007/12/08 12:30:18 tsutsui Exp $
#
# Consult "*.conf" for the configuration variables; this Makefile is typically
# not edited for basic configuration changes.
##############################################################################

all:

.if exists(site.conf)
.include "site.conf"
.endif

.if !defined(RELEASE)
.BEGIN:
	@@echo "Please set RELEASE in the environment or in site.conf to the basename"
	@@echo "of the release configuration file to use.  For example:"
	@@echo "> ${MAKE} RELEASE=foo"
	@@echo "will use the configuration file foo.conf."
	@@false
.endif

.if exists(${RELEASE}.conf)
.include "${RELEASE}.conf"
.elif !target(.BEGIN)
.BEGIN:
	@@echo "Error: File does not exist: ${RELEASE}.conf"
	@@false
.endif

CD_RELEASE?=
CD_SIZE?=		650000
RELEASENAME?=		NetBSD-${CD_RELEASE}
MKISOFS_ARGS=		-A "NetBSD ${CD_RELEASE}" \
			-hide-rr-moved -m Split -m cdrom
#			-hide-list ${.CURDIR}/hide-iso.lst

ALL_PORTS=
.for image in ${CD_IMAGES}
BASE_PORTS.${image}?=
ALL_PORTS:=		${ALL_PORTS} ${BASE_PORTS.${image}}
.endfor

.if exists(${RELEASENAME}.mk)
.include "${RELEASENAME}.mk"
.elif !target(.BEGIN)
.if !empty(CD_RELEASE)
.BEGIN:
	@@echo "Error: File does not exist: ${RELEASENAME}.mk"
	@@echo "(specified by variable CD_RELEASE in ${RELEASE}.conf)"
	@@false
.else
.BEGIN:
	@@echo "Error: CD_RELEASE not set in ${RELEASE}.conf"
	@@false
.endif
.endif

SUBDIR=

.if !empty(ALL_PORTS:Mmacppc)
SUBDIR+=	macppc_mkboothfs macppc_installboot
.endif

.if !empty(SUBDIR)
.include <bsd.subdir.mk>
.endif

.include <bsd.obj.mk>
.include <bsd.own.mk>

##### Default paths for programs #####

MKISOFS?=	/usr/pkg/bin/mkisofs
RSYNC?=		/usr/pkg/bin/rsync
ALPHA_IBOOT?=	${TOOL_INSTALLBOOT} -m alpha -o sunsum,append
PMAX_IBOOT?=	${TOOL_INSTALLBOOT} -m pmax -o sunsum,append
VAX_IBOOT?=	${TOOL_INSTALLBOOT} -m vax -o sunsum,append
.if !empty(ALL_PORTS:Mmacppc)
MACPPC_IBOOTDIR!= cd ${.CURDIR}/macppc_installboot && ${PRINTOBJDIR}
MACPPC_MKBOOTHFSDIR!= cd ${.CURDIR}/macppc_mkboothfs && ${PRINTOBJDIR}
.endif
.if !empty(ALL_PORTS:Msgimips)
SGIMIPS_SGIVOL?=	${TOOLDIR}/bin/nbsgivol
.endif

##### rsync settings #####

# rsync host; check mirrors on http://www.NetBSD.org/mirrors/#rsync
# (note not all rsync mirrors provide NetBSD-daily)
RSYNC_HOST?=	rsync.NetBSD.org

# extra path for rsync mirrors ("/pub", "/netbsd" etc.)
RSYNC_PATH_PREFIX?=

.if ${RELEASE} == "current"
# daily date dir name
BRANCH?=	HEAD
#DAILY_DIR?=	yyyymmddhhmmZ
RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD-daily/${BRANCH}/${DAILY_DIR}
.else
# extra suffix on pre-release ("_BETA2", "_RC5" etc.)
RELEASE_SUFFIX?=
RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD/${RELEASENAME}${RELEASE_SUFFIX}

# alternative for NetBSD-daily sets of stable branches
#DAILY_DIR?=	yyyymmddhhmmZ
#BRANCH?=	netbsd-4
#RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD-daily/${BRANCH}/${DAILY_DIR}
.endif

RSYNC_SITE?=	rsync://${RSYNC_HOST}${RSYNC_PATH}
RSYNC_ARGS?=	-va --delete
RSYNC_EXCLUDE+=	--exclude=/* --exclude=Split --exclude=cdrom

DISTRIBDIR?=	${.OBJDIR}/download
STAGEDIR?=	${.OBJDIR}/staging
IMAGEDIR?=	${.OBJDIR}
EXTFILEDIR?=	${.OBJDIR}/extfiles
EASTER_EGG?=	/dev/null

##### MACHINE_ARCH for possible shared sets for each (shared) port #####

MACHINE_ARCH.acorn26=	arm
MACHINE_ARCH.acorn32=	arm
MACHINE_ARCH.algor=	mipsel
MACHINE_ARCH.amiga=	m68k
MACHINE_ARCH.amigappc=	powerpc
MACHINE_ARCH.arc=	mipsel
MACHINE_ARCH.atari=	m68k
MACHINE_ARCH.bebox=	powerpc
MACHINE_ARCH.cats=	arm
MACHINE_ARCH.cesfic=	m68k
MACHINE_ARCH.cobalt=	mipsel
MACHINE_ARCH.dreamcast=	sh3el
MACHINE_ARCH.evbarm=	arm
MACHINE_ARCH.evbmips=	mipsel
MACHINE_ARCH.evbppc=	powerpc
MACHINE_ARCH.evbsh3=	sh3eb
MACHINE_ARCH.hp300=	m68k
MACHINE_ARCH.hpcarm=	arm
MACHINE_ARCH.hpcmips=	mipsel
MACHINE_ARCH.hpcsh=	sh3el
MACHINE_ARCH.iyonix=	arm
MACHINE_ARCH.luna68k=	m68k
MACHINE_ARCH.mac68k=	m68k
MACHINE_ARCH.macppc=	powerpc
MACHINE_ARCH.mipsco=	mipseb
MACHINE_ARCH.mmeye=	sh3eb
MACHINE_ARCH.mvme68k=	m68k
MACHINE_ARCH.netwinder=	arm
MACHINE_ARCH.news68k=	m68k
MACHINE_ARCH.newsmips=	mipseb
MACHINE_ARCH.next68k=	m68k
MACHINE_ARCH.ofppc=	powerpc
MACHINE_ARCH.playstation2=mipsel
MACHINE_ARCH.pmax=	mipsel
MACHINE_ARCH.prep=	powerpc
MACHINE_ARCH.sandpoint=	powerpc
MACHINE_ARCH.sbmips=	mipseb
MACHINE_ARCH.sgimips=	mipseb
MACHINE_ARCH.shark=	arm
MACHINE_ARCH.sun3=	m68k
MACHINE_ARCH.x68k=	m68k

##### Fetched directories from FTP server #####

.if defined(ALL_PORTS) && !empty(ALL_PORTS)
RSYNC_INCLUDE+=		--include "/shared"
RSYNC_EXCLUDE+=		--exclude "/[a-z]*" \
			--exclude "/shared/[a-z]*"
.endif

RSYNC_ARCHS=
.for port in ${ALL_PORTS:O:u}			# {
RSYNC_INCLUDE+=		--include "/${port}"
.if defined(MACHINE_ARCH.${port})
RSYNC_ARCHS+=		${MACHINE_ARCH.${port}}
.endif
.endfor						# }
.for arch in ${RSYNC_ARCHS:O:u}
RSYNC_INCLUDE+=		--include "/shared/${arch}"
.endfor

##### Boot info and additional options for various platforms #####

.if defined(PUBLISHER)
MKISOFS_ARGS+=		-publisher "${PUBLISHER}"
.endif

.if defined(PREPARER)
MKISOFS_ARGS+=		-p "${PREPARER}"
.endif


##### Per image settings #####

.for image in ${CD_IMAGES}			# {
ports:=${BASE_PORTS.${image}}

.if !defined(VOLID.${image}) && !target(.BEGIN)
.BEGIN:
	@@echo "Error: VOLID.${image} not set in ${RELEASE}.conf"
	@@false
.endif

MKISOFS_ARGS.${image}=	-V "${VOLID.${image}}"

pathlist.${image}:=${STAGEDIR}/${image}.pathlist
contents.${image}:=${IMAGEDIR}/${image}.contents

MKISOFS_ARGS.${image}+=	-graft-points -path-list ${pathlist.${image}}

.if defined(ABSTRACT.${image})
MKISOFS_ARGS.${image}+=	-abstract ${ABSTRACT.${image}}
.endif

# Options specified in release config file

EXTFILES?=
INTFILES.${image}?=
INTDIRS.${image}?=
ADDFILES.${image}?=

# For a source only cd just ignore the shared/ALL directory
.if ${ports} != "source"
bports=			shared/ALL
.endif
.for port in ${ports}					# {
EXTFILES+=		${EXTFILES.${port}}
INTFILES.${image}+=	${INTFILES.${port}}
INTDIRS.${image}+=	${INTDIRS.${port}}
ADDFILES.${image}+=	${ADDFILES.${port}}
MKISOFS_ARGS.${image}+=	${MKISOFS_ARGS.${port}}
# add shared/ALL and shared/${MACHINE_ARCH} to BASE_PORTS.${image}
bports+=		${port}
.if defined(MACHINE_ARCH.${port})
bports+=		shared/${MACHINE_ARCH.${port}}
.endif
.endfor							# }
BASE_PORTS.${image}:=	${bports:O:u}


# i386

.if !empty(ports:Mi386)
.if empty(INTFILES.i386:Mbootxx_cd9660)
# non-emulation boot
MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.i386} -c boot.catalog -no-emul-boot
.else
#2.88MB emulation boot
MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.i386} -c boot.catalog
.endif
.endif

# amd64

.if !empty(ports:Mamd64)
.if empty(INTFILES.amd64:Mbootxx_cd9660)
# non-emulation boot
MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.amd64} -c boot.catalog -no-emul-boot
.else
#2.88MB emulation boot
MKISOFS_ARGS.${image}+= -b ${BOOTFILE.amd64} -c boot.catalog
.endif
.endif
        
# Mac (mac68k, macppc)

.if !empty(ports:Mmacppc)
MKISOFS_ARGS.${image}+=	-hfs -part -hide-hfs-list ${.CURDIR}/hide-hfs.lst \
	--macbin -map ${.CURDIR}/hfsmap.lst \
	-boot-hfs-file ${MACPPC_MKBOOTHFSDIR}/boothfs
.elif defined(USE_APPLE_ISO) || !empty(ports:Mmac68k)
MKISOFS_ARGS.${image}+=	-apple --macbin -map ${.CURDIR}/hfsmap.lst
.endif

# Sun (sparc, sparc64, sun3)

SUN_BOOT_ARGS.${image}:=
.if !empty(ports:Msparc*) || !empty(ports:Msun3*)	# {
SUN_BOOT.123:=	-
SUN_BOOT.4:=	-
SUN_BOOT.5:=	-

.if !empty(ports:Msparc)
SUN_BOOT.123:=	${BOOTFILE.sparc}
.endif

.if !empty(ports:Msun3)					# {
.if !defined(BOOTFILE.sun3x)
# NetBSD >= 1.4; sun3 and sun3x are the same
SUN_BOOT.5:=	${BOOTFILE.sun3}
.endif
SUN_BOOT.4:=	${BOOTFILE.sun3}
.endif							# }

.if !empty(ports:Msun3x) && defined(BOOTFILE.sun3x)
# NetBSD < 1.4; sun3 and sun3x are separate
SUN_BOOT.5:=	${BOOTFILE.sun3x}
.endif

.if !empty(ports:Msparc64)				# {
.if (${SUN_BOOT.5} != "-")
# add warning
SUN_BOOT.5:=	${SUN_BOOT.5} ${BOOTFILE.sparc64}
.else
SUN_BOOT.5:=	${BOOTFILE.sparc64}
.endif
.endif							# }

SUN_BOOT_ARGS.${image}:= ${SUN_BOOT.123} ${SUN_BOOT.123} ${SUN_BOOT.123} ${SUN_BOOT.4} ${SUN_BOOT.5}

.if empty(SUN_BOOT_ARGS.${image}:N/dev/null)
SUN_BOOT_ARGS.${image}:=
.endif
.endif							# }

.endfor		# image in ${CD_IMAGES}		# }

##### Additional options for host OS's #####

# (USE_APPLE_ISO is tested above)

.if defined(USE_ROCK_RIDGE)
MKISOFS_ARGS+=		-r
.endif

.if defined(USE_LONG_NAMES)
MKISOFS_ARGS+=		-l
.endif

.if defined(USE_TRANS_TBL)
MKISOFS_ARGS+=		-T
.endif

.if defined(USE_JOLIET)
MKISOFS_ARGS+=		-J -hide-joliet-list ${.CURDIR}/hide-jol.lst
.if defined(USE_TRANS_TBL)
MKISOFS_ARGS+=		-hide-joliet-trans-tbl
.endif
.endif

##### File extract rule #####

USE-FILE: .USE
	@@if [ ! -r $@@ ]; then case $> in \
		/*,link) \
			echo "cp ${>:S/,link$//} $@@"; \
			cp ${>:S/,link$//} $@@;; \
		*,link) \
			echo "cp `pwd -P`/${>:S/,link$//} $@@"; \
			cp `pwd -P`/${>:S/,link$//} $@@;; \
		*.tgz,*) \
			echo "Extracting: $> --> $@@..."; \
			tar --fast-read -xzf ${>:C/,.*$//} ${>:C/^.*,//} ; \
			cp ${>:C/^.*,//} $@@; rm -rf ${>:C/^.*,//} ;; \
		*.gz) echo "gunzip -c <$> >$@@"; gunzip -c <$> >$@@;; \
		*) echo "Unknown archive method for $@@"; false;; \
	esac; else true; fi

##### Makefile rules #####

.for image in ${CD_IMAGES}			# {
all: ${IMAGEDIR}/${image}.iso

stage-${image}:
	mkdir -p ${STAGEDIR}/${image} ${EXTFILEDIR}
	rm -f ${pathlist.${image}} ${contents.${image}}
.if defined(BASE_PORTS.${image}) && !empty(BASE_PORTS.${image})
.for dir in ${INTDIRS.${image}}
	mkdir -p ${STAGEDIR}/${image}/${dir}
.endfor
.for arch in ${BASE_PORTS.${image}}
	@@echo "${arch}=${DISTRIBDIR}/${arch}" >> ${pathlist.${image}}
	@@echo "${arch}" >> ${contents.${image}}
.endfor
.endif

extfileprep:
.for file in ${EXTFILES}			# {
extfileprep: ${EXTFILEDIR}/${file:C/:.*$//}
${EXTFILEDIR}/${file:C/:.*$//}: ${DISTRIBDIR}/${file:C/^.*://} USE-FILE
${DISTRIBDIR}/${file:C/^.*://}: .PHONY
.endfor						# }

fileprep-${image}:
.for file in ${INTFILES.${image}}		# {
fileprep-${image}: ${STAGEDIR}/${image}/${file:C/:.*$//}
${STAGEDIR}/${image}/${file:C/:.*$//}: ${DISTRIBDIR}/${file:C/^.*://} USE-FILE
${DISTRIBDIR}/${file:C/^.*://}: .PHONY
.endfor						# }
.for file in ${ADDFILES.${image}}		# {
fileprep-${image}: ${STAGEDIR}/${image}/${file:C/:.*$//}
${STAGEDIR}/${image}/${file:C/:.*$//}: ${file:C/^.*://} USE-FILE
${file:C/^.*://}: .PHONY
.endfor						# }

# Size the CD image.  This is done via the following formula:
# 1. Size the image produced by mkisofs.
# 2. Add images added by distrib/common/sunbootcd.sh by rounding to a 320k
#    boundary and adding each Sun image rounded to a 320k boundary.
# 3. Add bootfile sizes rounded up to 512 bytes for pmax and vax.
# 4. Round up to a 32k boundary, then add another 32k for TAO padding.

.if !empty(BASE_PORTS.${image}:Mmacppc)
size-${image}: all-macppc_mkboothfs all-macppc_installboot
.endif

SGIVOLHDR.size= 4096

size-${image}: stage-${image} extfileprep fileprep-${image}
.if !empty(BASE_PORTS.${image}:Mmacppc)
	${MACPPC_MKBOOTHFSDIR}/macppc_mkboothfs ${MACPPC_MKBOOTHFSDIR}/boothfs
.endif
	@@size=$$((`cd ${STAGEDIR}/${image} && ${MKISOFS} ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} -print-size . 2>&1 | tee /dev/stderr | sed '/=/!d;s/^[^=]*=//'` * 2048)) && \
	if [ "${SUN_BOOT_ARGS.${image}}" != "" ]; then \
		size=$$(($$(($$size + 327679)) / 327680 * 327680)) && \
		bootfiles=`for f in ${SUN_BOOT_ARGS.${image}:N-:O}; do echo $$f; done | uniq` && \
		for f in $$bootfiles; do \
			bfsize=$$(${TOOL_STAT} -f '%z' $$f) && \
			size=$$(($$size + $$(($$(($$bfsize + 327679)) / 327680 * 327680)))); \
		done; \
	fi && \
	if [ "${BASE_PORTS.${image}:Mpmax}" != "" ]; then \
		size=$$(($$size + $$(($$(($$(${TOOL_STAT} -f '%z' ${BOOTFILE.pmax}) + 511)) / 512 * 512)))); \
	fi && \
	if [ "${BASE_PORTS.${image}:Mvax}" != "" ]; then \
		size=$$(($$size + $$(($$(($$(${TOOL_STAT} -f '%z' ${BOOTFILE.vax})  + 511)) / 512 * 512)))); \
	fi && \
	if [ "${BASE_PORTS.${image}:Msgimips}" != "" -a \
	    "${EXTFILES.sgimips}" != "" ]; then \
		size=$$(($$size + ${SGIVOLHDR.size} * 512)); \
	fi && \
	size=$$(($$(($$size + 16383)) / 16384 * 16384 + 32768)) && \
	sizek=$$(($$size / 1024)) && \
	echo "Projected size of ${image}.iso: $$size bytes ($${sizek}K)." && \
	if [ $$sizek -gt ${CD_SIZE} ]; then echo "Image too large for ${CD_SIZE} KB CD!"; false; fi

# Actually build the image with all the bootstrap goo....

${IMAGEDIR}/${image}.iso: size-${image}
	@@sort -o ${contents.${image}} ${contents.${image}}
.if defined(LOG_MKISOFS)
	cd ${STAGEDIR}/${image} && ${MKISOFS} -o $@@ ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} -v -v . >${IMAGEDIR}/${image}.iso.log 2>&1
.else
	cd ${STAGEDIR}/${image} && ${MKISOFS} -o $@@ ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} .
.endif
.if !empty(SUN_BOOT_ARGS.${image})
	SUNLABEL=${TOOL_SUNLABEL:Q} \
	    ${HOST_SH} ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \
	    ${.TARGET} ${SUN_BOOT_ARGS.${image}}
.endif
.if !empty(BASE_PORTS.${image}:Mmacppc)
	${MACPPC_IBOOTDIR}/macppc_installboot \
	    $@@ ${EXTFILEDIR}/macppc.bootxx /ofwboot
.endif
.if !empty(BASE_PORTS.${image}:Mpmax)
	${PMAX_IBOOT} $@@ ${BOOTFILE.pmax}
.endif
.if !empty(BASE_PORTS.${image}:Mvax)
	${VAX_IBOOT} $@@ ${BOOTFILE.vax}
.endif
.if !empty(BASE_PORTS.${image}:Malpha)
	${ALPHA_IBOOT} $@@ ${BOOTFILE.alpha}
.endif
.if !empty(BASE_PORTS.${image}:Msgimips) && defined(EXTFILES.sgimips)
	@@echo "Prepending SGI volume header"
	mv $@@ $@@.raw
	dd if=/dev/zero of=$@@.tmp bs=512 count=${SGIVOLHDR.size}
	dd if=$@@.raw of=$@@.tmp bs=512 seek=${SGIVOLHDR.size}
	${SGIMIPS_SGIVOL} -f -i -h ${SGIVOLHDR.size} $@@.tmp
	${SGIMIPS_SGIVOL} -f -w aoutboot ${STAGEDIR}/${image}/aoutboot $@@.tmp
	${SGIMIPS_SGIVOL} -f -w ip2xboot ${STAGEDIR}/${image}/ip2xboot $@@.tmp
	${SGIMIPS_SGIVOL} -f -w ip3xboot ${STAGEDIR}/${image}/ip3xboot $@@.tmp
	mv $@@.tmp $@@
	rm -f $@@.raw $@@.tmp
.endif
	@@echo Rounding up to 32k boundary and padding 32k....
	@@size=$$(${TOOL_STAT} -f '%z' $@@); \
	    pad=$$(( 32768 - ( $$size & 32767 ) )); \
	    [ $$pad = 32768 ] || \
	    dd if=/dev/zero bs=1 count=$$pad >>$@@ 2>/dev/null

.endfor		# image in ${CD_IMAGES}		# }

fetch:
	@@mkdir -p ${DISTRIBDIR}
	@@echo Fetching distributions....
	${RSYNC} ${RSYNC_INCLUDE} ${RSYNC_ARGS} ${RSYNC_EXCLUDE} ${RSYNC_SITE}/ ${DISTRIBDIR}/

clean: cleanstagedir cleanimages
cleandir distclean: cleandistribdir

cleanimages:
.for image in ${CD_IMAGES}
	-rm -f ${IMAGEDIR}/${image}.iso ${IMAGEDIR}/${image}.iso.log \
		${contents.${image}}
.endfor

cleanstagedir:
	-rm -rf ${STAGEDIR} ${EXTFILEDIR}

cleandistribdir:
	-rm -rf ${DISTRIBDIR}
@


1.37.8.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.37 2007/12/08 12:30:18 tsutsui Exp $
@


1.36
log
@Add more useful variables for rsync to fetch binary sets:

RSYNC_HOST
  specify rsync host (default: rsync.NetBSD.org)

RSYNC_PATH_PREFIX
  specify extra prefix path of NetBSD module names for rsync mirrors
   ex. "/pub", "/netbsd" etc. (default: empty)

DAILY_DIR
  specify directory name on using NetBSD-daily snapshot for -current
   ex. "200712060002Z" etc. (no default; mandatory for -current)

RELEASE_SUFFIX
  specify suffix of directory names used for pre-releases
   ex. "_BETA2", "_RC5" etc. (default: empty)

RSYNC_PATH
  specify path used to rsync hosts (default: set from the above variables)

Examples:

make RELEASE=3.1 TARGET_CD_IMAGE=mac68kcd fetch
 -> fetch 3.1 mac68k sets from
    rsync.NetBSD.org:/NetBSD/NetBSD-3.1/

make RELEASE=4.0 TARGET_CD_IMAGE=mac68kcd RELEASE_SUFFIX=_RC5 fetch
 -> fetch 4.0_RC5 mac68k sets from
    rsync.NetBSD.org:/NetBSD/NetBSD-4.0_RC5/

make RELEASE=current TARGET_CD_IMAGE=mac68kcd DAILY_DIR=200712060002Z fetch
 -> fetch -current mac68k sets from
    rsync.NetBSD.org:/NetBSD-daily/HEAD/200712060002Z/

make RELEASE=4.0 TARGET_CD_IMAGE=mac68kcd RELEASE_SUFFIX=_RC5 \
    RSYNC_HOST=rsync3.jp.NetBSD.org RSYNC_PATH_PREFIX=/pub fetch
 -> fetch 4.0_RC5 mac68k sets from
    rsync3.jp.NetBSD.org:/pub/NetBSD/NetBSD-4.0_RC5/

make RELEASE=3.1 TARGET_CD_IMAGE=mac68kcd \
    RSYNC_PATH=/NetBSD-daily/netbsd-3/200712060002Z fetch
 -> fetch mac68k sets of netbsd-3 branch from
    rsync.NetBSD.org:/pub/NetBSD-daily/netbsd-3/200712060002Z
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.35 2007/12/07 18:35:21 tsutsui Exp $
d420 1
a420 1
			bfsize=`ls -l $$f | awk '{print $$5}'` && \
d425 1
a425 1
		size=$$(($$size + $$(($$((`ls -l ${BOOTFILE.pmax} | awk '{print $$5}'` + 511)) / 512 * 512)))); \
d428 1
a428 1
		size=$$(($$size + $$(($$((`ls -l ${BOOTFILE.vax} | awk '{print $$5}'` + 511)) / 512 * 512)))); \
@


1.35
log
@- fix "Rounding up to 32k boundary and padding 32k" code
  ("dd if=/dev/zero bs=512 count=0" seems to cause unexpected results)
- use ${TOOL_STAT} to get file size instead of ls and awk
  (1.6.x don't have ${TOOL_STAT} but they have been obsolete anyway)

Both are taken from sys/arch/i386/stand/bootxx/Makefile.bootxx.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.34 2007/03/08 13:51:37 bouyer Exp $
d86 26
a111 1
RSYNC_SITE?=	rsync://rsync.NetBSD.org/NetBSD/${RELEASENAME}
@


1.34
log
@Switch i386 and amd64 to native boot, if INTFILES contains bootxx_cd9660.
Use x86 native boot for current.
Swap i386 and amd64 in multiarch CD sets (cd1 would overflow by 30M otherwise)
and leave vax out (cd3 would overflow by more than 100M - time for a
multi-cd4 ?)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33 2007/03/04 04:59:41 tsutsui Exp $
d454 4
a457 4
	@@size=`ls -l $@@ | awk '{print $$5}'` && \
	newsize=$$(($$(($$size + 32767)) / 32768 * 32768)) && \
	dd if=/dev/zero bs=512 count=$$(($$(($$newsize - $$size)) / 512)) >>$@@ 2>/dev/null
	dd if=${EASTER_EGG} bs=32768 count=1 conv=sync >>$@@ 2>/dev/null
@


1.34.4.1
log
@sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD$
d86 1
a86 26
##### rsync settings #####

# rsync host; check mirrors on http://www.NetBSD.org/mirrors/#rsync
# (note not all rsync mirrors provide NetBSD-daily)
RSYNC_HOST?=	rsync.NetBSD.org

# extra path for rsync mirrors ("/pub", "/netbsd" etc.)
RSYNC_PATH_PREFIX?=

.if ${RELEASE} == "current"
# daily date dir name
BRANCH?=	HEAD
#DAILY_DIR?=	yyyymmddhhmmZ
RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD-daily/${BRANCH}/${DAILY_DIR}
.else
# extra suffix on pre-release ("_BETA2", "_RC5" etc.)
RELEASE_SUFFIX?=
RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD/${RELEASENAME}${RELEASE_SUFFIX}

# alternative for NetBSD-daily sets of stable branches
#DAILY_DIR?=	yyyymmddhhmmZ
#BRANCH?=	netbsd-4
#RSYNC_PATH?=	${RSYNC_PATH_PREFIX}/NetBSD-daily/${BRANCH}/${DAILY_DIR}
.endif

RSYNC_SITE?=	rsync://${RSYNC_HOST}${RSYNC_PATH}
d395 1
a395 1
			bfsize=$$(${TOOL_STAT} -f '%z' $$f) && \
d400 1
a400 1
		size=$$(($$size + $$(($$(($$(${TOOL_STAT} -f '%z' ${BOOTFILE.pmax}) + 511)) / 512 * 512)))); \
d403 1
a403 1
		size=$$(($$size + $$(($$(($$(${TOOL_STAT} -f '%z' ${BOOTFILE.vax})  + 511)) / 512 * 512)))); \
d454 4
a457 4
	@@size=$$(${TOOL_STAT} -f '%z' $@@); \
	    pad=$$(( 32768 - ( $$size & 32767 ) )); \
	    [ $$pad = 32768 ] || \
	    dd if=/dev/zero bs=1 count=$$pad >>$@@ 2>/dev/null
@


1.33
log
@Several fixes to make sgimipscd actually bootable:
- introduce SGIMIPS_SGIVOL variable which specifies sgivol(8) path
  because nbsgivol tool is available only in TOOLDIR for sgimips and
  possibly exists in a different directory from default TOOLDIR path
- use fixed (4096) value for SGIVOLHDR.size because default value
  taken from <sys/bootblock.h> is 3135 (not multiples of 4) so it
  doesn't match 2048bytes/sector CD images
- also pass SGIVOLHDR.size to sgivol(8) on creating volume
- rename raw iso9660 image before creating SGIVOLHDR to avoid
  incomplete (non-bootable) image left on failure of sgivol(8)

Problem (i.e. sgimipscd-3.0.2.iso is not bootable) was reported
by Thierry Lacoste on port-sgimips, and fixed images are also
tested by him on IP22 (and by me on IP32).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.32 2007/03/04 04:27:21 tsutsui Exp $
d221 5
d228 1
d233 5
d240 1
@


1.32
log
@We can't use && in expression for test(1); use -a instead.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.31 2007/03/04 03:52:08 tsutsui Exp $
d82 3
d371 2
a372 7
.if !empty(BASE_PORTS.${image}:Msgimips) && defined(EXTFILES.sgimips)
SGIVOLHDR.size= ( fgrep SGI_BOOT_BLOCK_SIZE_VOLHDR \
		${EXTFILEDIR}/sgimips.bootblock.h | \
		 sed -e 's/[^0-9]*//' )
.else
SGIVOLHDR.size= echo 0
.endif
d395 1
a395 1
		size=$$(($$size + ${SGIVOLHDR.size:sh} * 512)); \
d431 9
a439 8
	cp $@@ $@@.tmp
	dd if=/dev/zero bs=512 count=${SGIVOLHDR.size:sh} >> $@@
	${TOOLDIR}/bin/nbsgivol -f -i $@@
	${TOOLDIR}/bin/nbsgivol -f -w aoutboot ${STAGEDIR}/${image}/aoutboot $@@
	${TOOLDIR}/bin/nbsgivol -f -w ip2xboot ${STAGEDIR}/${image}/ip2xboot $@@
	${TOOLDIR}/bin/nbsgivol -f -w ip3xboot ${STAGEDIR}/${image}/ip3xboot $@@
	dd if=$@@.tmp of=$@@ bs=512 seek=${SGIVOLHDR.size:sh}
	rm -f $@@.tmp
@


1.31
log
@Remove an extra trailing slash.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.30 2007/02/20 18:09:05 mrg Exp $
d395 1
a395 1
	if [ "${BASE_PORTS.${image}:Msgimips}" != "" && \
@


1.30
log
@use -publisher instead of -P.  from mkisofs(1):

-P     Outdated  option  reserved  by  POSIX.1-2001,   use   -publisher
       instead.   This  option  will  get  POSIX.1-2001  semantics with
       mkisofs-2.02.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.29 2006/09/17 03:56:03 tsutsui Exp $
d83 1
a83 1
RSYNC_SITE?=	rsync://rsync.NetBSD.org/NetBSD/${RELEASENAME}/
@


1.29
log
@Reorganize macppc_installboot to make macppccd.iso image actually bootable
on (some) OpenFirmware 2.x machines.

Current macppccd.iso image doesn't boot on Openfirmware 2.x
(and probably 1.0.5) machines because it uses pre-compiled binary
which is based on old (and customized) bootxx.
It causes version mismatch against newer ofwboot whose load address
has been changed from 0x600000 to 0xe00000, as mentioned in the
following post:
http://mail-index.netbsd.org/port-macppc/2004/12/14/0020.html
There was also an raw binary which was passed to mkisofs as -boot-hfs-file.

To fix these issue, prepare a simple mkhfsboot program which creates
a boothfs file with the Apple partition map info for mkisofs,
and modify macppc_installboot to search the secondary ofwboot from isofs
and to put and modify the primary bootxx accordingly.
See PR toolchain/30245 for more details.

There are still some machines which don't boot from an iso image created
by this method (G3 machines with OF 2.0f1 etc.), but it's still better
than to keep ugly and obsolete hacks.

Ok'ed by macallan, and there is no other particular comment about this PR.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.28 2006/09/17 03:20:46 tsutsui Exp $
d159 1
a159 1
MKISOFS_ARGS+=		-P "${PUBLISHER}"
@


1.28
log
@Remove trailing slash from RSYNC_INCLUDE and RSYNC_EXCLUDE pathes
so that rsync can get regular files.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.27 2005/12/03 01:23:23 riz Exp $
d61 1
a61 1
SUBDIR+=	macppc_installboot
d80 1
d232 1
a232 1
	-boot-hfs-file ${MACPPC_IBOOTDIR}/macppcboot.raw
d362 2
a363 3
# 3. Add 64k if macppc is included (ofwboot munged to one 64k block).
# 4. Add bootfile sizes rounded up to 512 bytes for pmax and vax.
# 5. Round up to a 32k boundary, then add another 32k for TAO padding.
d366 1
a366 1
size-${image}: all-macppc_installboot
d377 3
a388 3
	if [ "${BASE_PORTS.${image}:Mmacppc}" != "" ]; then \
		size=$$(($$size + 65536)); \
	fi && \
d419 2
a420 3
	@@blknum=$$((`ls -l $@@ | awk '{print $$5}'` / 512)) && \
	${MACPPC_IBOOTDIR}/macppc_installboot $@@ $$blknum 756
	dd if=${EXTFILEDIR}/macppc.ofwboot bs=64k count=1 conv=sync >>$@@ 2>/dev/null
@


1.27
log
@The sgimips files will be extracted into a different directory if sgimips
is on an image of a different name - compensate.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.26 2005/10/22 15:56:16 riz Exp $
d139 1
a139 1
RSYNC_INCLUDE+=		--include "/shared/"
d141 1
a141 1
			--exclude "/shared/[a-z]*/"
d146 1
a146 1
RSYNC_INCLUDE+=		--include "/${port}/"
d152 1
a152 1
RSYNC_INCLUDE+=		--include "/shared/${arch}/"
@


1.27.2.1
log
@Pull up following revision(s) (requested by tsutsui in ticket #172):
	distrib/cdrom/Makefile: revision 1.28
Remove trailing slash from RSYNC_INCLUDE and RSYNC_EXCLUDE pathes
so that rsync can get regular files.
@
text
@d1 1
a1 1
# $NetBSD$
d139 1
a139 1
RSYNC_INCLUDE+=		--include "/shared"
d141 1
a141 1
			--exclude "/shared/[a-z]*"
d146 1
a146 1
RSYNC_INCLUDE+=		--include "/${port}"
d152 1
a152 1
RSYNC_INCLUDE+=		--include "/shared/${arch}"
@


1.27.2.2
log
@Pull up following revision(s) (requested by tsutsui in ticket #172):
	distrib/cdrom/macppc_installboot/macppc_installboot.c: file removal
	distrib/cdrom/macppc_installboot/cd9660_util.c: revision 1.1
	distrib/cdrom/Makefile: revision 1.29
	distrib/cdrom/macppc_mkboothfs/Makefile: revision 1.1
	distrib/cdrom/macppc_installboot/bootxx.raw.uue: file removal
	distrib/cdrom/NetBSD-current.mk: revision 1.5
	distrib/cdrom/macppc_mkboothfs/mkboothfs.c: revision 1.1
	distrib/cdrom/macppc_installboot/mkmacppcboot.c: file removal
	distrib/cdrom/macppc_installboot/macppcboot.raw.uue: file removal
	distrib/cdrom/macppc_installboot/cd9660.c: revision 1.1
	distrib/cdrom/macppc_installboot/Makefile: revision 1.6
	distrib/cdrom/NetBSD-4.0.mk: revision 1.2
	distrib/cdrom/macppc_installboot/installboot.c: revision 1.1
	distrib/cdrom/macppc_installboot/installboot.h: revision 1.1
Reorganize macppc_installboot to make macppccd.iso image actually bootable
on (some) OpenFirmware 2.x machines.
Current macppccd.iso image doesn't boot on Openfirmware 2.x
(and probably 1.0.5) machines because it uses pre-compiled binary
which is based on old (and customized) bootxx.
It causes version mismatch against newer ofwboot whose load address
has been changed from 0x600000 to 0xe00000, as mentioned in the
following post:
http://mail-index.netbsd.org/port-macppc/2004/12/14/0020.html
There was also an raw binary which was passed to mkisofs as -boot-hfs-file.
To fix these issue, prepare a simple mkhfsboot program which creates
a boothfs file with the Apple partition map info for mkisofs,
and modify macppc_installboot to search the secondary ofwboot from isofs
and to put and modify the primary bootxx accordingly.
See PR toolchain/30245 for more details.
There are still some machines which don't boot from an iso image created
by this method (G3 machines with OF 2.0f1 etc.), but it's still better
than to keep ugly and obsolete hacks.
Ok'ed by macallan, and there is no other particular comment about this PR.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.27.2.1 2006/09/25 21:48:18 tron Exp $
d61 1
a61 1
SUBDIR+=	macppc_mkboothfs macppc_installboot
a79 1
MACPPC_MKBOOTHFSDIR!= cd ${.CURDIR}/macppc_mkboothfs && ${PRINTOBJDIR}
d231 1
a231 1
	-boot-hfs-file ${MACPPC_MKBOOTHFSDIR}/boothfs
d361 3
a363 2
# 3. Add bootfile sizes rounded up to 512 bytes for pmax and vax.
# 4. Round up to a 32k boundary, then add another 32k for TAO padding.
d366 1
a366 1
size-${image}: all-macppc_mkboothfs all-macppc_installboot
a376 3
.if !empty(BASE_PORTS.${image}:Mmacppc)
	${MACPPC_MKBOOTHFSDIR}/macppc_mkboothfs ${MACPPC_MKBOOTHFSDIR}/boothfs
.endif
d386 3
d419 3
a421 2
	${MACPPC_IBOOTDIR}/macppc_installboot \
	    $@@ ${EXTFILEDIR}/macppc.bootxx /ofwboot
@


1.26
log
@Don't make sgimips images bootable unless EXTFILES.sgimips is defined.
While I'm here, fix so that building from a clean objdir works
properly.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.25 2005/10/04 19:29:34 martin Exp $
d437 3
a439 3
	${TOOLDIR}/bin/nbsgivol -f -w aoutboot ${STAGEDIR}/sgimipscd/aoutboot $@@
	${TOOLDIR}/bin/nbsgivol -f -w ip2xboot ${STAGEDIR}/sgimipscd/ip2xboot $@@
	${TOOLDIR}/bin/nbsgivol -f -w ip3xboot ${STAGEDIR}/sgimipscd/ip3xboot $@@
@


1.25
log
@Make sgimipscd.iso bootable.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.24 2005/01/20 08:05:55 jmc Exp $
d368 2
a369 2
.if !empty(BASE_PORTS.${image}:Msgimips)
SGIVOLHDR.size != ( fgrep SGI_BOOT_BLOCK_SIZE_VOLHDR \
d372 2
d395 3
a397 2
	if [ "${BASE_PORTS.${image}:Msgimips}" != "" ]; then \
		size=$$(($$size + ${SGIVOLHDR.size} * 512)); \
d432 1
a432 1
.if !empty(BASE_PORTS.${image}:Msgimips)
d435 1
a435 1
	dd if=/dev/zero bs=512 count=${SGIVOLHDR.size} >> $@@
d440 1
a440 1
	dd if=$@@.tmp of=$@@ bs=512 seek=${SGIVOLHDR.size}
@


1.24
log
@If building a source only cd don't include shared/ALL
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.23 2004/12/31 08:34:13 jmc Exp $
d368 5
d393 3
d429 11
@


1.24.2.1
log
@Pull up following revision(s) (requested by martin in ticket #862):
	distrib/cdrom/Makefile: revision 1.25
	distrib/cdrom/NetBSD-current.mk: revision 1.3
Make sgimipscd.iso bootable.
@
text
@d1 1
a1 1
# $NetBSD$
a367 5
.if !empty(BASE_PORTS.${image}:Msgimips)
SGIVOLHDR.size != ( fgrep SGI_BOOT_BLOCK_SIZE_VOLHDR \
		${EXTFILEDIR}/sgimips.bootblock.h | \
		 sed -e 's/[^0-9]*//' )
.endif
a387 3
	if [ "${BASE_PORTS.${image}:Msgimips}" != "" ]; then \
		size=$$(($$size + ${SGIVOLHDR.size} * 512)); \
	fi && \
a420 11
.if !empty(BASE_PORTS.${image}:Msgimips)
	@@echo "Prepending SGI volume header"
	cp $@@ $@@.tmp
	dd if=/dev/zero bs=512 count=${SGIVOLHDR.size} >> $@@
	${TOOLDIR}/bin/nbsgivol -f -i $@@
	${TOOLDIR}/bin/nbsgivol -f -w aoutboot ${STAGEDIR}/sgimipscd/aoutboot $@@
	${TOOLDIR}/bin/nbsgivol -f -w ip2xboot ${STAGEDIR}/sgimipscd/ip2xboot $@@
	${TOOLDIR}/bin/nbsgivol -f -w ip3xboot ${STAGEDIR}/sgimipscd/ip3xboot $@@
	dd if=$@@.tmp of=$@@ bs=512 seek=${SGIVOLHDR.size}
	rm -f $@@.tmp
.endif
@


1.23
log
@Make sure amd64 cd's get bootblocks on them correctly also
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.22 2004/10/13 23:28:34 gavan Exp $
d195 2
d198 1
@


1.22
log
@Initial import of iyonix port.

The Iyonix is a desktop machine from Castle Technology, based on a 600MHz
XScale[tm] 80321 processor.

* Uses the bootloader from NetBSD/acorn32, which is now 32-bit compatible.
* Currently boots multiuser with a serial console.
* Device support is not yet complete.

With help from abs.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.21 2004/02/29 01:08:22 jmc Exp $
d217 6
@


1.21
log
@Fix typo so VAX_IBOOT works
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.20 2003/07/26 17:06:38 salo Exp $
d114 1
@


1.20
log
@netbsd.org->NetBSD.org
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.19 2003/07/10 11:23:53 lukem Exp $
d77 1
a77 1
VAX_IBOOT?=	${TOLL_INSTALLBOOT} -m vax -o sunsum,append
@


1.19
log
@explicitly pull in <bsd.own.mk> for NETBSDSRCDIR (to be safe)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2003/07/10 10:34:04 lukem Exp $
d82 1
a82 1
RSYNC_SITE?=	rsync://rsync.netbsd.org/NetBSD/${RELEASENAME}/
@


1.18
log
@Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2003/03/07 09:52:59 lukem Exp $
d69 1
@


1.17
log
@use distrib/common/sunbootcd.sh instead of distrib/utils/mksunbootcd/*
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2003/02/13 23:55:12 jmc Exp $
d74 3
a76 3
ALPHA_IBOOT?=	${INSTALLBOOT} -m alpha -o sunsum,append
PMAX_IBOOT?=	${INSTALLBOOT} -m pmax -o sunsum,append
VAX_IBOOT?=	${INSTALLBOOT} -m vax -o sunsum,append
d392 2
a393 1
	SUNLABEL=${SUNLABEL:Q} sh ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \
@


1.16
log
@After pax-as-tar conversion the -O option no longer exists nor is a
substitute available (boo..hiss..). Fix the extraction to deal with this.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2002/12/09 14:20:52 scw Exp $
a72 2
MKSUNBOOTCDDIR!=cd ${NETBSDSRCDIR}/distrib/utils/mksunbootcd && ${PRINTOBJDIR}
MKSUNBOOTCD?=	${MKSUNBOOTCDDIR}/mksunbootcd
d229 3
a231 3
SUN_BOOT.123:=	/dev/null
SUN_BOOT.4:=	/dev/null
SUN_BOOT.5:=	/dev/null
d251 1
a251 1
.if (${SUN_BOOT.5} != "/dev/null")
d348 2
a349 2
# 2. Add images added by mksunbootcd by rounding to a 320k boundary and
#    adding each Sun image rounded to a 320k boundary.
d362 1
a362 1
		bootfiles=`for f in ${SUN_BOOT_ARGS.${image}:N/dev/null:O}; do echo $$f; done | uniq` && \
d392 2
a393 1
	${MKSUNBOOTCD} -c 640 $@@ ${SUN_BOOT_ARGS.${image}}
@


1.15
log
@The walnut port has been subsumed by the new evbppc port.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2002/10/21 05:08:23 lukem Exp $
d305 2
a306 1
			tar --fast-read -xzOf ${>:C/,.*$//} ${>:C/^.*,//} >$@@;; \
@


1.14
log
@don't depend upon 'cvs -kb' to preserve macppcboot.raw (et al).
instead, keep uuencoded versions in the repository.

(arguably /usr/sbin/installboot -m macppc should support -t cd9660,
at which point we'd nuke this macppc_installboot hack)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2002/10/08 15:20:50 lukem Exp $
d109 1
a133 1
MACHINE_ARCH.walnut=	powerpc
@


1.13
log
@- add more MACHINE_ARCH.xxx variables
- when building RSYNC_INCLUDE, only add a directory once
- automatically add `shared/ALL' and `shared/${MACHINE_ARCH}' to
  ${BASE_PORTS.${image}} for each unique MACHINE_ARCH in the latter.
- don't bother explicitly listing shared/* in the example
- note that the cats cdrom is now bootable
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2002/10/03 07:28:33 lukem Exp $
d222 1
a222 1
	-boot-hfs-file ${.CURDIR}/macppc_installboot/macppcboot.raw
@


1.12
log
@enable -o append for alpha as well
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2002/10/03 05:26:49 lukem Exp $
d93 1
a93 1
##### MACHINE_ARCH for possible shared sets for each port #####
d95 3
d103 2
d106 4
d111 1
d113 1
d118 1
d120 1
d125 1
d128 2
d131 1
d133 1
a133 1
MACHINE_ARCH.sun3x=	m68k
d144 2
a145 1
.for port in ${ALL_PORTS}			# {
d148 1
a148 2
RSYNC_INCLUDE+=		--include "/${MACHINE_ARCH.${port}}/" \
			--include "/shared/${MACHINE_ARCH.${port}}/"
d151 3
d165 3
d195 1
d202 5
d208 2
@


1.11
log
@revert part of previous;
alpha installboot still needs to come after everything else, because non of
the other installboot(8) backends support recalculating the alpha checksum
(yet).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2002/10/03 03:58:56 lukem Exp $
d76 1
a76 1
ALPHA_IBOOT?=	${INSTALLBOOT} -m alpha -o sunsum
@


1.10
log
@- create ${IMAGEDIR}/${image}.contents, with the files from BASE_PORTS.${image}
  (could be extended )
- move alpha installboot above pmax/vax; it doesn't need to be last anymore
- cosmetic tweaks
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2002/09/29 14:29:19 lukem Exp $
a368 3
.if !empty(BASE_PORTS.${image}:Malpha)
	${ALPHA_IBOOT} $@@ ${BOOTFILE.alpha}
.endif
d374 3
@


1.9
log
@Instead of building the staging area with symlinks and using "mkisofs -f",
only populate the stage area with the minimal necessary files and use
"mkisofs -graft-points -path-list pathlistfile", and populate pathlistfile
with the "reachover" paths.

    IMPORTANT NOTE:
	This change requires mkisofs 1.15a34 or newer for a working
	-graft-points option.
	This can be found in the cdrecord-devel 1.11a34 package.

Don't fetch by default; the rsync is resource intensive on rsync.netbsd.org
and is often unnecessary.  Deprecate NO_FETCH whilst here.
Use "make fetch" explicitly...

Explicitly add ${RELEASENAME} to RSYNC_SITE (and remove it from all
the other rsync options), and deprecate ${RELEASE_SUBDIR}

Add some  # {  and  # }  comments, to make it easier to track make(1)
conditionals & loops.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2002/09/29 07:23:15 lukem Exp $
d157 2
d286 1
a286 1
	rm -f ${pathlist.${image}}
d292 2
a293 1
	echo "${arch}=${DISTRIBDIR}/${arch}" >> ${STAGEDIR}/${image}.pathlist
d355 1
d369 3
a377 3
.if !empty(BASE_PORTS.${image}:Malpha)
	${ALPHA_IBOOT} $@@ ${BOOTFILE.alpha}
.endif
d396 2
a397 1
	-rm -f ${IMAGEDIR}/${image}.iso ${IMAGEDIR}/${image}.iso.log
@


1.8
log
@- don't hardcode the CD size to 666000 blocks; use CD_SIZE variable instead.
- access mksunbootcd via ${NETBSDSRCDIR}/... && ${PRINTOBJDIR}
- use ${INSTALLBOOT} for alpha,pmax,vax instead of /sys/arch/*/stand/...
- use ${.CURDIR}/macppc_installboot to access macppcboot.raw
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2002/06/24 14:49:15 mrg Exp $
d33 1
a33 1
MKISOFS_ARGS=		-f -A "NetBSD ${CD_RELEASE}" \
d83 1
a83 1
RSYNC_SITE?=	rsync://rsync.netbsd.org/NetBSD/
a92 2
RELEASE_SUBDIR?=${RELEASENAME}

d122 3
a124 4
RSYNC_INCLUDE+=		--include "/${RELEASENAME}/" \
			--include "/${RELEASENAME}/shared/"
RSYNC_EXCLUDE+=		--exclude "/${RELEASENAME}/[a-z]*" \
			--exclude "/${RELEASENAME}/shared/[a-z]*/"
d127 2
a128 2
.for port in ${ALL_PORTS}
RSYNC_INCLUDE+=		--include "/${RELEASENAME}/${port}/"
d130 2
a131 2
RSYNC_INCLUDE+=		--include "/${RELEASENAME}/${MACHINE_ARCH.${port}}/" \
			--include "/${RELEASENAME}/shared/${MACHINE_ARCH.${port}}/"
d133 1
a133 1
.endfor
d145 1
a145 1
.for image in ${CD_IMAGES}
d156 3
d170 1
a170 1
.for port in ${ports}
d176 1
a176 1
.endfor
d197 1
a197 1
.if !empty(ports:Msparc*) || !empty(ports:Msun3*)
d206 1
a206 1
.if !empty(ports:Msun3)
d212 1
a212 1
.endif
d219 1
a219 1
.if !empty(ports:Msparc64)
d226 1
a226 1
.endif
d233 1
a233 1
.endif
d235 1
a235 1
.endfor
d265 2
a266 2
			echo "ln -sf ${>:S/,link$//} $@@"; \
			ln -sf ${>:S/,link$//} $@@;; \
d268 2
a269 2
			echo "ln -sf `pwd -P`/${>:S/,link$//} $@@"; \
			ln -sf `pwd -P`/${>:S/,link$//} $@@;; \
d279 1
a279 1
.for image in ${CD_IMAGES}
d284 1
a285 3
.if !empty(RELEASE_SUBDIR)
	mkdir -p ${STAGEDIR}/${image}/${RELEASE_SUBDIR}
.endif
d290 1
a290 1
	ln -sf `cd ${DISTRIBDIR} && pwd -P`/${RELEASENAME}/${arch} ${STAGEDIR}/${image}/${RELEASE_SUBDIR}/
d295 1
a295 1
.for file in ${EXTFILES}
d297 3
a299 3
${EXTFILEDIR}/${file:C/:.*$//}: ${DISTRIBDIR}/${RELEASENAME}/${file:C/^.*://} USE-FILE
${DISTRIBDIR}/${RELEASENAME}/${file:C/^.*://}: .PHONY
.endfor
d302 1
a302 1
.for file in ${INTFILES.${image}}
d304 4
a307 4
${STAGEDIR}/${image}/${file:C/:.*$//}: ${DISTRIBDIR}/${RELEASENAME}/${file:C/^.*://} USE-FILE
${DISTRIBDIR}/${RELEASENAME}/${file:C/^.*://}: .PHONY
.endfor
.for file in ${ADDFILES.${image}}
d311 1
a311 1
.endfor
d351 1
a351 1
${IMAGEDIR}/${image}.iso: fetch size-${image}
d380 1
a380 1
.endfor
a382 1
.if !defined(NO_FETCH)
d385 1
a385 2
	@@${RSYNC} ${RSYNC_INCLUDE} ${RSYNC_ARGS} ${RSYNC_EXCLUDE} ${RSYNC_SITE} ${DISTRIBDIR}
.endif
@


1.7
log
@s/${DISTDIR}/${DISTRIBDIR}/ as the former conflicts with pkgsrc.
add 1.6 support for vax cdrom's.  other ports in NetBSD-1.6.mk are as in
1.6.mk and are probably wrong.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2002/06/15 02:15:15 lukem Exp $
d31 1
d73 2
a74 1
MKSUNBOOTCD?=	/usr/src/distrib/utils/mksunbootcd/mksunbootcd
d76 3
a78 3
ALPHA_IBOOT?=	/sys/arch/alpha/stand/installboot/installboot
PMAX_IBOOT?=	/sys/arch/pmax/stand/installboot/installboot
VAX_IBOOT?=	/sys/arch/vax/stand/installboot/installboot -sa
d188 2
a189 2
			--macbin -map ${.CURDIR}/hfsmap.lst \
			-boot-hfs-file ${MACPPC_IBOOTDIR}/macppcboot.raw
d349 1
a349 1
	if [ $$sizek -gt 666000 ]; then echo "Image too large for 74-minute CD!"; false; fi
d368 1
a368 1
	${PMAX_IBOOT} -sa $@@ ${BOOTFILE.pmax}
d374 1
a374 1
	${ALPHA_IBOOT} -s $@@ ${BOOTFILE.alpha}
@


1.6
log
@use ${PRINTOBJDIR}
(mmm, finding make -j N>1 build bugs)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2001/01/17 02:07:25 tv Exp $
d31 1
a31 1
RELEASENAME=		NetBSD-${CD_RELEASE}
d76 1
a76 1
VAX_IBOOT?=	/sys/arch/vax/stand/installboot/installboot
d85 1
a85 1
DISTDIR?=	${.OBJDIR}/download
d290 1
a290 1
	ln -sf `cd ${DISTDIR} && pwd -P`/${RELEASENAME}/${arch} ${STAGEDIR}/${image}/${RELEASE_SUBDIR}/
d297 2
a298 2
${EXTFILEDIR}/${file:C/:.*$//}: ${DISTDIR}/${RELEASENAME}/${file:C/^.*://} USE-FILE
${DISTDIR}/${RELEASENAME}/${file:C/^.*://}: .PHONY
d304 2
a305 2
${STAGEDIR}/${image}/${file:C/:.*$//}: ${DISTDIR}/${RELEASENAME}/${file:C/^.*://} USE-FILE
${DISTDIR}/${RELEASENAME}/${file:C/^.*://}: .PHONY
d369 1
a369 1
	${VAX_IBOOT} -sa $@@ ${BOOTFILE.vax}
d384 1
a384 1
	@@mkdir -p ${DISTDIR}
d386 1
a386 1
	@@${RSYNC} ${RSYNC_INCLUDE} ${RSYNC_ARGS} ${RSYNC_EXCLUDE} ${RSYNC_SITE} ${DISTDIR}
d390 1
a390 1
cleandir distclean: cleandistdir
d400 2
a401 2
cleandistdir:
	-rm -rf ${DISTDIR}
@


1.5
log
@Add LOG_MKISOFS option to produce extra-verbose logs of the mkisofs image
generation info (-v -v).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2000/11/30 21:33:41 tv Exp $
d78 1
a78 1
MACPPC_IBOOTDIR!= cd ${.CURDIR}/macppc_installboot && ${MAKE} print-objdir
@


1.5.2.1
log
@Pull up revision 1.6 (requested by lukem in ticket #279):
use ${PRINTOBJDIR}
(mmm, finding make -j N>1 build bugs)
@
text
@d1 1
a1 1
# $NetBSD$
d78 1
a78 1
MACPPC_IBOOTDIR!= cd ${.CURDIR}/macppc_installboot && ${PRINTOBJDIR}
@


1.4
log
@Use the public-access rsync entrypoint, not a ssh-based developer type.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2000/11/30 00:04:08 tv Exp $
d352 3
d356 1
d394 1
a394 1
	-rm -f ${IMAGEDIR}/${image}.iso
@


1.3
log
@Clean up hidden files a bit.
Give sensible HFS types to some file extensions.
Fix alpha kernel to be a link, not gzip extraction.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2000/11/29 19:56:19 tv Exp $
d81 2
a82 2
RSYNC_SITE?=	ftp.netbsd.org:/pub/NetBSD/
RSYNC_ARGS?=	-va --delete --rsh=ssh
@


1.2
log
@Minor updates, fixes, and cleanups.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2000/11/29 16:35:03 tv Exp $
a32 1
			-hide-list ${.CURDIR}/hide-iso.lst \
d34 1
d186 2
a187 1
			--macbin -boot-hfs-file ${MACPPC_IBOOTDIR}/macppcboot.raw
d189 1
a189 1
MKISOFS_ARGS.${image}+=	-apple --macbin
d261 1
a261 1
	@@case $> in \
d273 1
a273 1
	esac
@


1.1
log
@First draft of multiple-arch CD-ROM creation system.  This is extremely
rough at this point, and needs more fleshing out in several areas.  Does not
yet do packages or check for the existence of support programs--to be fixed.
@
text
@d1 1
a1 1
# $NetBSD$
d72 1
a72 1
MKSUNBOOTCD?=	/usr/pkg/sbin/mksunbootcd
a78 1
MACPPC_IBOOT=	${MACPPC_IBOOTDIR}/macppc_installboot
d85 4
a88 4
DISTDIR?=	./download
STAGEDIR?=	./staging
IMAGEDIR?=	.
EXTFILEDIR?=	./extfiles
d184 1
a184 1
.if !empty(ports:Mmac*)
d186 2
a187 7
			--macbin

.if !empty(ports:Mmacppc)
MKISOFS_ARGS.${image}+= -boot-hfs-file macppc_installboot/macppcboot.raw
.endif

.elif defined(USE_APPLE_ISO)
d193 1
d226 4
d320 5
a324 1
size-${image}:
d348 5
a352 3
${IMAGEDIR}/${image}.iso: fetch stage-${image} extfileprep fileprep-${image} size-${image}
	cd ${STAGEDIR}/${image} && ${MKISOFS} -o ${.CURDIR}/$@@ ${MKISOFS_ARGS} ${MKISOFS_ARGS.${image}} .
.if defined(SUN_BOOT_ARGS.${image})
d357 1
a357 1
	${MACPPC_IBOOT} $@@ $$blknum 756
d389 1
a389 1
	-rm -f ${image}.iso
@

