dcavalca / rpms / fio

Forked from rpms/fio 2 years ago
Clone
bbb935a
# Makefile for source rpm: fio
bbb935a
# $Id$
bbb935a
NAME := fio
bbb935a
SPECFILE = $(firstword $(wildcard *.spec))
bbb935a
bbb935a
define find-makefile-common
bbb935a
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
bbb935a
endef
bbb935a
bbb935a
MAKEFILE_COMMON := $(shell $(find-makefile-common))
bbb935a
bbb935a
ifeq ($(MAKEFILE_COMMON),)
bbb935a
# attept a checkout
bbb935a
define checkout-makefile-common
bbb935a
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
bbb935a
endef
bbb935a
bbb935a
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
bbb935a
endif
bbb935a
bbb935a
include $(MAKEFILE_COMMON)