head	1.8;
access;
symbols
	netbsd-11-0-RC4:1.8
	netbsd-11-0-RC3:1.8
	netbsd-11-0-RC2:1.8
	netbsd-11-0-RC1:1.8
	perseant-exfatfs-base-20250801:1.8
	netbsd-11:1.8.0.6
	netbsd-11-base:1.8
	netbsd-10-1-RELEASE:1.8
	perseant-exfatfs-base-20240630:1.8
	perseant-exfatfs:1.8.0.4
	perseant-exfatfs-base:1.8
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.7
	netbsd-10-0-RELEASE:1.8
	netbsd-10-0-RC6:1.8
	netbsd-10-0-RC5:1.8
	netbsd-10-0-RC4:1.8
	netbsd-10-0-RC3:1.8
	netbsd-10-0-RC2:1.8
	netbsd-10-0-RC1:1.8
	netbsd-10:1.8.0.2
	netbsd-10-base:1.8
	netbsd-9-3-RELEASE:1.7
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.40
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.7
	cjep_staticlib_x:1.7.0.38
	cjep_staticlib_x-base:1.7
	netbsd-9-1-RELEASE:1.7
	phil-wifi-20200421:1.7
	phil-wifi-20200411:1.7
	is-mlppp:1.7.0.36
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.7
	netbsd-9-0-RELEASE:1.7
	netbsd-9-0-RC2:1.7
	netbsd-9-0-RC1:1.7
	phil-wifi-20191119:1.7
	netbsd-9:1.7.0.34
	netbsd-9-base:1.7
	phil-wifi-20190609:1.7
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	pgoyette-compat-merge-20190127:1.7
	pgoyette-compat-20190127:1.7
	pgoyette-compat-20190118:1.7
	pgoyette-compat-1226:1.7
	pgoyette-compat-1126:1.7
	pgoyette-compat-1020:1.7
	pgoyette-compat-0930:1.7
	pgoyette-compat-0906:1.7
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.32
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.7.0.30
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.7.0.28
	matt-nb8-mediatek-base:1.7
	perseant-stdc-iso10646:1.7.0.26
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.24
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.22
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.7.0.20
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.7.0.18
	bouyer-socketcan-base:1.7
	pgoyette-localcount-20170107:1.7
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.7
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.7
	netbsd-7-nhusb:1.7.0.16
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.7
	pgoyette-localcount-20160726:1.7
	pgoyette-localcount:1.7.0.14
	pgoyette-localcount-base:1.7
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.12
	netbsd-7-0-RELEASE:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-5-2-3-RELEASE:1.2
	netbsd-5-1-5-RELEASE:1.2
	netbsd-6-0-6-RELEASE:1.4.8.1
	netbsd-6-1-5-RELEASE:1.4.8.1
	netbsd-7:1.7.0.10
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.7
	yamt-pagecache-tag8:1.4.6.2
	netbsd-6-1-4-RELEASE:1.4.8.1
	netbsd-6-0-5-RELEASE:1.4.8.1
	tls-earlyentropy:1.7.0.8
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.7
	riastradh-drm2-base3:1.7
	netbsd-6-1-3-RELEASE:1.4.8.1
	netbsd-6-0-4-RELEASE:1.4.8.1
	netbsd-5-2-2-RELEASE:1.2
	netbsd-5-1-4-RELEASE:1.2
	netbsd-6-1-2-RELEASE:1.4.8.1
	netbsd-6-0-3-RELEASE:1.4.8.1
	netbsd-5-2-1-RELEASE:1.2
	netbsd-5-1-3-RELEASE:1.2
	netbsd-6-1-1-RELEASE:1.4.8.1
	riastradh-drm2-base2:1.7
	riastradh-drm2-base1:1.7
	riastradh-drm2:1.7.0.4
	riastradh-drm2-base:1.7
	netbsd-6-1:1.4.8.1.0.6
	netbsd-6-0-2-RELEASE:1.4.8.1
	netbsd-6-1-RELEASE:1.4.8.1
	netbsd-6-1-RC4:1.4.8.1
	netbsd-6-1-RC3:1.4.8.1
	agc-symver:1.7.0.6
	agc-symver-base:1.7
	netbsd-6-1-RC2:1.4.8.1
	netbsd-6-1-RC1:1.4.8.1
	yamt-pagecache-base8:1.7
	netbsd-5-2:1.2.0.38
	netbsd-6-0-1-RELEASE:1.4.8.1
	yamt-pagecache-base7:1.7
	netbsd-5-2-RELEASE:1.2
	netbsd-5-2-RC1:1.2
	matt-nb6-plus-nbase:1.4.8.1
	yamt-pagecache-base6:1.7
	netbsd-6-0:1.4.8.1.0.4
	netbsd-6-0-RELEASE:1.4.8.1
	netbsd-6-0-RC2:1.4.8.1
	tls-maxphys:1.7.0.2
	tls-maxphys-base:1.7
	matt-nb6-plus:1.4.8.1.0.2
	matt-nb6-plus-base:1.4.8.1
	netbsd-6-0-RC1:1.4.8.1
	yamt-pagecache-base5:1.5
	yamt-pagecache-base4:1.4
	netbsd-6:1.4.0.8
	netbsd-6-base:1.4
	netbsd-5-1-2-RELEASE:1.2
	netbsd-5-1-1-RELEASE:1.2
	yamt-pagecache-base3:1.4
	yamt-pagecache-base2:1.4
	yamt-pagecache:1.4.0.6
	yamt-pagecache-base:1.4
	cherry-xenmp:1.4.0.4
	cherry-xenmp-base:1.4
	bouyer-quota2-nbase:1.4
	bouyer-quota2:1.4.0.2
	bouyer-quota2-base:1.4
	matt-mips64-premerge-20101231:1.4
	matt-nb5-mips64-premerge-20101231:1.2
	matt-nb5-pq3:1.2.0.36
	matt-nb5-pq3-base:1.2
	netbsd-5-1:1.2.0.34
	netbsd-5-1-RELEASE:1.2
	netbsd-5-1-RC4:1.2
	matt-nb5-mips64-k15:1.2
	netbsd-5-1-RC3:1.2
	netbsd-5-1-RC2:1.2
	netbsd-5-1-RC1:1.2
	netbsd-5-0-2-RELEASE:1.2
	matt-nb5-mips64-premerge-20091211:1.2
	matt-premerge-20091211:1.3
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.2
	matt-nb4-mips64-k7-u2a-k9b:1.2
	matt-nb5-mips64-u1-k1-k5:1.2
	matt-nb5-mips64:1.2.0.32
	netbsd-5-0-1-RELEASE:1.2
	jym-xensuspend-nbase:1.3
	netbsd-5-0:1.2.0.30
	netbsd-5-0-RELEASE:1.2
	netbsd-5-0-RC4:1.2
	netbsd-5-0-RC3:1.2
	netbsd-5-0-RC2:1.2
	jym-xensuspend:1.2.0.28
	jym-xensuspend-base:1.3
	netbsd-5-0-RC1:1.2
	netbsd-5:1.2.0.26
	netbsd-5-base:1.2
	matt-mips64-base2:1.2
	matt-mips64:1.2.0.24
	mjf-devfs2:1.2.0.22
	mjf-devfs2-base:1.2
	netbsd-4-0-1-RELEASE:1.2
	wrstuden-revivesa-base-3:1.2
	wrstuden-revivesa-base-2:1.2
	wrstuden-fixsa-newbase:1.2
	wrstuden-revivesa-base-1:1.2
	yamt-pf42-base4:1.2
	yamt-pf42-base3:1.2
	hpcarm-cleanup-nbase:1.2
	yamt-pf42-baseX:1.2
	yamt-pf42-base2:1.2
	wrstuden-revivesa:1.2.0.20
	wrstuden-revivesa-base:1.2
	yamt-pf42:1.2.0.18
	yamt-pf42-base:1.2
	keiichi-mipv6-nbase:1.2
	keiichi-mipv6:1.2.0.16
	keiichi-mipv6-base:1.2
	matt-armv6-nbase:1.2
	matt-armv6-prevmlocking:1.2
	wrstuden-fixsa-base-1:1.2
	netbsd-4-0:1.2.0.14
	netbsd-4-0-RELEASE:1.2
	cube-autoconf:1.2.0.12
	cube-autoconf-base:1.2
	netbsd-4-0-RC5:1.2
	netbsd-4-0-RC4:1.2
	netbsd-4-0-RC3:1.2
	netbsd-4-0-RC2:1.2
	netbsd-4-0-RC1:1.2
	matt-armv6:1.2.0.10
	matt-armv6-base:1.2
	matt-mips64-base:1.2
	hpcarm-cleanup:1.2.0.8
	hpcarm-cleanup-base:1.2
	wrstuden-fixsa:1.2.0.6
	wrstuden-fixsa-base:1.2
	abandoned-netbsd-4-base:1.2
	abandoned-netbsd-4:1.2.0.2
	netbsd-4:1.2.0.4
	netbsd-4-base:1.2;
locks; strict;
comment	@# @;


1.8
date	2021.09.18.01.47.10;	author christos;	state Exp;
branches;
next	1.7;
commitid	NKw39S32w03lsn9D;

1.7
date	2012.06.05.13.41.23;	author tsutsui;	state Exp;
branches;
next	1.6;

1.6
date	2012.06.04.18.53.03;	author joerg;	state Exp;
branches;
next	1.5;

1.5
date	2012.05.05.16.03.55;	author tsutsui;	state Exp;
branches;
next	1.4;

1.4
date	2010.06.19.23.11.10;	author riz;	state Exp;
branches
	1.4.6.1
	1.4.8.1;
next	1.3;

1.3
date	2009.02.14.13.56.41;	author abs;	state Exp;
branches;
next	1.2;

1.2
date	2006.02.14.04.49.50;	author dyoung;	state Exp;
branches
	1.2.28.1;
next	1.1;

1.1
date	2005.06.12.19.46.17;	author dyoung;	state Exp;
branches;
next	;

1.4.6.1
date	2012.05.23.10.08.23;	author yamt;	state Exp;
branches;
next	1.4.6.2;

1.4.6.2
date	2012.10.30.19.00.12;	author yamt;	state Exp;
branches;
next	;

1.4.8.1
date	2012.06.12.19.11.51;	author riz;	state Exp;
branches;
next	;

1.2.28.1
date	2009.05.13.19.19.42;	author jym;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Patch the build script and toolchain to allow passing through
HOST_CPPFLAGS, HOST_CXXFLAGS, but not LIBRARY_PATH because it breaks
the build. These variables are necessary to support building NetBSD
from a GNU Guix or NixOS host, where /usr/include, /lib, and all
but /bin/sh do not exist.  In many cases, support for HOST_CPPFLAGS
was incomplete. From Ryan Sundberg
@
text
@#	$NetBSD: Makefile,v 1.7 2012/06/05 13:41:23 tsutsui Exp $

HOSTPROGNAME=	${MACHINE_GNU_PLATFORM}-fdisk
HOST_SRCDIR=	sbin/fdisk
HOST_SRCS=	disklabel.c

HOST_CPPFLAGS+=	-DDEFAULT_BOOTDIR=\"${DESTDIR}/usr/mdec\"

.include "${.CURDIR}/../Makefile.nbincludes"
.include "${.CURDIR}/../Makefile.host"

.PATH: ${.CURDIR}/../../lib/libc/gen
@


1.7
log
@Use ${DESTDIR}/usr/mdec for DEFAULT_BOOTDIR on tools fdisk(8)
rather than unknown build host's /usr/mdec directory.

XXX: no option to leave MBR bootcode empty on x86 targets
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2012/06/04 18:53:03 joerg Exp $
d7 1
a7 1
HOST_CPPFLAGS=	-DDEFAULT_BOOTDIR=\"${DESTDIR}/usr/mdec\"
@


1.6
log
@Build getcap.c only once.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2012/05/05 16:03:55 tsutsui Exp $
d7 2
@


1.5
log
@Don't use "#if defined(__i386__) || defined(__x86_64__)" conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.

Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2010/06/19 23:11:10 riz Exp $
d5 1
a5 1
HOST_SRCS=	getcap.c disklabel.c
@


1.4
log
@Rename Makefile.disklabel to Makefile.nbincludes, as this file has
been used by more than disklabel for years.  New name suggestion from
mrg@@ .
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2009/02/14 13:56:41 abs Exp $
a6 4
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+= -DBOOTSEL
.endif

@


1.4.8.1
log
@Pull up following revision(s) (requested by tsutsui in ticket #315):
	sbin/fdisk/fdisk.c: revision 1.141
	sbin/fdisk/fdisk.c: revision 1.142
	tools/fdisk/Makefile: revision 1.5
	tools/fdisk/Makefile: revision 1.7
	sbin/fdisk/Makefile: revision 1.42
Don't use "#if defined(__i386__) || defined(__x86_64__)" conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.
Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.
Use ${DESTDIR}/usr/mdec for DEFAULT_BOOTDIR on tools fdisk(8)
rather than unknown build host's /usr/mdec directory.
XXX: no option to leave MBR bootcode empty on x86 targets
@
text
@d1 1
a1 1
#	$NetBSD$
d7 3
a9 1
HOST_CPPFLAGS=	-DDEFAULT_BOOTDIR=\"${DESTDIR}/usr/mdec\"
@


1.4.6.1
log
@sync with head.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2010/06/19 23:11:10 riz Exp $
d7 4
@


1.4.6.2
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4.6.1 2012/05/23 10:08:23 yamt Exp $
d5 1
a5 3
HOST_SRCS=	disklabel.c

HOST_CPPFLAGS=	-DDEFAULT_BOOTDIR=\"${DESTDIR}/usr/mdec\"
@


1.3
log
@Convert more MACHINE tests to MACHINE_ARCH
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2006/02/14 04:49:50 dyoung Exp $
d11 1
a11 1
.include "${.CURDIR}/../Makefile.disklabel"
@


1.2
log
@For the i386 and amd64 cross-toolset, build fdisk with -DBOOTSEL,
for a more full-featured cross-tool.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2005/06/12 19:46:17 dyoung Exp $
d7 1
a7 1
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
@


1.2.28.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.3 2009/02/14 13:56:41 abs Exp $
d7 1
a7 1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
@


1.1
log
@Make disklabel(8) and fdisk(8) into "host tools " last step:  build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/.  That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such.  I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2003/11/12 02:18:27 matt Exp $
d7 4
@

