be45fcc
# Makefile for source rpm: gflags
0e3ce64
# $Id: Makefile,v 1.1 2008/09/11 00:03:34 tibbs Exp $
be45fcc
NAME := gflags
be45fcc
SPECFILE = $(firstword $(wildcard *.spec))
be45fcc
be45fcc
define find-makefile-common
0e3ce64
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
be45fcc
endef
be45fcc
be45fcc
MAKEFILE_COMMON := $(shell $(find-makefile-common))
be45fcc
be45fcc
ifeq ($(MAKEFILE_COMMON),)
be45fcc
# attept a checkout
be45fcc
define checkout-makefile-common
be45fcc
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
be45fcc
endef
be45fcc
be45fcc
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
be45fcc
endif
be45fcc
be45fcc
include $(MAKEFILE_COMMON)