From 041643c5195305af468b461e3cd6c39797c5f66d Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Mon, 16 Mar 2009 17:37:59 +0100 Subject: [PATCH] Remove references to subversion, replace it with git equivalents --- release_setup.mk | 5 ++-- release_targets.mk | 63 +++++++++++++++++++++++++++++----------------- 2 files changed, 42 insertions(+), 26 deletions(-) diff --git a/release_setup.mk b/release_setup.mk index 3212cb3..a21a4f4 100644 --- a/release_setup.mk +++ b/release_setup.mk @@ -13,9 +13,8 @@ endif VERSION ?= $(shell grep define\ VERSION version.h | cut -f 3 -d " " | tr -d [=\"=] ) SNAPSHOT ?= $(shell date '+%Y%m%d' ) - -REVISION ?= $(shell svn info | grep Revision | tr -d [:alpha:][:punct:][:space:] ) -PACKAGE ?= uhub-$(VERSION)-$(REVISION) +REVISION ?= HEAD +PACKAGE ?= uhub-$(VERSION) PACKAGE_SRC ?= $(PACKAGE)-src PACKAGE_BIN ?= $(PACKAGE)-$(HOST_SYSTEM)-$(HOST_MACHINE) diff --git a/release_targets.mk b/release_targets.mk index d1535c2..96e7d5f 100644 --- a/release_targets.mk +++ b/release_targets.mk @@ -9,37 +9,54 @@ ifeq ($(RELEASE),YES) %.tar.gz: %.tar @gzip -c -9 $^ > $@ -ChangeLog-$(VERSION)-$(REVISION): ChangeLog +ChangeLog-$(VERSION): ChangeLog @cp $^ $@ -changelog: ChangeLog-$(VERSION)-$(REVISION) +changelog: ChangeLog-$(VERSION) -$(PACKAGE_SRC).tar $(PACKAGE_SRC).zip: autotest.c +define gitexport @if [ -d $(PACKAGE) ]; then rm -Rf $(PACKAGE); fi - @svn export . $(PACKAGE) > /dev/null + @git archive --format=tar --prefix=$(PACKAGE)/ $(REVISION) | tar x +endef + +define cleanexport + @if [ -d $(PACKAGE) ]; then rm -Rf $(PACKAGE); fi +endef + +package: + $(gitexport) @rm -f $(PACKAGE)/release_*.mk @grep -v \\-include $(PACKAGE)/GNUmakefile > $(PACKAGE)/GNUmakefile2 @mv $(PACKAGE)/GNUmakefile2 $(PACKAGE)/GNUmakefile - @mv $< $(PACKAGE) + @$(shell exotic --standalone $(autotest_SOURCES) > $(PACKAGE)/autotest.c ) + +package-bin: + $(gitexport) + @rm -Rf $(PACKAGE)/src + @rm -Rf $(PACKAGE)/autotest + @rm -f $(PACKAGE)/autotest.c + @rm -f $(PACKAGE)/*akefile + @rm -f $(PACKAGE)/release_*.mk + @rm -f $(PACKAGE)/version.h + @rm -f $(PACKAGE)/doc/architecture.txt + @rm -f $(PACKAGE)/doc/Doxyfile + @rm -f $(PACKAGE)/doc/uhub.dot + @rm -f $(PACKAGE)/doc/extensions.txt + +package-bin-build: package-bin clean $(uhub_BINARY) + @cp $(uhub_BINARY) $(PACKAGE) + +$(PACKAGE_SRC).tar: package @tar cf $(PACKAGE_SRC).tar $(PACKAGE) - @zip -r $(PACKAGE_SRC).zip $(PACKAGE) - @rm -Rf $(PACKAGE) -$(PACKAGE_BIN).tar: clean $(uhub_BINARY) - @if [ -d $(PACKAGE) ]; then rm -Rf $(PACKAGE); fi - @svn export . $(PACKAGE) > /dev/null - @rm -Rf $(PACKAGE)/src $(PACKAGE)/autotest $(PACKAGE)/*akefile $(PACKAGE)/$(LIBUHUB) $(PACKAGE)/release_*.mk $(PACKAGE)/version.h - @cp $(uhub_BINARY) $(PACKAGE) - @tar cf $@ $(PACKAGE) - @rm -Rf $(PACKAGE) +$(PACKAGE_SRC).zip: package + @zip -q -9 -r $(PACKAGE_SRC).zip $(PACKAGE) -$(PACKAGE_BIN).zip: clean $(uhub_BINARY) - @if [ -d $(PACKAGE) ]; then rm -Rf $(PACKAGE); fi - @svn export . $(PACKAGE) > /dev/null - @rm -Rf $(PACKAGE)/src $(PACKAGE)/autotest $(PACKAGE)/*akefile $(PACKAGE)/$(LIBUHUB) $(PACKAGE)/release_*.mk $(PACKAGE)/version.h - @cp $(uhub_BINARY) $(PACKAGE) - @zip -r $@ $(PACKAGE) - @rm -Rf $(PACKAGE) +$(PACKAGE_BIN).tar: package-bin-build + @tar cf $(PACKAGE_BIN).tar $(PACKAGE) + +$(PACKAGE_BIN).zip: package-bin-build + @zip -q -9 -r $(PACKAGE_BIN).zip $(PACKAGE_SRC).tar.gz: $(PACKAGE_SRC).tar @@ -57,7 +74,7 @@ publish-snapshot: snapshot @scp -q uhub-snapshot-$(SNAPSHOT).tar.gz $(URL_SNAPSHOT) publish: release - @scp -q $(PACKAGE_SRC).tar.gz $(PACKAGE_SRC).tar.bz2 $(PACKAGE_BIN).tar.gz $(PACKAGE_BIN).tar.bz2 ChangeLog-$(VERSION)-$(REVISION) $(URL_PUBLISH) + @scp -q $(PACKAGE_SRC).tar.gz $(PACKAGE_SRC).tar.bz2 $(PACKAGE_BIN).tar.gz $(PACKAGE_BIN).tar.bz2 ChangeLog-$(VERSION) $(URL_PUBLISH) tarballs: $(PACKAGE_SRC).tar.gz $(PACKAGE_SRC).tar.bz2 $(PACKAGE_SRC).zip @rm $(PACKAGE_SRC).tar @@ -72,7 +89,7 @@ binaries: $(PACKAGE_BIN).tar.gz $(PACKAGE_BIN).tar.bz2 endif release: binaries tarballs changelog - + $(cleanexport) else