169effd
# Makefile for source rpm: setroubleshoot
460b0ad
# $Id: Makefile,v 1.1 2006/07/18 19:48:52 jdennis Exp $
169effd
NAME := setroubleshoot
169effd
SPECFILE = $(firstword $(wildcard *.spec))
169effd
460b0ad
define find-makefile-common
460b0ad
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
460b0ad
endef
460b0ad
460b0ad
MAKEFILE_COMMON := $(shell $(find-makefile-common))
460b0ad
460b0ad
ifeq ($(MAKEFILE_COMMON),)
460b0ad
# attempt a checkout
460b0ad
define checkout-makefile-common
460b0ad
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
460b0ad
endef
460b0ad
460b0ad
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
460b0ad
endif
460b0ad
460b0ad
include $(MAKEFILE_COMMON)