head	1.18;
access;
symbols
	RELENG_8_4:1.18.0.2
	RELENG_9_1_0_RELEASE:1.13.4.1.4.2
	RELENG_9_1:1.13.4.1.0.4
	RELENG_9_1_BP:1.13.4.1
	RELENG_8_3_0_RELEASE:1.13.2.1.8.1
	RELENG_8_3:1.13.2.1.0.8
	RELENG_8_3_BP:1.13.2.1
	RELENG_9_0_0_RELEASE:1.13.4.1.2.1
	RELENG_9_0:1.13.4.1.0.2
	RELENG_9_0_BP:1.13.4.1
	RELENG_9:1.13.0.4
	RELENG_9_BP:1.13
	RELENG_7_4_0_RELEASE:1.12.24.1
	RELENG_8_2_0_RELEASE:1.13.2.1.6.1
	RELENG_7_4:1.12.0.24
	RELENG_7_4_BP:1.12
	RELENG_8_2:1.13.2.1.0.6
	RELENG_8_2_BP:1.13.2.1
	RELENG_8_1_0_RELEASE:1.13.2.1.4.1
	RELENG_8_1:1.13.2.1.0.4
	RELENG_8_1_BP:1.13.2.1
	RELENG_7_3_0_RELEASE:1.12.22.1
	RELENG_7_3:1.12.0.22
	RELENG_7_3_BP:1.12
	RELENG_8_0_0_RELEASE:1.13.2.1.2.1
	RELENG_8_0:1.13.2.1.0.2
	RELENG_8_0_BP:1.13.2.1
	RELENG_8:1.13.0.2
	RELENG_8_BP:1.13
	RELENG_7_2_0_RELEASE:1.12.20.1
	RELENG_7_2:1.12.0.20
	RELENG_7_2_BP:1.12
	RELENG_7_1_0_RELEASE:1.12.18.1
	RELENG_6_4_0_RELEASE:1.12.16.1
	RELENG_7_1:1.12.0.18
	RELENG_7_1_BP:1.12
	RELENG_6_4:1.12.0.16
	RELENG_6_4_BP:1.12
	RELENG_7_0_0_RELEASE:1.12
	RELENG_6_3_0_RELEASE:1.12
	RELENG_7_0:1.12.0.14
	RELENG_7_0_BP:1.12
	RELENG_6_3:1.12.0.12
	RELENG_6_3_BP:1.12
	RELENG_7:1.12.0.10
	RELENG_7_BP:1.12
	RELENG_6_2_0_RELEASE:1.12
	RELENG_6_2:1.12.0.8
	RELENG_6_2_BP:1.12
	RELENG_5_5_0_RELEASE:1.7
	RELENG_5_5:1.7.0.8
	RELENG_5_5_BP:1.7
	RELENG_6_1_0_RELEASE:1.12
	RELENG_6_1:1.12.0.6
	RELENG_6_1_BP:1.12
	RELENG_6_0_0_RELEASE:1.12
	RELENG_6_0:1.12.0.4
	RELENG_6_0_BP:1.12
	RELENG_6:1.12.0.2
	RELENG_6_BP:1.12
	RELENG_5_4_0_RELEASE:1.7
	RELENG_5_4:1.7.0.6
	RELENG_5_4_BP:1.7
	RELENG_5_3_0_RELEASE:1.7
	RELENG_5_3:1.7.0.4
	RELENG_5_3_BP:1.7
	RELENG_5:1.7.0.2
	RELENG_5_BP:1.7
	RELENG_5_2_1_RELEASE:1.4
	RELENG_5_2_0_RELEASE:1.4
	RELENG_5_2:1.4.0.4
	RELENG_5_2_BP:1.4
	RELENG_5_1_0_RELEASE:1.4
	RELENG_5_1:1.4.0.2
	RELENG_5_1_BP:1.4;
locks; strict;
comment	@# @;


1.18
date	2013.01.12.01.00.10;	author svnexp;	state Exp;
branches
	1.18.2.1;
next	1.17;

1.17
date	2012.11.17.01.53.36;	author svnexp;	state Exp;
branches;
next	1.16;

1.16
date	2012.09.11.22.38.33;	author obrien;	state Exp;
branches;
next	1.15;

1.15
date	2011.11.17.21.06.53;	author dim;	state Exp;
branches;
next	1.14;

1.14
date	2011.11.15.20.15.58;	author dim;	state Exp;
branches;
next	1.13;

1.13
date	2008.01.21.18.44.55;	author obrien;	state Exp;
branches
	1.13.2.1
	1.13.4.1;
next	1.12;

1.12
date	2005.05.16.09.32.41;	author ru;	state Exp;
branches
	1.12.2.1
	1.12.10.1
	1.12.16.1
	1.12.18.1
	1.12.20.1
	1.12.22.1
	1.12.24.1;
next	1.11;

1.11
date	2005.03.02.16.40.50;	author ru;	state Exp;
branches;
next	1.10;

1.10
date	2005.02.27.19.13.41;	author ru;	state Exp;
branches;
next	1.9;

1.9
date	2005.02.27.11.22.57;	author ru;	state Exp;
branches;
next	1.8;

1.8
date	2005.02.26.21.47.54;	author ru;	state Exp;
branches;
next	1.7;

1.7
date	2004.03.01.17.47.38;	author ru;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2004.02.28.07.25.48;	author ache;	state Exp;
branches;
next	1.5;

1.5
date	2004.02.20.11.55.13;	author ru;	state Exp;
branches;
next	1.4;

1.4
date	2003.04.15.06.51.04;	author ru;	state Exp;
branches;
next	1.3;

1.3
date	2003.04.11.17.58.17;	author ru;	state Exp;
branches;
next	1.2;

1.2
date	2003.04.06.21.46.44;	author imp;	state Exp;
branches;
next	1.1;

1.1
date	2003.04.05.20.30.30;	author imp;	state Exp;
branches;
next	;

1.18.2.1
date	2013.01.12.01.00.10;	author svnexp;	state dead;
branches;
next	1.18.2.2;

1.18.2.2
date	2013.03.28.13.05.46;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.13.2.1.2.1
	1.13.2.1.4.1
	1.13.2.1.6.1
	1.13.2.1.8.1;
next	1.13.2.2;

1.13.2.2
date	2012.11.17.10.37.08;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.13.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.13.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.13.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.13.2.1.8.2;

1.13.2.1.8.2
date	2012.11.17.08.25.43;	author svnexp;	state Exp;
branches;
next	;

1.13.4.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.13.4.1.2.1
	1.13.4.1.4.1;
next	1.13.4.2;

1.13.4.2
date	2012.11.17.11.37.27;	author svnexp;	state Exp;
branches;
next	1.13.4.3;

1.13.4.3
date	2013.03.15.15.43.47;	author svnexp;	state Exp;
branches;
next	;

1.13.4.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.13.4.1.2.2;

1.13.4.1.2.2
date	2012.11.17.08.37.24;	author svnexp;	state Exp;
branches;
next	;

1.13.4.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.13.4.1.4.2;

1.13.4.1.4.2
date	2012.11.17.08.48.15;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1
date	2012.11.17.07.45.17;	author svnexp;	state Exp;
branches;
next	;

1.12.10.1
date	2012.11.17.08.07.50;	author svnexp;	state Exp;
branches;
next	;

1.12.16.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.12.18.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.12.20.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.12.22.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.12.24.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.12.24.2;

1.12.24.2
date	2012.11.17.08.17.37;	author svnexp;	state Exp;
branches;
next	;

1.7.2.1
date	2008.03.31.19.28.13;	author fjoe;	state Exp;
branches;
next	;


desc
@@


1.18
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/245311
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/tools/build/Makefile 245311 2013-01-11 20:51:02Z brooks $

.PATH: ${.CURDIR}/../../include

LIB=		egacy
SRC=
INCSGROUPS=	INCS
INCS=

BOOTSTRAPPING?=	0

_WITH_GETLINE!=	grep -c _WITH_GETLINE /usr/include/stdio.h || true
.if ${_WITH_GETLINE} == 0
.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic
SRCS=		getline.c config.h
CFLAGS+=	-DHAVE_CONFIG_H -I.
CLEANFILES+=	config.h

${SRCS:N*.h:R:S/$/.o/}: config.h
config.h: ${.CURDIR}/../../lib/libmagic/config.h
	grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET}
.endif

_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/pwd.h || true
.if ${_WITH_PWCACHEDB} == 0
.PATH: ${.CURDIR}/../../contrib/libc-pwcache
CFLAGS+=	-I${.CURDIR}/../../contrib/libc-pwcache \
		-I${.CURDIR}/../../lib/libc/include
SRCS+=		pwcache.c
.endif

_WITH_STRSVIS!=	grep -c strsvis /usr/include/vis.h || true
.if ${_WITH_STRSVIS} == 0
.PATH: ${.CURDIR}/../../contrib/libc-vis
SRCS+=		vis.c
CFLAGS+=	-I${.CURDIR}/../../contrib/libc-vis \
		-I${.CURDIR}/../../lib/libc/include
.endif

.if empty(SRCS)
SRCS=		dummy.c
.endif

.if defined(CROSS_BUILD_TESTING)
SUBDIR=		cross-build
.endif

.include <bsd.lib.mk>
@


1.18.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:05:46 +0000
@
text
@d1 48
@


1.18.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 20
# $FreeBSD: releng/8.4/tools/build/Makefile 175539 2008-01-21 18:44:55Z obrien $

.PATH: ${.CURDIR}/../../include

LIB=		egacy
SRCS=
INCSGROUPS=	INCS
INCS=		

BOOTSTRAPPING?=	0

.if empty(SRCS)
SRCS=		dummy.c
.endif

.if defined(CROSS_BUILD_TESTING)
SUBDIR=		cross-build
.endif

.include <bsd.lib.mk>
@


1.17
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/tools/build/Makefile 240377 2012-09-11 22:38:33Z obrien $
d24 16
@


1.16
log
@SVN rev 240377 on 2012-09-11 22:38:33Z by obrien

r235638 is not the clean way to add support for building on ancient FreeBSD
versions.  Instead use Imp's good work on "legacy" and follow the outcome
of the previous TRB discussions on this topic.

Now use the libc getline() if it exists, and only where it doesn't
create a bootstraping version.
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.15
log
@SVN rev 227636 on 2011-11-17 21:06:53Z by dim

Revert r227538, since it doesn't compile with clang at all (it doesn't
allow the built-in operations to be redefined, at least not without
excessive force).

Instead, just disable LLVM's support for atomic operations for now.
Nothing in either clang or the tablegen tools currently depends on it.

This still allows users of head built before r198344 to upgrade to
top-of-head seamlessly.
@
text
@d6 1
a6 1
SRCS=
d8 1
a8 1
INCS=		
d12 12
@


1.14
log
@SVN rev 227538 on 2011-11-15 20:15:58Z by dim

LLVM uses atomic operations, which are not supported on i386 and GCC
emits calls for them, rather than expanding them inline.  Older FreeBSD
versions compile for i386 by default and as such we end up with
unresolved symbols when we build LLVM's TableGen utility as a build
tool on them.  Add the functions that GCC emits here, but don't bother
to make them atomic. Such is not needed.

Submitted by:	marcel
MFC after:	1 week
@
text
@a9 4
.if ${MACHINE_ARCH} == i386
SRCS+=		atomic.c
.endif

@


1.13
log
@Remove 5.x and 6.x cruft - source upgrades to RELENG_8 from versions prior
to RELENG_7 are not supported.
@
text
@d10 4
@


1.13.4.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.13.4.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/tools/build/Makefile 175539 2008-01-21 18:44:55Z obrien $
@


1.13.4.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248330
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/tools/build/Makefile 248330 2013-03-15 14:53:29Z brooks $
a11 16
_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/pwd.h || true
.if ${_WITH_PWCACHEDB} == 0
.PATH: ${.CURDIR}/../../contrib/libc-pwcache
CFLAGS+=	-I${.CURDIR}/../../contrib/libc-pwcache \
		-I${.CURDIR}/../../lib/libc/include
SRCS+=		pwcache.c
.endif

_WITH_STRSVIS!=	grep -c strsvis /usr/include/vis.h || true
.if ${_WITH_STRSVIS} == 0
.PATH: ${.CURDIR}/../../contrib/libc-vis
SRCS+=		vis.c
CFLAGS+=	-I${.CURDIR}/../../contrib/libc-vis \
		-I${.CURDIR}/../../lib/libc/include
.endif

@


1.13.4.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.13.4.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/tools/build/Makefile 175539 2008-01-21 18:44:55Z obrien $
@


1.13.4.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.13.4.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/tools/build/Makefile 175539 2008-01-21 18:44:55Z obrien $
@


1.13.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.13.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/tools/build/Makefile 175539 2008-01-21 18:44:55Z obrien $
@


1.13.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.13.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/tools/build/Makefile 175539 2008-01-21 18:44:55Z obrien $
@


1.13.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.13.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.13.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.12
log
@Make <runefile.h> internal to libc.

Suggested by:	phantom
@
text
@a11 5
# usr.bin/gencat needs <nl_types.h>.
.if ${BOOTSTRAPPING} < 600017
INCS+=		nl_types.h
.endif

@


1.12.10.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/tools/build/Makefile 146261 2005-05-16 09:32:41Z ru $
@


1.12.2.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/tools/build/Makefile 146261 2005-05-16 09:32:41Z ru $
@


1.12.24.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.12.24.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/tools/build/Makefile 146261 2005-05-16 09:32:41Z ru $
@


1.12.22.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.12.20.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.12.18.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.12.16.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.11
log
@Add hacks that I use to test cross-builds (by building on
native and foreign architectures and comparing products).
They eliminate most of the differences caused by different
object directory paths, timestamping, and identification.

(Note WORLDTMP was renamed to ${OBJTREE}${.CURDIR}/tmp.)
@
text
@a11 5
# usr.bin/mklocale needs <runefile.h>.
.if !exists(/usr/include/runefile.h)
INCS+=		runefile.h
.endif

@


1.10
log
@Bootstrap gencat(1).

OK'ed by:	phantom
@
text
@d26 4
@


1.9
log
@As threatened, drop support for source upgrades from pre-5.3.

Inspired by:	obrien
@
text
@d17 5
@


1.8
log
@Make the format of LC_CTYPE files architecture independent by
introducing the disk formats for _RuneLocale and friends.

The disk formats do not have (useless) pointers and have 32-bit
quantities instead of rune_t and long.  (htonl(3) only works
with 32-bit quantities, so there's no loss).

Bootstrap mklocale(1) when necessary.  (Bootstrapping from 4.x
would be trivial (verified), but we no longer provide pre-5.3
source upgrades and this is the first commit to actually break
it.)
@
text
@a11 17
# Some tools need <sys/endian.h>.
.if !exists(/usr/include/sys/endian.h) || ${BOOTSTRAPPING} < 500000
INCSGROUPS+=	SYSHDRS
SYSHDRS=	endian.h
SYSHDRSDIR=	${INCLUDEDIR}/sys
.endif

# gnu/usr.bin/binutils/ld needs <elf-hints.h>.
.if !exists(/usr/include/elf-hints.h)
INCS+=		elf-hints.h
.endif

# lib/libncurses needs <stdbool.h>.
.if !exists(/usr/include/stdbool.h)
INCS+=		stdbool.h
.endif

a16 37
# usr.bin/xargs needs <nl_langinfo.h>.
.if !exists(/usr/include/langinfo.h)
INCS+=		langinfo.h
.endif

# Some tools need basename(3).
.if !exists(/usr/include/libgen.h)
INCS+=		libgen.h
.PATH: ${.CURDIR}/../../lib/libc/gen
SRCS+=		basename.c
.endif

# Some tools need {get,set}progname(3).
.if ( ${BOOTSTRAPPING} < 440001 || \
    ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500023 ))
SRCS+=		progname.c
.endif

# install(1) needs strtofflags(3).
.if ( ${BOOTSTRAPPING} < 400021 || \
    ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500007 ))
.PATH: ${.CURDIR}/../../lib/libc/gen
SRCS+=		strtofflags.c
.endif

# Lot of tools need <getopt.h> and getopt_long(3).
.if !exists(/usr/include/getopt.h) || ${BOOTSTRAPPING} < 502104
INCS+=		getopt.h
.PATH: ${.CURDIR}/../../lib/libc/stdlib
SRCS+=		getopt_long.c
.endif

# Some tools depend on a new <regex.h> not requiring <sys/types.h>.
.if ${BOOTSTRAPPING} < 500042
INCS+=		regex.h
.endif

@


1.7
log
@Removed extraneous parentheses.
@
text
@d29 5
@


1.7.2.1
log
@Conditionally add mklocale and gencat to bootstrap-tools to allow to build
RELENG_5 on later FreeBSD versions.
@
text
@a65 5
# mklocale(1) requires rune.h
.if ${BOOTSTRAPPING} >= 600016
INCS+=		rune.h
.endif

@


1.6
log
@Add getopt_long.c if ${BOOTSTRAPPING} < 502104
@
text
@d55 1
a55 1
.if ( !exists(/usr/include/getopt.h) || ${BOOTSTRAPPING} < 502104 )
@


1.5
log
@Unbreak the upgrade path from 4.9 after removal of GNU getopt and
<gnuregex.h>.
@
text
@d55 1
a55 1
.if !exists(/usr/include/getopt.h)
@


1.4
log
@A version of <sys/endian.h> in RELENG_4 doesn't have 64-bit functions.

Spotted by:	simokawa
@
text
@d54 12
@


1.3
log
@libc_gen/basename.c depends on include/libgen.h.
@
text
@d13 1
a13 1
.if !exists(/usr/include/sys/endian.h)
@


1.2
log
@-legacy and /.../legacy/... looks better than build or bootstrap in
the logs, so use that instead.

Submitted by: obrien.
@
text
@d34 3
a36 3
# gnu/usr.bin/binutils/libiberty needs basename(3).
.if ( ${BOOTSTRAPPING} < 440000 || \
    ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500022 ))
@


1.1
log
@Migrate to a new way of dealing with building from old revisions of
FreeBSD.  This method attempts to centralize all the necessary hacks
or work arounds in one of two places in the tree (src/Makefile.inc1
and src/tools/build).  We build a small compatibility library
(libbuild.a) as well as selectively installing necessary include
files.  We then include this directory when building host binaries.

This removes all the past release compatibilty hacks from various
places in the tree.  We still build on tip of stable and current.  I
will work with those that want to support more, although I anticipate
it will just work.

Many thanks to ru@@, obrien@@ and jhb@@ for providing valuable input at
various stage of implementation, as well as for working together to
positively effect a change for the better.
@
text
@d5 1
a5 1
LIB=		build
@

