Jeremy Katz a4d6f8
# Makefile for source rpm: evince
Bill Nottingham f0a19c
# $Id: Makefile,v 1.1 2005/01/27 19:12:25 katzj Exp $
Jeremy Katz a4d6f8
NAME := evince
Jeremy Katz a4d6f8
SPECFILE = $(firstword $(wildcard *.spec))
Jeremy Katz a4d6f8
Bill Nottingham f0a19c
define find-makefile-common
Bill Nottingham f0a19c
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 f0a19c
endef
Bill Nottingham f0a19c
Bill Nottingham f0a19c
MAKEFILE_COMMON := $(shell $(find-makefile-common))
Bill Nottingham f0a19c
Bill Nottingham f0a19c
ifeq ($(MAKEFILE_COMMON),)
Bill Nottingham f0a19c
# attempt a checkout
Bill Nottingham f0a19c
define checkout-makefile-common
Bill Nottingham f0a19c
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 f0a19c
endef
Bill Nottingham f0a19c
Bill Nottingham f0a19c
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
Bill Nottingham f0a19c
endif
Bill Nottingham f0a19c
Bill Nottingham f0a19c
include $(MAKEFILE_COMMON)