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