e7a8ab
# Makefile for source rpm: rubygem-nokogiri
e7a8ab
# $Id$
e7a8ab
NAME := rubygem-nokogiri
e7a8ab
SPECFILE = $(firstword $(wildcard *.spec))
e7a8ab
e7a8ab
define find-makefile-common
e7a8ab
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
e7a8ab
endef
e7a8ab
e7a8ab
MAKEFILE_COMMON := $(shell $(find-makefile-common))
e7a8ab
e7a8ab
ifeq ($(MAKEFILE_COMMON),)
e7a8ab
# attept a checkout
e7a8ab
define checkout-makefile-common
e7a8ab
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
e7a8ab
endef
e7a8ab
e7a8ab
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
e7a8ab
endif
e7a8ab
e7a8ab
include $(MAKEFILE_COMMON)