# Makefile for p4 addins project # Copyright (c) 2006 Qualcomm # Miki Tebeka # 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