[Pkg-mozext-commits] [perspectives-extension] 09/30: Makefile - Add rules to copy unit test file
David Prévot
taffit at alioth.debian.org
Thu Sep 26 22:31:38 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch debian
in repository perspectives-extension.
commit 2f8a654bd7c40f94a40748dd302305747a4d22d3
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date: Sat Sep 14 22:52:25 2013 -0600
Makefile - Add rules to copy unit test file
We can now create two versions of the plugin:
one that includes the unit tests, and one that does not.
The former is useful (and necessary!) for testing during development.
The latter is good for publishing, so we don't use the extra space.
---
Makefile | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 220790a..6ca949f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
outfile = Perspectives
buildfolder = build
+unittest_file = test.html
+unittest_source = test/$(unittest_file)
+unittest_dest_folder = $(buildfolder)/chrome/content/test
+unittest_dest = $(unittest_dest_folder)/$(unittest_file)
-.PHONY: all
+.PHONY: plugin
-all: clean dtds
- rm -rf $(buildfolder)/
- mkdir $(buildfolder)
- cp -r plugin/* $(buildfolder)/
+plugin: clean dtds setup
sh -c "cd $(buildfolder)/ && zip -r ../$(outfile).xpi * -x *\.svn*"
rm -rf $(buildfolder)
@@ -26,3 +27,15 @@ dtds:
clean:
rm -f $(outfile).xpi
rm -rf $(buildfolder)/
+ rm -f $(unittest_dest)
+
+setup:
+ rm -rf $(buildfolder)/
+ mkdir $(buildfolder)
+ cp -r plugin/* $(buildfolder)/
+
+test: clean setup install-test-files plugin
+
+install-test-files: setup
+ mkdir $(unittest_dest_folder)
+ cp $(unittest_source) $(unittest_dest)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git
More information about the Pkg-mozext-commits
mailing list