ea390bb
# Makefile for source rpm: diffpdf
24b1393
# $Id: Makefile,v 1.1 2008/12/14 04:47:46 kevin Exp $
ea390bb
NAME := diffpdf
ea390bb
SPECFILE = $(firstword $(wildcard *.spec))
ea390bb
ea390bb
define find-makefile-common
24b1393
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
ea390bb
endef
ea390bb
ea390bb
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ea390bb
ea390bb
ifeq ($(MAKEFILE_COMMON),)
ea390bb
# attept a checkout
ea390bb
define checkout-makefile-common
ea390bb
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
ea390bb
endef
ea390bb
ea390bb
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
ea390bb
endif
ea390bb
ea390bb
include $(MAKEFILE_COMMON)