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