Remove references to subversion, replace it with git equivalents

This commit is contained in:
Jan Vidar Krey 2009-03-16 17:37:59 +01:00
parent 4762f007fe
commit 041643c519
2 changed files with 42 additions and 26 deletions

View File

@ -13,9 +13,8 @@ endif
VERSION ?= $(shell grep define\ VERSION version.h | cut -f 3 -d " " | tr -d [=\"=] ) VERSION ?= $(shell grep define\ VERSION version.h | cut -f 3 -d " " | tr -d [=\"=] )
SNAPSHOT ?= $(shell date '+%Y%m%d' ) SNAPSHOT ?= $(shell date '+%Y%m%d' )
REVISION ?= HEAD
REVISION ?= $(shell svn info | grep Revision | tr -d [:alpha:][:punct:][:space:] ) PACKAGE ?= uhub-$(VERSION)
PACKAGE ?= uhub-$(VERSION)-$(REVISION)
PACKAGE_SRC ?= $(PACKAGE)-src PACKAGE_SRC ?= $(PACKAGE)-src
PACKAGE_BIN ?= $(PACKAGE)-$(HOST_SYSTEM)-$(HOST_MACHINE) PACKAGE_BIN ?= $(PACKAGE)-$(HOST_SYSTEM)-$(HOST_MACHINE)

View File

@ -9,37 +9,54 @@ ifeq ($(RELEASE),YES)
%.tar.gz: %.tar %.tar.gz: %.tar
@gzip -c -9 $^ > $@ @gzip -c -9 $^ > $@
ChangeLog-$(VERSION)-$(REVISION): ChangeLog ChangeLog-$(VERSION): ChangeLog
@cp $^ $@ @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 @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 @rm -f $(PACKAGE)/release_*.mk
@grep -v \\-include $(PACKAGE)/GNUmakefile > $(PACKAGE)/GNUmakefile2 @grep -v \\-include $(PACKAGE)/GNUmakefile > $(PACKAGE)/GNUmakefile2
@mv $(PACKAGE)/GNUmakefile2 $(PACKAGE)/GNUmakefile @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) @tar cf $(PACKAGE_SRC).tar $(PACKAGE)
@zip -r $(PACKAGE_SRC).zip $(PACKAGE)
@rm -Rf $(PACKAGE)
$(PACKAGE_BIN).tar: clean $(uhub_BINARY) $(PACKAGE_SRC).zip: package
@if [ -d $(PACKAGE) ]; then rm -Rf $(PACKAGE); fi @zip -q -9 -r $(PACKAGE_SRC).zip $(PACKAGE)
@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_BIN).zip: clean $(uhub_BINARY) $(PACKAGE_BIN).tar: package-bin-build
@if [ -d $(PACKAGE) ]; then rm -Rf $(PACKAGE); fi @tar cf $(PACKAGE_BIN).tar $(PACKAGE)
@svn export . $(PACKAGE) > /dev/null
@rm -Rf $(PACKAGE)/src $(PACKAGE)/autotest $(PACKAGE)/*akefile $(PACKAGE)/$(LIBUHUB) $(PACKAGE)/release_*.mk $(PACKAGE)/version.h $(PACKAGE_BIN).zip: package-bin-build
@cp $(uhub_BINARY) $(PACKAGE) @zip -q -9 -r $(PACKAGE_BIN).zip
@zip -r $@ $(PACKAGE)
@rm -Rf $(PACKAGE)
$(PACKAGE_SRC).tar.gz: $(PACKAGE_SRC).tar $(PACKAGE_SRC).tar.gz: $(PACKAGE_SRC).tar
@ -57,7 +74,7 @@ publish-snapshot: snapshot
@scp -q uhub-snapshot-$(SNAPSHOT).tar.gz $(URL_SNAPSHOT) @scp -q uhub-snapshot-$(SNAPSHOT).tar.gz $(URL_SNAPSHOT)
publish: release 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 tarballs: $(PACKAGE_SRC).tar.gz $(PACKAGE_SRC).tar.bz2 $(PACKAGE_SRC).zip
@rm $(PACKAGE_SRC).tar @rm $(PACKAGE_SRC).tar
@ -72,7 +89,7 @@ binaries: $(PACKAGE_BIN).tar.gz $(PACKAGE_BIN).tar.bz2
endif endif
release: binaries tarballs changelog release: binaries tarballs changelog
$(cleanexport)
else else