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