cvsdist 241f931
# Makefile for source rpm: apr
feffc76
# $Id: Makefile,v 1.2 2004/11/21 13:09:51 jorton Exp $
cvsdist 241f931
NAME := apr
cvsdist 241f931
SPECFILE = $(firstword $(wildcard *.spec))
124b9dc
UPSTREAM_CHECKS = asc
cvsdist 241f931
feffc76
define find-makefile-common
feffc76
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
feffc76
endef
feffc76
feffc76
MAKEFILE_COMMON := $(shell $(find-makefile-common))
feffc76
feffc76
ifeq ($(MAKEFILE_COMMON),)
feffc76
# attempt a checkout
feffc76
define checkout-makefile-common
feffc76
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
feffc76
endef
feffc76
feffc76
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
feffc76
endif
feffc76
feffc76
include $(MAKEFILE_COMMON)