cvsdist de9403c
# Makefile for source rpm: initscripts
cvsdist de9403c
# $Id$
cvsdist de9403c
NAME := initscripts
cvsdist de9403c
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist de9403c
56704df
define find-makefile-common
ed99715
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
56704df
endef
56704df
56704df
MAKEFILE_COMMON := $(shell $(find-makefile-common))
56704df
56704df
ifeq ($(MAKEFILE_COMMON),)
56704df
# attempt a checkout
56704df
define checkout-makefile-common
56704df
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
56704df
endef
56704df
56704df
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
56704df
endif
56704df
56704df
include $(MAKEFILE_COMMON)