Makefile #2

  • //
  • guest/
  • miki_tebeka/
  • p4vaddins/
  • main/
  • Makefile
  • View
  • Commits
  • Open Download .zip Download (2 KB)
# Makefile for p4 addins project

# Copyright (c) 2006 Qualcomm
# Miki Tebeka <[email protected]>

# You'll need the following programs to make the utilities:
# * Python from http://www.python.org
# * wxPython from http://www.wxpython.org
# * py2exe from http://www.py2exe.org/
# * sed, cp, chmod, rm and make from http://unxutils.sf.net 
#   (or use http://www.cygwin.com)
# * P4Python from http://public.perforce.com/guest/robert_cowham/perforce/API/python/index.html
# * docutils from http://docutils.sf.net
# * InnoSetup from http://www.jrsoftware.org/isinfo.php


# Find Python interpreter
PYTHON = $(shell pyexe.py)
INNO = $(shell innoexe.py)
ICON = addins.ico

ifeq ($(OSTYPE),cygwin)
CP = cp -f
RM = rm -f
else
CP = xcopy /R /Y
RM = del /Q /F /S
endif

all: addins

addins: py README.html setup.iss
	$(INNO) setup.iss

setup.iss: version.iss

setup.iss: version.iss.in VERSION
	sed -e "s/_VERSION_/`cat VERSION`/" $< > $@

py:
	$(PYTHON) setup.py py2exe
	$(CP) $(ICON) dist
	$(CP) ChangeLog dist
	$(CP) install.cfg dist
	$(CP) README.html dist
	$(CP) LICENSE.txt dist
ifeq ($(OSTYPE),cygwin)
	chmod +w dist/*
else
	attrib -R dist/*.*
endif

# FIXME: Find a solution for windows
README.html: README.txt style.css VERSION
	sed -e "s/_VERSION_/`cat VERSION`/" $< | rst2html.py --embed-stylesheet \
		--stylesheet=style.css - $@

clean:
	$(RM) dist build
	$(RM) *.pyc
	$(RM) README.html

fresh: clean all

dist: all
ifeq ("$(DISTDIR)","")
	@echo "error: DISTDIR not set"
	@false
endif
	$(CP) dist/* $(DISTDIR)

.PHONY: all dist clean fresh

# Change User Description Committed
#6 5630 Miki Tebeka Added p4vaddins.xml.in to unix dist
#5 5629 Miki Tebeka Release 0.8.1
#4 5628 Miki Tebeka Initial support for P4V new XML settings file
#3 5486 Miki Tebeka * Release 0.8.0
   * Fixed bug in "Create Development Branch"
   * Unix support
#2 5382 Miki Tebeka * Start of UNIX - File format and #!
* getvalue returns string (not unicode in some cases)
#1 5280 Miki Tebeka Initial checkin of project