9742d2f
# Makefile for source rpm: cppcheck
89f9f5f
# $Id: Makefile,v 1.1 2009/04/30 04:57:29 kevin Exp $
9742d2f
NAME := cppcheck
9742d2f
SPECFILE = $(firstword $(wildcard *.spec))
9742d2f
9742d2f
define find-makefile-common
89f9f5f
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
9742d2f
endef
9742d2f
9742d2f
MAKEFILE_COMMON := $(shell $(find-makefile-common))
9742d2f
9742d2f
ifeq ($(MAKEFILE_COMMON),)
9742d2f
# attept a checkout
9742d2f
define checkout-makefile-common
9742d2f
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
9742d2f
endef
9742d2f
9742d2f
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
9742d2f
endif
9742d2f
9742d2f
include $(MAKEFILE_COMMON)