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