head	1.7;
access;
symbols
	netbsd-11-0-RC5:1.7
	netbsd-11-0-RC4:1.7
	netbsd-11-0-RC3:1.7
	netbsd-11-0-RC2:1.7
	netbsd-11-0-RC1:1.7
	perseant-exfatfs-base-20250801:1.7
	netbsd-11:1.7.0.10
	netbsd-11-base:1.7
	netbsd-10-1-RELEASE:1.7
	perseant-exfatfs-base-20240630:1.7
	perseant-exfatfs:1.7.0.8
	perseant-exfatfs-base:1.7
	netbsd-8-3-RELEASE:1.5
	netbsd-9-4-RELEASE:1.6
	netbsd-10-0-RELEASE:1.7
	netbsd-10-0-RC6:1.7
	netbsd-10-0-RC5:1.7
	netbsd-10-0-RC4:1.7
	netbsd-10-0-RC3:1.7
	netbsd-10-0-RC2:1.7
	netbsd-10-0-RC1:1.7
	netbsd-10:1.7.0.6
	netbsd-10-base:1.7
	netbsd-9-3-RELEASE:1.6
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.4
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.6
	cjep_staticlib_x:1.7.0.2
	cjep_staticlib_x-base:1.7
	netbsd-9-1-RELEASE:1.6
	phil-wifi-20200421:1.7
	phil-wifi-20200411:1.7
	is-mlppp:1.6.0.8
	is-mlppp-base:1.6
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.5
	netbsd-9-0-RELEASE:1.6
	netbsd-9-0-RC2:1.6
	netbsd-9-0-RC1:1.6
	phil-wifi-20191119:1.6
	netbsd-9:1.6.0.6
	netbsd-9-base:1.6
	phil-wifi-20190609:1.6
	netbsd-8-1-RELEASE:1.5
	netbsd-8-1-RC1:1.5
	pgoyette-compat-merge-20190127:1.6
	pgoyette-compat-20190127:1.6
	pgoyette-compat-20190118:1.6
	pgoyette-compat-1226:1.6
	pgoyette-compat-1126:1.6
	pgoyette-compat-1020:1.6
	pgoyette-compat-0930:1.6
	pgoyette-compat-0906:1.6
	netbsd-7-2-RELEASE:1.5
	pgoyette-compat-0728:1.6
	netbsd-8-0-RELEASE:1.5
	phil-wifi:1.6.0.4
	phil-wifi-base:1.6
	pgoyette-compat-0625:1.6
	netbsd-8-0-RC2:1.5
	pgoyette-compat-0521:1.6
	pgoyette-compat-0502:1.6
	pgoyette-compat-0422:1.6
	netbsd-8-0-RC1:1.5
	pgoyette-compat-0415:1.6
	pgoyette-compat-0407:1.6
	pgoyette-compat-0330:1.6
	pgoyette-compat-0322:1.6
	pgoyette-compat-0315:1.6
	netbsd-7-1-2-RELEASE:1.5
	pgoyette-compat:1.6.0.2
	pgoyette-compat-base:1.6
	netbsd-7-1-1-RELEASE:1.5
	matt-nb8-mediatek:1.5.0.24
	matt-nb8-mediatek-base:1.5
	perseant-stdc-iso10646:1.5.0.22
	perseant-stdc-iso10646-base:1.5
	netbsd-8:1.5.0.20
	netbsd-8-base:1.5
	prg-localcount2-base3:1.5
	prg-localcount2-base2:1.5
	prg-localcount2-base1:1.5
	prg-localcount2:1.5.0.18
	prg-localcount2-base:1.5
	pgoyette-localcount-20170426:1.5
	bouyer-socketcan-base1:1.5
	pgoyette-localcount-20170320:1.5
	netbsd-7-1:1.5.0.16
	netbsd-7-1-RELEASE:1.5
	netbsd-7-1-RC2:1.5
	netbsd-7-nhusb-base-20170116:1.5
	bouyer-socketcan:1.5.0.14
	bouyer-socketcan-base:1.5
	pgoyette-localcount-20170107:1.5
	netbsd-7-1-RC1:1.5
	pgoyette-localcount-20161104:1.5
	netbsd-7-0-2-RELEASE:1.5
	localcount-20160914:1.5
	netbsd-7-nhusb:1.5.0.12
	netbsd-7-nhusb-base:1.5
	pgoyette-localcount-20160806:1.5
	pgoyette-localcount-20160726:1.5
	pgoyette-localcount:1.5.0.10
	pgoyette-localcount-base:1.5
	netbsd-7-0-1-RELEASE:1.5
	netbsd-7-0:1.5.0.8
	netbsd-7-0-RELEASE:1.5
	netbsd-7-0-RC3:1.5
	netbsd-7-0-RC2:1.5
	netbsd-7-0-RC1:1.5
	netbsd-7:1.5.0.6
	netbsd-7-base:1.5
	yamt-pagecache:1.5.0.4
	yamt-pagecache-base9:1.5
	tls-earlyentropy:1.5.0.2
	tls-earlyentropy-base:1.5
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.5
	riastradh-drm2-base3:1.5
	riastradh-drm2-base2:1.1
	riastradh-drm2-base1:1.1
	riastradh-drm2:1.1.0.8
	riastradh-drm2-base:1.1
	tls-maxphys-base:1.5
	tls-maxphys:1.1.0.6
	khorben-n900:1.1.0.4
	agc-symver:1.1.0.2
	agc-symver-base:1.1;
locks; strict;
comment	@# @;


1.7
date	2020.03.09.20.34.52;	author christos;	state Exp;
branches;
next	1.6;
commitid	6xOOiLQLZd7FDLZB;

1.6
date	2018.02.04.01.41.05;	author mrg;	state Exp;
branches
	1.6.4.1;
next	1.5;
commitid	IVp3CBtlqnB8VtpA;

1.5
date	2014.02.15.04.19.46;	author jmmv;	state Exp;
branches
	1.5.4.1;
next	1.4;
commitid	794v6eYjTXHRo9px;

1.4
date	2014.02.15.02.02.39;	author jmmv;	state Exp;
branches;
next	1.3;
commitid	pcUWuQfcpx3aE8px;

1.3
date	2014.02.12.04.08.31;	author jmmv;	state Exp;
branches;
next	1.2;
commitid	IJjnEfqSqgwiqLox;

1.2
date	2014.02.08.19.15.33;	author jmmv;	state Exp;
branches;
next	1.1;
commitid	ztjVNnlJqfnpAkox;

1.1
date	2013.03.14.07.10.05;	author jmmv;	state Exp;
branches
	1.1.6.1;
next	;

1.6.4.1
date	2020.04.08.14.04.01;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.5.4.1
date	2014.02.15.04.19.46;	author yamt;	state dead;
branches;
next	1.5.4.2;
commitid	TzMwNuE6CLSD5yBx;

1.5.4.2
date	2014.05.22.15.40.11;	author yamt;	state Exp;
branches;
next	;
commitid	TzMwNuE6CLSD5yBx;

1.1.6.1
date	2013.03.14.07.10.05;	author tls;	state dead;
branches;
next	1.1.6.2;
commitid	OnlO1cBgtQRcIHUw;

1.1.6.2
date	2013.06.23.06.26.22;	author tls;	state Exp;
branches;
next	1.1.6.3;
commitid	OnlO1cBgtQRcIHUw;

1.1.6.3
date	2014.08.19.23.45.52;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.7
log
@remove -std=gnu++98
@
text
@# $NetBSD: Makefile.inc,v 1.6 2018/02/04 01:41:05 mrg Exp $

.include <bsd.own.mk>

TOPDIR=		${NETBSDSRCDIR}/external/bsd/atf
SRCDIR=		${TOPDIR}/dist

# Depend on the atf-version.txt target to generate a file that contains
# the version number of the currently imported ATF release and that only
# changes on new imports.
atf-version.txt: atf-version-real.txt
	@@cmp -s atf-version.txt atf-version-real.txt \
	    || cp atf-version-real.txt atf-version.txt
atf-version-real.txt: .PHONY
	@@grep 'define VERSION' ${TOPDIR}/bconfig.h \
	    | cut -d '"' -f 2 >atf-version-real.txt
CLEANFILES+= atf-version.txt atf-version-real.txt

CPPFLAGS+=	-DHAVE_CONFIG_H

# Not all source files need these settings, but it's just easier to
# set them in all cases.
CPPFLAGS+=	-DATF_ARCH=\"${MACHINE_ARCH}\"
CPPFLAGS+=	-DATF_BUILD_CC=\"/usr/bin/cc\"
CPPFLAGS+=	-DATF_BUILD_CFLAGS=\"\"
CPPFLAGS+=	-DATF_BUILD_CPP=\"/usr/bin/cpp\"
CPPFLAGS+=	-DATF_BUILD_CPPFLAGS=\"\"
CPPFLAGS+=	-DATF_BUILD_CXX=\"/usr/bin/c++\"
CPPFLAGS+=	-DATF_BUILD_CXXFLAGS=\"\"
CPPFLAGS+=	-DATF_CONFDIR=\"/etc/atf\"
CPPFLAGS+=	-DATF_INCLUDEDIR=\"/usr/include\"
CPPFLAGS+=	-DATF_LIBDIR=\"/usr/lib\"
CPPFLAGS+=	-DATF_LIBEXECDIR=\"/usr/libexec\"
CPPFLAGS+=	-DATF_MACHINE=\"${MACHINE}\"
CPPFLAGS+=	-DATF_M4=\"/usr/bin/m4\"
CPPFLAGS+=	-DATF_PKGDATADIR=\"/usr/share/atf\"
CPPFLAGS+=	-DATF_SHELL=\"/bin/sh\"
CPPFLAGS+=	-DATF_WORKDIR=\"/tmp\"

CPPFLAGS+=	-I${TOPDIR}			# For bconfig.h.
CPPFLAGS+=	-I${TOPDIR}/lib/libatf-c	# For atf-c/defs.hpp.
CPPFLAGS+=	-I${SRCDIR}

.if defined(USE_ATF_LIBTOOLS)
LIBTOOLSOBJDIR!=	cd ${TOPDIR}/lib/tools; ${PRINTOBJDIR}
CPPFLAGS+=		-I${LIBTOOLSOBJDIR}
LDADD+=			${LIBTOOLSOBJDIR}/libtools.a
DPADD+=			${LIBTOOLSOBJDIR}/libtools.a
.endif
@


1.6
log
@ATF needs C++98 for now, and GCC 6.4 defaults to C++11.

fix a problem -Werror=misleading-indentation found but has zero
effect on the running code.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.5 2014/02/15 04:19:46 jmmv Exp $
a43 2
CXXFLAGS+=	-std=gnu++98

@


1.6.4.1
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
# $NetBSD$
d44 2
@


1.5
log
@Fix the bundling of the version number in built files.

Yes, attempting yet another fix at this so that the version number that
gets recorded in the pkgconfig files and inside atf-version really matches
the latest imported version.  Should resolve issues where the built files
get stuck with an older version number during update builds.

This time, I'm trying the same approach I applied in the FreeBSD source
tree, which has been working fine so far across various release imports.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.4 2014/02/15 02:02:39 jmmv Exp $
d44 2
@


1.5.4.1
log
@file Makefile.inc was added on branch yamt-pagecache on 2014-05-22 15:40:11 +0000
@
text
@d1 49
@


1.5.4.2
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
@a0 49
# $NetBSD$

.include <bsd.own.mk>

TOPDIR=		${NETBSDSRCDIR}/external/bsd/atf
SRCDIR=		${TOPDIR}/dist

# Depend on the atf-version.txt target to generate a file that contains
# the version number of the currently imported ATF release and that only
# changes on new imports.
atf-version.txt: atf-version-real.txt
	@@cmp -s atf-version.txt atf-version-real.txt \
	    || cp atf-version-real.txt atf-version.txt
atf-version-real.txt: .PHONY
	@@grep 'define VERSION' ${TOPDIR}/bconfig.h \
	    | cut -d '"' -f 2 >atf-version-real.txt
CLEANFILES+= atf-version.txt atf-version-real.txt

CPPFLAGS+=	-DHAVE_CONFIG_H

# Not all source files need these settings, but it's just easier to
# set them in all cases.
CPPFLAGS+=	-DATF_ARCH=\"${MACHINE_ARCH}\"
CPPFLAGS+=	-DATF_BUILD_CC=\"/usr/bin/cc\"
CPPFLAGS+=	-DATF_BUILD_CFLAGS=\"\"
CPPFLAGS+=	-DATF_BUILD_CPP=\"/usr/bin/cpp\"
CPPFLAGS+=	-DATF_BUILD_CPPFLAGS=\"\"
CPPFLAGS+=	-DATF_BUILD_CXX=\"/usr/bin/c++\"
CPPFLAGS+=	-DATF_BUILD_CXXFLAGS=\"\"
CPPFLAGS+=	-DATF_CONFDIR=\"/etc/atf\"
CPPFLAGS+=	-DATF_INCLUDEDIR=\"/usr/include\"
CPPFLAGS+=	-DATF_LIBDIR=\"/usr/lib\"
CPPFLAGS+=	-DATF_LIBEXECDIR=\"/usr/libexec\"
CPPFLAGS+=	-DATF_MACHINE=\"${MACHINE}\"
CPPFLAGS+=	-DATF_M4=\"/usr/bin/m4\"
CPPFLAGS+=	-DATF_PKGDATADIR=\"/usr/share/atf\"
CPPFLAGS+=	-DATF_SHELL=\"/bin/sh\"
CPPFLAGS+=	-DATF_WORKDIR=\"/tmp\"

CPPFLAGS+=	-I${TOPDIR}			# For bconfig.h.
CPPFLAGS+=	-I${TOPDIR}/lib/libatf-c	# For atf-c/defs.hpp.
CPPFLAGS+=	-I${SRCDIR}

.if defined(USE_ATF_LIBTOOLS)
LIBTOOLSOBJDIR!=	cd ${TOPDIR}/lib/tools; ${PRINTOBJDIR}
CPPFLAGS+=		-I${LIBTOOLSOBJDIR}
LDADD+=			${LIBTOOLSOBJDIR}/libtools.a
DPADD+=			${LIBTOOLSOBJDIR}/libtools.a
.endif
@


1.4
log
@Fix path to libtools.a.

The build would break when we do not use MAKEOBJDIR* but do use OBJMACHINE.
Problem found by B Harder and fix based on patch from NONAKA Kimihiro as
posted on current-users.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.3 2014/02/12 04:08:31 jmmv Exp $
d8 10
a17 7
ATF_VERSION!=	grep 'define VERSION' ${TOPDIR}/bconfig.h | cut -d '"' -f 2
cookie-version: cookie-version-2
	@@cmp -s cookie-version cookie-version-2 \
	    || cp cookie-version-2 cookie-version
cookie-version-2: .PHONY
	@@echo "${ATF_VERSION}" >cookie-version-2
CLEANFILES+=	cookie-version cookie-version-2
@


1.3
log
@Homogenize reachover build file structure with that of kyua-cli:

- Move the majority of the common build definitions to the top-level
  Makefile.inc and ensure this gets included everywhere.
- Move the bconfig.h file to the top-level directory.
- Add a statically-generated defs.h file instead of creating one
  during the build.  Easier to understand and less chances for things
  to go wrong.
- Make sure all files using ATF_VERSION have the right dependency to
  trigger a rebuild when the value changes.
- Clean up stale -I flags.

This is all mostly for simplicity reasons and to reduce the cognitive
load required to understand the build of the atf and kyua-* packages.

I have tested this with both MKKYUA=no/yes and non-clean/clean builds
so hopefully I got the details right.  But if not, let me know please.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.2 2014/02/08 19:15:33 jmmv Exp $
d42 4
a45 4
PRIVATELIBDIR!= cd ${TOPDIR}/lib; ${PRINTOBJDIR}
CPPFLAGS+=	-I${PRIVATELIBDIR}/tools
LDADD+=		${PRIVATELIBDIR}/tools/libtools.a
DPADD+=		${PRIVATELIBDIR}/tools/libtools.a
@


1.2
log
@Adjust reachover Makefiles for atf-0.19.

The main change here is that the atf-config, atf-report, atf-run and
atf-version tools no longer depend on libatf-c nor libatf-c++.  Instead,
they depend on an internal libtools.a that contains code specifically
for these tools and nothing else, making them self-contained.
@
text
@d1 3
a3 1
# $NetBSD: Makefile.inc,v 1.1 2013/03/14 07:10:05 jmmv Exp $
d8 32
a39 2
ATF_VERSION!=	grep 'define VERSION' ${TOPDIR}/lib/libatf-c/bconfig.h \
		| cut -d '"' -f 2
@


1.1
log
@Deduce the version number to encode in pkgconfig files by getting it from
bconfig.h.  Also make the build of these files depends on bconfig.h itself.

This should fix once and for all the problems of the
atf/atf-{c,c++}/pkg_config_test:version tests breaking because the
pkgconfig files hold an old version number during update builds.
@
text
@d1 1
a1 1
# $NetBSD$
d8 7
@


1.1.6.1
log
@file Makefile.inc was added on branch tls-maxphys on 2013-06-23 06:26:22 +0000
@
text
@d1 7
@


1.1.6.2
log
@resync from head
@
text
@a0 7
# $NetBSD$

TOPDIR=		${NETBSDSRCDIR}/external/bsd/atf
SRCDIR=		${TOPDIR}/dist

ATF_VERSION!=	grep 'define VERSION' ${TOPDIR}/lib/libatf-c/bconfig.h \
		| cut -d '"' -f 2
@


1.1.6.3
log
@Rebase to HEAD as of a few days ago.
@
text
@a2 2
.include <bsd.own.mk>

d6 2
a7 42
# Depend on the atf-version.txt target to generate a file that contains
# the version number of the currently imported ATF release and that only
# changes on new imports.
atf-version.txt: atf-version-real.txt
	@@cmp -s atf-version.txt atf-version-real.txt \
	    || cp atf-version-real.txt atf-version.txt
atf-version-real.txt: .PHONY
	@@grep 'define VERSION' ${TOPDIR}/bconfig.h \
	    | cut -d '"' -f 2 >atf-version-real.txt
CLEANFILES+= atf-version.txt atf-version-real.txt

CPPFLAGS+=	-DHAVE_CONFIG_H

# Not all source files need these settings, but it's just easier to
# set them in all cases.
CPPFLAGS+=	-DATF_ARCH=\"${MACHINE_ARCH}\"
CPPFLAGS+=	-DATF_BUILD_CC=\"/usr/bin/cc\"
CPPFLAGS+=	-DATF_BUILD_CFLAGS=\"\"
CPPFLAGS+=	-DATF_BUILD_CPP=\"/usr/bin/cpp\"
CPPFLAGS+=	-DATF_BUILD_CPPFLAGS=\"\"
CPPFLAGS+=	-DATF_BUILD_CXX=\"/usr/bin/c++\"
CPPFLAGS+=	-DATF_BUILD_CXXFLAGS=\"\"
CPPFLAGS+=	-DATF_CONFDIR=\"/etc/atf\"
CPPFLAGS+=	-DATF_INCLUDEDIR=\"/usr/include\"
CPPFLAGS+=	-DATF_LIBDIR=\"/usr/lib\"
CPPFLAGS+=	-DATF_LIBEXECDIR=\"/usr/libexec\"
CPPFLAGS+=	-DATF_MACHINE=\"${MACHINE}\"
CPPFLAGS+=	-DATF_M4=\"/usr/bin/m4\"
CPPFLAGS+=	-DATF_PKGDATADIR=\"/usr/share/atf\"
CPPFLAGS+=	-DATF_SHELL=\"/bin/sh\"
CPPFLAGS+=	-DATF_WORKDIR=\"/tmp\"

CPPFLAGS+=	-I${TOPDIR}			# For bconfig.h.
CPPFLAGS+=	-I${TOPDIR}/lib/libatf-c	# For atf-c/defs.hpp.
CPPFLAGS+=	-I${SRCDIR}

.if defined(USE_ATF_LIBTOOLS)
LIBTOOLSOBJDIR!=	cd ${TOPDIR}/lib/tools; ${PRINTOBJDIR}
CPPFLAGS+=		-I${LIBTOOLSOBJDIR}
LDADD+=			${LIBTOOLSOBJDIR}/libtools.a
DPADD+=			${LIBTOOLSOBJDIR}/libtools.a
.endif
@


