ff58378
# Makefile for source rpm: dvtm
26482fb
# $Id: Makefile,v 1.1 2009/06/04 22:25:01 tibbs Exp $
ff58378
NAME := dvtm
ff58378
SPECFILE = $(firstword $(wildcard *.spec))
ff58378
ff58378
define find-makefile-common
26482fb
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
ff58378
endef
ff58378
ff58378
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ff58378
ff58378
ifeq ($(MAKEFILE_COMMON),)
ff58378
# attept a checkout
ff58378
define checkout-makefile-common
ff58378
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
ff58378
endef
ff58378
ff58378
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
ff58378
endif
ff58378
ff58378
include $(MAKEFILE_COMMON)