Blame Makefile

Gérard Milmeister 5303bc
# Makefile for source rpm: erlang
Gérard Milmeister 5303bc
# $Id$
Gérard Milmeister 5303bc
NAME := erlang
Gérard Milmeister 5303bc
SPECFILE = $(firstword $(wildcard *.spec))
Gérard Milmeister 5303bc
Gérard Milmeister 5303bc
define find-makefile-common
Bill Nottingham 17c414
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
Gérard Milmeister 5303bc
endef
Gérard Milmeister 5303bc
Gérard Milmeister 5303bc
MAKEFILE_COMMON := $(shell $(find-makefile-common))
Gérard Milmeister 5303bc
Gérard Milmeister 5303bc
ifeq ($(MAKEFILE_COMMON),)
Gérard Milmeister 5303bc
# attept a checkout
Gérard Milmeister 5303bc
define checkout-makefile-common
Gérard Milmeister 5303bc
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
Gérard Milmeister 5303bc
endef
Gérard Milmeister 5303bc
Gérard Milmeister 5303bc
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
Gérard Milmeister 5303bc
endif
Gérard Milmeister 5303bc
Gérard Milmeister 5303bc
include $(MAKEFILE_COMMON)