Daniel J Walsh ecb5ec
# Makefile for source rpm: selinux-policy
Daniel J Walsh ecb5ec
# $Id$
Daniel J Walsh ecb5ec
NAME := selinux-policy
Daniel J Walsh ecb5ec
SPECFILE = $(firstword $(wildcard *.spec))
Daniel J Walsh ecb5ec
Bill Nottingham 84032d
define find-makefile-common
Bill Nottingham 6300a8
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
Bill Nottingham 84032d
endef
Bill Nottingham 84032d
Bill Nottingham 84032d
MAKEFILE_COMMON := $(shell $(find-makefile-common))
Bill Nottingham 84032d
Bill Nottingham 84032d
ifeq ($(MAKEFILE_COMMON),)
Bill Nottingham 84032d
# attempt a checkout
Bill Nottingham 84032d
define checkout-makefile-common
Bill Nottingham 84032d
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
Bill Nottingham 84032d
endef
Bill Nottingham 84032d
Bill Nottingham 84032d
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
Bill Nottingham 84032d
endif
Bill Nottingham 84032d
Bill Nottingham 84032d
include $(MAKEFILE_COMMON)