bd64f9c
# Makefile for source rpm: dwdiff
b58fef7
# $Id: Makefile,v 1.1 2007/02/13 19:38:35 notting Exp $
bd64f9c
NAME := dwdiff
bd64f9c
SPECFILE = $(firstword $(wildcard *.spec))
bd64f9c
bd64f9c
define find-makefile-common
b58fef7
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
bd64f9c
endef
bd64f9c
bd64f9c
MAKEFILE_COMMON := $(shell $(find-makefile-common))
bd64f9c
bd64f9c
ifeq ($(MAKEFILE_COMMON),)
bd64f9c
# attept a checkout
bd64f9c
define checkout-makefile-common
bd64f9c
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
bd64f9c
endef
bd64f9c
bd64f9c
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
bd64f9c
endif
bd64f9c
bd64f9c
include $(MAKEFILE_COMMON)