cvsdist 42c54c
# Makefile for source rpm: lvm2
cvsdist 42c54c
# $Id$
cvsdist 42c54c
NAME := lvm2
cvsdist 42c54c
SPECFILE = $(firstword $(wildcard *.spec))
Alasdair Kergon ac39fd
UPSTREAM_CHECKS = asc
cvsdist 42c54c
Bill Nottingham ad9da8
define find-makefile-common
Bill Nottingham ad9da8
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
Bill Nottingham ad9da8
endef
Bill Nottingham ad9da8
Bill Nottingham ad9da8
MAKEFILE_COMMON := $(shell $(find-makefile-common))
Bill Nottingham ad9da8
Bill Nottingham ad9da8
ifeq ($(MAKEFILE_COMMON),)
Bill Nottingham ad9da8
# attempt a checkout
Bill Nottingham ad9da8
define checkout-makefile-common
Bill Nottingham ad9da8
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
Bill Nottingham ad9da8
endef
Bill Nottingham ad9da8
Bill Nottingham ad9da8
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
Bill Nottingham ad9da8
endif
Bill Nottingham ad9da8
Bill Nottingham ad9da8
include $(MAKEFILE_COMMON)