RM = rm
+PREFIX = ${HOME}
+INSTALL_OPTIONS = "--prefix=${PREFIX}"
+
\f
.PHONY: all
all: build
\f
.PHONY: build
-build:
+build: libbe/_version.py
+ python setup.py build
.PHONY: install
-install:
+install: doc build
+ python setup.py install ${INSTALL_OPTIONS}
+ cp -v xml/* ${PREFIX}/bin
\f
.PHONY: clean
clean:
$(RM) -rf ${GENERATED_FILES}
+
+libbe/_version.py:
+ bzr version-info --format python > $@
import sys
-from libbe import cmdutil
+from libbe import cmdutil, _version
__doc__ == cmdutil.help()
for command, module in cmdutil.iter_commands():
print command
print '\n'.join(["--help","--complete","--options"])
+elif sys.argv[1] == '--version':
+ print _version.version_info["revision_id"]
else:
try:
try: