Commit 765b22b5 authored by Paul Bonser's avatar Paul Bonser

Fix up Makefiles to work with git and reorganization changes

parent 7c3658bb
......@@ -2,9 +2,7 @@
# from the subversion repository.
# use something like "VERSION=0.2 make" to override the VERSION on the command line
VERSION ?= $(shell sed -n "s/^.*[\t ]*VERSION[\t ]*=[\t ]*[\"']\([^\"']*\)[\"'].*/\1/gp" src/pycam/__init__.py)
SVN_REPO_BASE ?= $(shell svn info --xml 2>/dev/null | grep "^<url>" | cut -f 2 -d ">" | cut -f 1 -d "<")
SVK_REPO_BASE ?= $(shell LANG= svk info 2>/dev/null| grep "^Depot Path:" | cut -f 3- -d " ")
VERSION ?= $(shell sed -n "s/^.*[\t ]*VERSION[\t ]*=[\t ]*[\"']\([^\"']*\)[\"'].*/\1/gp" pycam/__init__.py)
REPO_TAGS ?= https://pycam.svn.sourceforge.net/svnroot/pycam/tags
RELEASE_PREFIX ?= pycam-
ARCHIVE_DIR_RELATIVE ?= release-archives
......@@ -21,7 +19,7 @@ DISTUTILS_PLAT_NAME = $(shell $(PYTHON_EXE) setup.py --help build_ext | grep -q
# turn the destination directory into an absolute path
ARCHIVE_DIR := $(shell pwd)/$(ARCHIVE_DIR_RELATIVE)
.PHONY: zip tgz win32 clean dist svn_export upload create_archive_dir man
.PHONY: zip tgz win32 clean dist git_export upload create_archive_dir man
dist: zip tgz win32
@# remove the tmp directory when everything is done
......@@ -30,27 +28,27 @@ dist: zip tgz win32
clean:
@rm -rf "$(EXPORT_DIR)"
man: svn_export
man: git_export
@make -C "$(EXPORT_DIR)/man"
svn_export: clean
@if svn info 2>/dev/null >&2;\
then svn export --quiet "$(SVN_REPO_BASE)" "$(EXPORT_DIR)";\
else svk co "$(SVK_REPO_BASE)" "$(EXPORT_DIR)";\
git_export: clean
@if git status 2>/dev/null >&2;\
then git clone . "$(EXPORT_DIR)";\
else echo "No git repo found."; exit 1;\
fi
# Windows needs a different name for the startup script - due to process creation (no fork/exec)
@cp "$(EXPORT_DIR)/pycam" "$(EXPORT_DIR)/pycam-loader.py"
@cp "$(EXPORT_DIR)/scripts/pycam" "$(EXPORT_DIR)/scripts/pycam-loader.py"
create_archive_dir:
@mkdir -p "$(ARCHIVE_DIR)"
zip: create_archive_dir man svn_export
zip: create_archive_dir man git_export
cd "$(EXPORT_DIR)"; $(PYTHON_EXE) setup.py sdist --format zip --dist-dir "$(ARCHIVE_DIR)"
tgz: create_archive_dir man svn_export
tgz: create_archive_dir man git_export
cd "$(EXPORT_DIR)"; $(PYTHON_EXE) setup.py sdist --format gztar --dist-dir "$(ARCHIVE_DIR)"
win32: create_archive_dir man svn_export
win32: create_archive_dir man git_export
# this is a binary release
cd "$(EXPORT_DIR)"; $(PYTHON_EXE) setup.py bdist_wininst --user-access-control force --dist-dir "$(ARCHIVE_DIR)" $(DISTUTILS_PLAT_NAME)
......
......@@ -2,7 +2,7 @@
pycam.1: ../pycam pycam.1.inc
help2man --no-info --name="Toolpath Generation for 3-Axis CNC machining" \
--section=1 --manual="PyCAM manual" --include=pycam.1.inc --output=pycam.1 ../pycam
--section=1 --manual="PyCAM manual" --include=pycam.1.inc --output=pycam.1 ../scripts/pycam
clean:
@rm -f pycam.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment