cvsdist 49d56e
# Makefile for source rpm: alsa-lib
Bill Nottingham ad9919
# $Id: Makefile,v 1.2 2007/10/15 16:56:09 scop Exp $
cvsdist 49d56e
NAME := alsa-lib
cvsdist 49d56e
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 49d56e
Ville Skyttä e9b1d9
define find-makefile-common
Bill Nottingham ad9919
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
Ville Skyttä e9b1d9
endef
Ville Skyttä e9b1d9
Ville Skyttä e9b1d9
MAKEFILE_COMMON := $(shell $(find-makefile-common))
Ville Skyttä e9b1d9
Ville Skyttä e9b1d9
ifeq ($(MAKEFILE_COMMON),)
Ville Skyttä e9b1d9
# attempt a checkout
Ville Skyttä e9b1d9
define checkout-makefile-common
Ville Skyttä e9b1d9
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
Ville Skyttä e9b1d9
endef
Ville Skyttä e9b1d9
Ville Skyttä e9b1d9
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
Ville Skyttä e9b1d9
endif
Ville Skyttä e9b1d9
Ville Skyttä e9b1d9
include $(MAKEFILE_COMMON)