[mw-devel] [Git][arthur/mw][master] Crude attempt to fix the build to work with git, this probably needs

Justin Mitchell arthur at sucs.org
Tue Oct 6 10:45:01 BST 2015


Justin Mitchell pushed to branch master at Justin Mitchell / mw


Commits:
7c36294a by Justin Mitchell at 2015-10-06T10:42:17Z
Crude attempt to fix the build to work with git, this probably needs
improving with a tag and proper version numbers later.

- - - - -


3 changed files:

- Makefile
- Makefile.common
- src/Makefile


Changes:

=====================================
Makefile
=====================================
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ ifdef TMPDIR
 # A temp dir exists so svn export and palm off the invocation to the exported makefile
 export:
 	rm -rf $(TMPDIR)/$(MWVERSION)
-	svn export . $(TMPDIR)/$(MWVERSION)
+	git checkout-index -a -f --prefix=$(TMPDIR)/$(MWVERSION)/
 	# Store the svn rev so we don't need to use svnversion or sed any more
 	echo $(VERSION_TWEAK) > $(TMPDIR)/$(MWVERSION)/mw.rev
 


=====================================
Makefile.common
=====================================
--- a/Makefile.common
+++ b/Makefile.common
@@ -1,4 +1,4 @@
-SVNVER = $(shell ( svnversion -c . 2>/dev/null | sed 's/Unversioned directory/exported/' || echo 0:0 ) | cut -d : -f 2)
+SVNVER = $(shell git describe --always )
 
 VERSION_MAJOR = 2
 VERSION_MINOR = 17
@@ -9,7 +9,7 @@ ifeq ($(SVNVER),exported)
 VERSION_TWEAK = $(shell cat $(SRCROOT)/mw.rev)
 else
 ifeq ($(SVNVER),0)
-$(warning failed to run svnversion, is it installed? VERSION_TWEAK will be set to 0)
+$(warning failed to get git revision. VERSION_TWEAK will be set to 0)
 endif
 VERSION_TWEAK = $(SVNVER)
 endif


=====================================
src/Makefile
=====================================
--- a/src/Makefile
+++ b/src/Makefile
@@ -44,7 +44,7 @@ test:
 	mkdir -p "$(TESTDIR)"
 	cd "$(TESTDIR)" && mkdir -p mw run/mw log/mw lib/mw
 	for d in $(INSTALLFILES); do \
-		svn export --force ../$$d "$(TESTDIR)/mw/$$d"; \
+		cp -a ../$$d $(TESTDIR)/mw/ ; \
 	done
 	$(MAKE) libdir="$(TESTDIR)" localstatedir="$(TESTDIR)" all
 



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/7c36294a103163c6ec15a9f9e7123b8ac99a5ee6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20151006/24a496de/attachment.html>


More information about the mw-devel mailing list