[stgt] [PATCH] Top-level Makefile: do not use --transform when invoking tar

Florian Haas florian.haas at linbit.com
Tue Oct 6 12:44:14 CEST 2009

Change the logic for building tarballs, creating a subdirectory
named tgt-$(VERSION) and rolling the tarball from that. Older versions
of tar, notably the one on CentOS 5.3, do not support the --transform
option, so the previous version of the tarball target would fail on
those platforms.

Signed-off-by: Florian Haas <florian.haas at linbit.com>
 Makefile |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index dbdda22..c358501 100644
--- a/Makefile
+++ b/Makefile
@@ -64,11 +64,13 @@ clean-conf:
 install: install-programs install-doc install-conf install-scripts
 $(TARBALL): clean
+	mkdir tgt-$(VERSION)
+	cp -r README Makefile doc scripts conf usr tgt-$(VERSION)
 	tar -cjf $@ \
-		--transform 's,^,tgt-$(VERSION)/,' \
 		--exclude=*~ \
 		--exclude=.git \
-		--exclude=*.in *
+		--exclude=*.in \
+		tgt-$(VERSION)
 .PHONY: tarball
 tarball: $(TARBALL)
@@ -76,6 +78,7 @@ tarball: $(TARBALL)
 .PHONY: clean-tarball
 	rm -f $(TARBALL)
+	rm -rf tgt-$(VERSION)
 .PHONY: clean
 clean: clean-programs clean-doc clean-conf clean-scripts clean-tarball

To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

More information about the stgt mailing list