377eafd
# Makefile for source rpm: python-urlgrabber
b10400e
# $Id: Makefile,v 1.2 2007/10/15 19:19:34 notting Exp $
377eafd
NAME := python-urlgrabber
377eafd
SPECFILE = $(firstword $(wildcard *.spec))
377eafd
ee3c87e
define find-makefile-common
b10400e
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
ee3c87e
endef
ee3c87e
ee3c87e
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ee3c87e
ee3c87e
ifeq ($(MAKEFILE_COMMON),)
ee3c87e
# attempt a checkout
ee3c87e
define checkout-makefile-common
ee3c87e
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
ee3c87e
endef
ee3c87e
ee3c87e
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
ee3c87e
endif
ee3c87e
ee3c87e
include $(MAKEFILE_COMMON)