cvsdist 5ebfad5
# Makefile for source rpm: xmlsec1
9f8d909
# $Id: Makefile,v 1.1 2004/09/09 14:52:03 cvsdist Exp $
cvsdist 5ebfad5
NAME := xmlsec1
cvsdist 5ebfad5
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 5ebfad5
9f8d909
define find-makefile-common
9f8d909
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
9f8d909
endef
9f8d909
9f8d909
MAKEFILE_COMMON := $(shell $(find-makefile-common))
9f8d909
9f8d909
ifeq ($(MAKEFILE_COMMON),)
9f8d909
# attempt a checkout
9f8d909
define checkout-makefile-common
9f8d909
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
9f8d909
endef
9f8d909
9f8d909
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
9f8d909
endif
9f8d909
9f8d909
include $(MAKEFILE_COMMON)