2
2
# from the subversion repository.
3
3
4
4
# use something like "VERSION=0.2 make" to override the VERSION on the command line
5
- VERSION ?= $(shell sed -n "s/^.* [\t ]* VERSION[\t ]* =[\t ]* [\"']\([^\"']* \) [\"'].*/\1/gp" src/pycam/__init__.py)
6
- SVN_REPO_BASE ?= $(shell svn info --xml 2>/dev/null | grep "^<url>" | cut -f 2 -d ">" | cut -f 1 -d "<")
7
- SVK_REPO_BASE ?= $(shell LANG= svk info 2>/dev/null| grep "^Depot Path:" | cut -f 3- -d " ")
5
+ VERSION ?= $(shell sed -n "s/^.* [\t ]* VERSION[\t ]* =[\t ]* [\"']\([^\"']* \) [\"'].*/\1/gp" pycam/__init__.py)
8
6
REPO_TAGS ?= https://pycam.svn.sourceforge.net/svnroot/pycam/tags
9
7
RELEASE_PREFIX ?= pycam-
10
8
ARCHIVE_DIR_RELATIVE ?= release-archives
@@ -21,7 +19,7 @@ DISTUTILS_PLAT_NAME = $(shell $(PYTHON_EXE) setup.py --help build_ext | grep -q
21
19
# turn the destination directory into an absolute path
22
20
ARCHIVE_DIR := $(shell pwd) /$(ARCHIVE_DIR_RELATIVE )
23
21
24
- .PHONY : zip tgz win32 clean dist svn_export upload create_archive_dir man
22
+ .PHONY : zip tgz win32 clean dist git_export upload create_archive_dir man
25
23
26
24
dist : zip tgz win32
27
25
@# remove the tmp directory when everything is done
@@ -30,27 +28,27 @@ dist: zip tgz win32
30
28
clean :
31
29
@rm -rf " $( EXPORT_DIR) "
32
30
33
- man : svn_export
31
+ man : git_export
34
32
@make -C " $( EXPORT_DIR) /man"
35
33
36
- svn_export : clean
37
- @if svn info 2> /dev/null >&2 ; \
38
- then svn export --quiet " $( SVN_REPO_BASE ) " " $( EXPORT_DIR) " ; \
39
- else svk co " $( SVK_REPO_BASE ) " " $( EXPORT_DIR ) " ; \
34
+ git_export : clean
35
+ @if git status 2> /dev/null >&2 ; \
36
+ then git clone . " $( EXPORT_DIR) " ; \
37
+ else echo " No git repo found. " ; exit 1 ; \
40
38
fi
41
39
# Windows needs a different name for the startup script - due to process creation (no fork/exec)
42
- @cp " $( EXPORT_DIR) /pycam" " $( EXPORT_DIR) /pycam-loader.py"
40
+ @cp " $( EXPORT_DIR) /scripts/ pycam" " $( EXPORT_DIR) /scripts /pycam-loader.py"
43
41
44
42
create_archive_dir :
45
43
@mkdir -p " $( ARCHIVE_DIR) "
46
44
47
- zip : create_archive_dir man svn_export
45
+ zip : create_archive_dir man git_export
48
46
cd " $( EXPORT_DIR) " ; $(PYTHON_EXE ) setup.py sdist --format zip --dist-dir " $( ARCHIVE_DIR) "
49
47
50
- tgz : create_archive_dir man svn_export
48
+ tgz : create_archive_dir man git_export
51
49
cd " $( EXPORT_DIR) " ; $(PYTHON_EXE ) setup.py sdist --format gztar --dist-dir " $( ARCHIVE_DIR) "
52
50
53
- win32 : create_archive_dir man svn_export
51
+ win32 : create_archive_dir man git_export
54
52
# this is a binary release
55
53
cd " $( EXPORT_DIR) " ; $(PYTHON_EXE ) setup.py bdist_wininst --user-access-control force --dist-dir " $( ARCHIVE_DIR) " $(DISTUTILS_PLAT_NAME )
56
54
0 commit comments