Makefile.main cvs-tarball patch
Marty Connor <[email protected]> Thu, 9 Mar 2006 06:43:48 -0500
| Newsgroups | gmane.network.etherboot.devel |
|---|---|
| Message-ID | <[email protected]> |
When making Etherboot releases I often need to create a release
tarball from CVS. For a long time there has been code that did that
in Makefile.main:
tarball: ../index.html ../index-berlios.html
(echo -n $(VERSION) ''; date -u +'%Y-%m-%d') > ../VERSION
(cd ../..; tar cf /tmp/etherboot-$(VERSION).tar --exclude
CVS --exclude doc etherboot-$(VERSION))
bzip2 -9 < /tmp/etherboot-$(VERSION).tar > /tmp/etherboot-$
(VERSION).tar.bz2
gzip -9 < /tmp/etherboot-$(VERSION).tar > /tmp/etherboot-$
(VERSION).tar.gz
but it doesn't work if you're in a CVS directory because the names of
directories aren't what is expected.
The attached patch does this:
cvs-tarball: ../index.html ../index-berlios.html
(echo -n $(VERSION) ''; date -u +'%Y-%m-%d') > ../VERSION
rm -rf /tmp/etherboot-$(MM_VERSION)cvs
mkdir /tmp/etherboot-$(MM_VERSION)cvs
cp -rP .. /tmp/etherboot-$(MM_VERSION)cvs
( cd /tmp; tar cf /tmp/etherboot-$(MM_VERSION)cvs.tar --
exclude CVS --exclude doc etherboot-$(MM_VERSION)cvs )
bzip2 -9 < /tmp/etherboot-$(MM_VERSION)cvs.tar > /tmp/
etherboot-$(MM_VERSION)cvs.tar.bz2
gzip -9 < /tmp/etherboot-$(MM_VERSION)cvs.tar > /tmp/
etherboot-$(MM_VERSION)cvs.tar.gz
Which lets one dump a tarball from a CVS directory to /tmp of the
current Etherboot tree.
Not something that is generally useful, since most people don't do
releases, but handy if you want make a quick tarball from CVS to run
some patches against.
Suggestions and comments are welcome.
Marty
makefile-tarball-patch.txt
(text/plain, 1.1 KB)
--- Makefile.main.orig 2005-09-07 17:49:20.000000000 -0400
+++ Makefile.main 2006-03-07 14:18:25.000000000 -0500
@@ -399,6 +399,15 @@
bzip2 -9 < /tmp/etherboot-$(VERSION).tar > /tmp/etherboot-$(VERSION).tar.bz2
gzip -9 < /tmp/etherboot-$(VERSION).tar > /tmp/etherboot-$(VERSION).tar.gz
+cvs-tarball: ../index.html ../index-berlios.html
+ (echo -n $(VERSION) ''; date -u +'%Y-%m-%d') > ../VERSION
+ rm -rf /tmp/etherboot-$(MM_VERSION)cvs
+ mkdir /tmp/etherboot-$(MM_VERSION)cvs
+ cp -rP .. /tmp/etherboot-$(MM_VERSION)cvs
+ ( cd /tmp; tar cf /tmp/etherboot-$(MM_VERSION)cvs.tar --exclude CVS --exclude doc etherboot-$(MM_VERSION)cvs )
+ bzip2 -9 < /tmp/etherboot-$(MM_VERSION)cvs.tar > /tmp/etherboot-$(MM_VERSION)cvs.tar.bz2
+ gzip -9 < /tmp/etherboot-$(MM_VERSION)cvs.tar > /tmp/etherboot-$(MM_VERSION)cvs.tar.gz
+
# Auto-incrementing build serial number. Is auto-incremented for each
# make run that specifies a final image file (e.g. bin/undi.zpxe) as a
# target, or a target of the form "all*". Enable via -DBUILD_SERIAL