Blame Makefile

Subhodip Biswas 16f53de
# Makefile for source rpm: straw
Subhodip Biswas 16f53de
# $Id$
Subhodip Biswas 16f53de
NAME := straw
Subhodip Biswas 16f53de
SPECFILE = $(firstword $(wildcard *.spec))
Subhodip Biswas 16f53de
Subhodip Biswas 16f53de
define find-makefile-common
Subhodip Biswas 16f53de
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
Subhodip Biswas 16f53de
endef
Subhodip Biswas 16f53de
Subhodip Biswas 16f53de
MAKEFILE_COMMON := $(shell $(find-makefile-common))
Subhodip Biswas 16f53de
Subhodip Biswas 16f53de
ifeq ($(MAKEFILE_COMMON),)
Subhodip Biswas 16f53de
# attept a checkout
Subhodip Biswas 16f53de
define checkout-makefile-common
Subhodip Biswas 16f53de
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
Subhodip Biswas 16f53de
endef
Subhodip Biswas 16f53de
Subhodip Biswas 16f53de
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
Subhodip Biswas 16f53de
endif
Subhodip Biswas 16f53de
Subhodip Biswas 16f53de
include $(MAKEFILE_COMMON)