5 |
# Copyright (C) 2004-2005 Red Hat, Inc. |
# Copyright (C) 2004-2005 Red Hat, Inc. |
6 |
# Copyright (C) 2005 Fedora Foundation |
# Copyright (C) 2005 Fedora Foundation |
7 |
# |
# |
8 |
# $Id: cvs-import.sh,v 1.2 2007/12/25 05:10:12 slords Exp $ |
# $Id: cvs-import.sh,v 1.3 2007/12/25 05:12:58 slords Exp $ |
9 |
|
|
10 |
# Initial setup |
# Initial setup |
11 |
CVSTREE=${CVSTREE:=extras} |
CVSTREE=${CVSTREE:=extras} |
142 |
SPECFILE = \$(firstword \$(wildcard *.spec)) |
SPECFILE = \$(firstword \$(wildcard *.spec)) |
143 |
|
|
144 |
define find-makefile-common |
define find-makefile-common |
145 |
for d in ../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 |
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 |
146 |
endef |
endef |
147 |
|
|
148 |
MAKEFILE_COMMON := \$(shell \$(find-makefile-common)) |
MAKEFILE_COMMON := \$(shell \$(find-makefile-common)) |
150 |
ifeq (\$(MAKEFILE_COMMON),) |
ifeq (\$(MAKEFILE_COMMON),) |
151 |
# attept a checkout |
# attept a checkout |
152 |
define checkout-makefile-common |
define checkout-makefile-common |
153 |
test -f CVS/Root && { cd .. ; 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 |
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 |
154 |
endef |
endef |
155 |
|
|
156 |
MAKEFILE_COMMON := \$(shell \$(checkout-makefile-common)) |
MAKEFILE_COMMON := \$(shell \$(checkout-makefile-common)) |