PlanetLab 3.0 Release Candidate 6
[build.git] / Patchrules
1 #!/bin/sh
2 #
3 # Hack to generate patch rules for make < 3.80
4 #
5 # Copyright (c) 2003  The Trustees of Princeton University (Trustees).
6
7 # $Id: Patchrules,v 1.2 2004/04/09 19:37:19 alk-pl_rpm Exp $
8 #
9
10 while read PatchSet n ; do
11
12 [ "$PatchSet" != "PatchSet" ] && continue;
13
14 cat <<EOF
15
16 # In case the spec file did not explicitly list the PatchSet
17 ifeq (\$(origin Patch${n}),undefined)
18 Patch${n} := \$(package)-${n}.patch.bz2
19 endif
20
21 # Get rid of URL
22 Patch${n} := \$(notdir \$(Patch${n}))
23
24 # Add patch to the list of sources
25 SOURCES += SOURCES/\$(Patch${n})
26
27 # Generate uncompressed patch
28 SOURCES/\$(patsubst %.gz,%,\$(patsubst %.bz2,%,\$(Patch${n}))):
29         mkdir -p SOURCES
30         cvsps --cvs-direct --root \$(CVSROOT) -g -s ${n} \$(MODULE) > \$@
31 EOF
32
33 done