"make release" to turn a checkout into a tarball
diff --git a/Makefile b/Makefile
index 5071e60..e634aac 100644
--- a/Makefile
+++ b/Makefile
@@ -69,4 +69,9 @@
$(INSTALL_DATA) klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
$(INSTALL_EXEC) $(KCROSS)klcc $(INSTALLROOT)$(bindir)
+# This does all the prep work needed to turn a freshly exported git repository
+# into a release tarball tree
+release: klibc.spec
+ rm -f maketar.sh
+
-include MCONFIG
diff --git a/maketar.sh b/maketar.sh
index d8e26c3..4a9410f 100755
--- a/maketar.sh
+++ b/maketar.sh
@@ -9,8 +9,7 @@
rm -rf $tmp
cg-export $tmp
cd $tmp
-rm -f maketar.sh
-make klibc.spec
+make release
version=`cat version`
rm -rf $tmpdir/klibc-$version
mv $tmp $tmpdir/klibc-$version