b1023c9
# Makefile for source rpm: maven-doxia-sitetools
d583be3
# $Id: Makefile,v 1.1 2009/09/01 16:03:03 ausil Exp $
b1023c9
NAME := maven-doxia-sitetools
b1023c9
SPECFILE = $(firstword $(wildcard *.spec))
b1023c9
b1023c9
define find-makefile-common
d583be3
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
b1023c9
endef
b1023c9
b1023c9
MAKEFILE_COMMON := $(shell $(find-makefile-common))
b1023c9
b1023c9
ifeq ($(MAKEFILE_COMMON),)
b1023c9
# attept a checkout
b1023c9
define checkout-makefile-common
b1023c9
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
b1023c9
endef
b1023c9
b1023c9
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
b1023c9
endif
b1023c9
b1023c9
include $(MAKEFILE_COMMON)