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