cvsdist 440e584
# Makefile for source rpm: planner
0b7aa7a
# $Id: Makefile,v 1.2 2007/10/15 19:17:34 notting Exp $
cvsdist 440e584
NAME := planner
cvsdist 440e584
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 440e584
652c02a
define find-makefile-common
0b7aa7a
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
652c02a
endef
652c02a
652c02a
MAKEFILE_COMMON := $(shell $(find-makefile-common))
652c02a
652c02a
ifeq ($(MAKEFILE_COMMON),)
652c02a
# attempt a checkout
652c02a
define checkout-makefile-common
652c02a
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
652c02a
endef
652c02a
652c02a
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
652c02a
endif
652c02a
652c02a
include $(MAKEFILE_COMMON)