mharris be5a8f
# Makefile for source rpm: xorg-x11-server
mharris be5a8f
# $Id$
mharris be5a8f
NAME := xorg-x11-server
mharris be5a8f
SPECFILE = $(firstword $(wildcard *.spec))
mharris be5a8f
95119d
define find-makefile-common
d9bac8
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
95119d
endef
95119d
95119d
MAKEFILE_COMMON := $(shell $(find-makefile-common))
95119d
95119d
ifeq ($(MAKEFILE_COMMON),)
95119d
# attempt a checkout
95119d
define checkout-makefile-common
95119d
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
95119d
endef
95119d
95119d
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
95119d
endif
95119d
95119d
include $(MAKEFILE_COMMON)
98fcf9
494b01
ifeq ($(MAKECMDGOALS),me a sandwich)
494b01
.PHONY :: me a sandwich
98fcf9
me a:
98fcf9
	@:
98fcf9
98fcf9
sandwich:
98fcf9
	@[ `id -u` -ne 0 ] && echo "What? Make it yourself." || echo Okay.
494b01
endif