| 1 | VERSION=1.3dev |
|---|
| 2 | REVISION=r`svn info | sed -n 's/Revision: \(.*\)/\1/p'` |
|---|
| 3 | RELEASE="$(VERSION)-$(REVISION)" |
|---|
| 4 | IDL_DOCGEN=idl |
|---|
| 5 | IDL_SAVGEN=idl64 |
|---|
| 6 | |
|---|
| 7 | .PHONY: all doc userdoc webdoc clean dist srcdist version |
|---|
| 8 | |
|---|
| 9 | all: |
|---|
| 10 | cd src; make |
|---|
| 11 | |
|---|
| 12 | doc: |
|---|
| 13 | $(IDL_DOCGEN) -e mgunit_build_docs |
|---|
| 14 | |
|---|
| 15 | userdoc: |
|---|
| 16 | $(IDL_DOCGEN) -e mgunit_build_userdocs |
|---|
| 17 | |
|---|
| 18 | webdoc: |
|---|
| 19 | $(IDL_DOCGEN) -e mgunit_build_userdocs |
|---|
| 20 | scp -r api-userdocs/* idldev.com:~/docs.idldev.com/mgunit |
|---|
| 21 | |
|---|
| 22 | clean: |
|---|
| 23 | rm -rf api-docs |
|---|
| 24 | cd src; make clean |
|---|
| 25 | |
|---|
| 26 | version: |
|---|
| 27 | sed "s/version = '.*'/version = '$(VERSION)'/" < src/mgunit_version.pro | sed "s/revision = '.*'/revision = '$(REVISION)'/" > mgunit_version.pro |
|---|
| 28 | mv mgunit_version.pro src/ |
|---|
| 29 | |
|---|
| 30 | # need to: blow away old dist, blow away api-docs, generate api-docs |
|---|
| 31 | dist: |
|---|
| 32 | rm -rf mgunit-$(RELEASE) |
|---|
| 33 | rm -rf api-userdocs/ |
|---|
| 34 | |
|---|
| 35 | make version |
|---|
| 36 | |
|---|
| 37 | make userdoc |
|---|
| 38 | |
|---|
| 39 | $(IDL_SAVGEN) -IDL_STARTUP "" mgunit_build |
|---|
| 40 | |
|---|
| 41 | mkdir mgunit-$(RELEASE)/ |
|---|
| 42 | |
|---|
| 43 | mv mgunit.sav mgunit-$(RELEASE)/ |
|---|
| 44 | |
|---|
| 45 | cd docs; make |
|---|
| 46 | svn export docs mgunit-$(RELEASE)/docs/ |
|---|
| 47 | cp docs/using-mgunit.pdf mgunit-$(RELEASE)/docs/ |
|---|
| 48 | cp docs/using-mgunit.html mgunit-$(RELEASE)/docs/ |
|---|
| 49 | rm mgunit-$(RELEASE)/docs/Makefile |
|---|
| 50 | |
|---|
| 51 | cp -r api-userdocs mgunit-$(RELEASE)/ |
|---|
| 52 | cp src/error_is_fail.pro mgunit-$(RELEASE)/ |
|---|
| 53 | cp src/error_is_pass.pro mgunit-$(RELEASE)/ |
|---|
| 54 | cp src/style.css mgunit-$(RELEASE)/ |
|---|
| 55 | cp src/mgunit-templates.xml mgunit-$(RELEASE)/ |
|---|
| 56 | cp COPYING mgunit-$(RELEASE)/ |
|---|
| 57 | cp RELEASE mgunit-$(RELEASE)/ |
|---|
| 58 | |
|---|
| 59 | zip -r mgunit-$(RELEASE).zip mgunit-$(RELEASE)/* |
|---|
| 60 | rm -rf mgunit-$(RELEASE) |
|---|
| 61 | |
|---|
| 62 | srcdist: |
|---|
| 63 | rm -rf mgunit-src-$(RELEASE) |
|---|
| 64 | rm -rf api-docs/ |
|---|
| 65 | |
|---|
| 66 | make version |
|---|
| 67 | make doc |
|---|
| 68 | |
|---|
| 69 | mkdir mgunit-src-$(RELEASE)/ |
|---|
| 70 | |
|---|
| 71 | cd docs; make |
|---|
| 72 | svn export docs mgunit-src-$(RELEASE)/docs/ |
|---|
| 73 | cp docs/using-mgunit.pdf mgunit-src-$(RELEASE)/docs/ |
|---|
| 74 | cp docs/using-mgunit.html mgunit-src-$(RELEASE)/docs/ |
|---|
| 75 | |
|---|
| 76 | cp -r api-docs mgunit-src-$(RELEASE)/ |
|---|
| 77 | cp src/*.pro mgunit-src-$(RELEASE)/ |
|---|
| 78 | cp src/style.css mgunit-src-$(RELEASE)/ |
|---|
| 79 | cp src/dist_tools/mg_src_root.pro mgunit-src-$(RELEASE)/ |
|---|
| 80 | cp src/dist_tools/mg_options__define.pro mgunit-src-$(RELEASE)/ |
|---|
| 81 | cp src/dist_tools/collection/mgcohashtable__define.pro mgunit-src-$(RELEASE)/ |
|---|
| 82 | cp src/dist_tools/collection/mgcoarraylist__define.pro mgunit-src-$(RELEASE)/ |
|---|
| 83 | cp src/dist_tools/collection/mgcoabstractlist__define.pro mgunit-src-$(RELEASE)/ |
|---|
| 84 | cp src/cmdline_tools/mg_ansicode.pro mgunit-src-$(RELEASE)/ |
|---|
| 85 | cp src/mgunit-templates.xml mgunit-src-$(RELEASE)/ |
|---|
| 86 | cp COPYING mgunit-src-$(RELEASE)/ |
|---|
| 87 | cp RELEASE mgunit-src-$(RELEASE)/ |
|---|
| 88 | |
|---|
| 89 | zip -r mgunit-src-$(RELEASE).zip mgunit-src-$(RELEASE)/* |
|---|
| 90 | rm -rf mgunit-src-$(RELEASE) |
|---|