common.mk revision 275988
1# $FreeBSD: stable/10/lib/atf/common.mk 275988 2014-12-21 08:30:18Z ngie $
2#
3# Common Makefile code for all components of ATF.
4#
5
6.if !defined(ATF)
7.error "ATF must be defined and point to the contrib/atf directory"
8.endif
9
10# Depend on the atf-version target to generate a file that contains the
11# version number of the currently imported ATF release and that only
12# changes on new imports.
13atf-version: atf-version-real
14	@cmp -s atf-version atf-version-real \
15	    || cp atf-version-real atf-version
16atf-version-real: .PHONY
17	@grep 'define VERSION' ${ATF}/config.h \
18	    | cut -d '"' -f 2 >atf-version-real
19CLEANFILES+= atf-version atf-version-real
20